Back to Home

Include WHOIS Data

Learn how to include WHOIS data in your API requests to get comprehensive domain information along with other RUE API features.

Overview

WHOIS data provides valuable information about domain registration, including registrar details, creation and expiration dates, and name servers. By including WHOIS data in your API requests, you can enrich your analysis with this additional context.

How to Include WHOIS Data

To include WHOIS data in your API requests, you need to add the include_whois parameter to your request. Here's an example using the scrape_metadata endpoint:

const axios = require('axios');

async function scrapeMetadataWithWhois(url) {
  try {
    const response = await axios.post('https://api.rue.ai/v1/scrape_metadata', 
      {
        url: url,
        include_whois: true
      },
      {
        headers: {
          'Content-Type': 'application/json',
          'X-API-Key': 'YOUR_API_KEY'
        }
      }
    );
    console.log('Metadata with WHOIS:', response.data);
  } catch (error) {
    console.error('Error:', error.response.data);
  }
}

// Example usage
scrapeMetadataWithWhois('https://example.com');

WHOIS Data Fields

When you include WHOIS data, you'll receive the following additional fields in the API response:

  • Domain Name
  • Registrar
  • Creation Date
  • Expiration Date
  • Last Updated Date
  • Name Servers
  • Registrant Information (if available)
  • Admin Contact (if available)
  • Technical Contact (if available)

Use Cases for WHOIS Data

  • Verify the legitimacy of a website
  • Determine the age of a domain
  • Identify potential relationships between different domains
  • Assess the likelihood of a domain being used for malicious purposes
  • Gather contact information for domain owners (subject to privacy protections)

Limitations and Considerations

  • WHOIS data may be incomplete or redacted due to privacy protections
  • The availability and accuracy of WHOIS data can vary depending on the domain registrar
  • Including WHOIS data may slightly increase the response time of your API requests
  • There may be additional charges for including WHOIS data, depending on your subscription plan

For more examples of how to use WHOIS data in conjunction with other RUE API features, check out our Examples page. If you have any questions about including WHOIS data in your requests, please contact our support team.