Skip to content

DNS Details API Documentation

Introduction

The DNS Details API allows you to retrieve detailed information about a domain's DNS records. This includes data such as CNAME, TXT, A, AAAA, NS, MX, and SOA records. Additionally, you can choose to include information about the domain's WHOIS data and perform IP address lookups.

Base URL

The base URL for the API is https://seox.p.rapidapi.com/.

Endpoint

  • URL: /api/dns/
  • Method: GET

Query Parameters

  • domain (required): The domain which we need to get the dns details.

  • iplookup (optional): If set to true, performs an IP address lookup for A and AAAA records. Default is false.

  • whois (optional): If set to true, includes WHOIS information for the domain. Default is false.

Response

The API responds with a JSON object containing detailed information about the specified domain's DNS records.

Example Response:

json
{
  "domain": "example.com",
  "NS": [...],
  "MX": [...],
  "CNAME": [...],
  "TXT": [...],
  "A": {
    "records": [...],
    "ipInfo": [...]
  },
  "AAAA": {
    "records": [...],
    "ipInfo": [...]
  },
  "SOA": [...],
  "domainInfo": {
    "created": "2022-01-01",
    "expiry": "2023-01-01",
    "registrar": "Example Registrar",
    "status": ["clientTransferProhibited"]
  }
}

Error Responses

500 Internal Server Error:

If an unexpected error occurs during the DNS lookup process.

json
{
  "error": "Internal Server Error"
}

Example Usage

cURL Command

bash
curl https://seox.p.rapidapi.com/dns/example.com?iplookup=true&whois=true

JavaScript (axios)

javascript
const axios = require('axios');

const domain = 'example.com';
const ipLookup = true;
const whoisLookup = true;

axios.get(`https://seox.p.rapidapi.com/dns/${domain}`, {
    params: { iplookup: ipLookup, whois: whoisLookup }
  })
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error.response ? error.response.data : error.message);
  });

Released under the MIT License.