Skip to main content
POST
/
dnsrecord
cURL
curl --request POST \
  --url https://api.geekflare.com/dnsrecord \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "https://example.com",
  "types": [
    "A",
    "MX"
  ]
}
'
{
  "timestamp": 1763372588297,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "url": "example.com",
    "types": [
      "A",
      "MX"
    ],
    "test": {
      "id": "zmkqoxxu075dwn4u61yoqhq2rwo0029m"
    }
  },
  "data": {
    "A": [
      "172.67.70.213",
      "104.26.11.88",
      "104.26.10.88"
    ],
    "MX": [
      {
        "exchange": "alt3.aspmx.l.google.com",
        "priority": 10
      },
      {
        "exchange": "aspmx.l.google.com",
        "priority": 1
      }
    ]
  }
}

Authorizations

x-api-key
string
header
required

API Key required for all endpoints

Body

application/json
url
string
required

Target URL

Example:

"https://example.com"

types
enum<string>[]

List of DNS record types to query. If omitted, all supported types will be returned.

Available options:
A,
AAAA,
CNAME,
MX,
CAA,
NS,
SOA,
SRV,
TXT
Example:
["A", "MX"]

Response

Successfully retrieved DNS records

timestamp
number
required

Timestamp of the request in milliseconds

Example:

1763372588297

apiStatus
enum<string>
required

API status message

Available options:
success,
failure
Example:

"success"

apiCode
number
required

API status code

Example:

200

meta
object
required

Metadata about the request.

Example:
{
"url": "example.com",
"types": ["A", "MX"],
"test": { "id": "zmkqoxxu075dwn4u61yoqhq2rwo0029m" }
}
data
object
required

DNS records grouped by type.

Example:
{
"A": [
"172.67.70.213",
"104.26.11.88",
"104.26.10.88"
],
"MX": [
{
"exchange": "alt3.aspmx.l.google.com",
"priority": 10
},
{
"exchange": "aspmx.l.google.com",
"priority": 1
}
]
}