API Introduction
The DNS Lookup API allows developers to programmatically access DNS records, check propagation status globally, and monitor domain health. Our API is built on REST principles and returns JSON formatted responses.
Base URL
All API requests should be made to the following base URL. We support both HTTP and HTTPS, but HTTPS is required for all requests including an API key.
https://api.dnslookup.com/v1Authentication
Authentication is performed via the Authorization header. You must prefix your API key with Bearer.
info
Security Note: Your API key carries the same privileges as your user account. Be sure to keep it secret! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
bash
Example Requestcurl "https://api.dnslookup.com/v1/domains/example.com" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
Visual Flow & Response
terminal
ClientGET /v1/lookup
arrow_forward
dns
APIJSON Payload
arrow_forward
data_object
DataEvery successful response is wrapped in a standardized JSON envelope containing the data, metadata about the request, and status information.
JSON
{
"status": "success",
"data": {
"domain": "example.com",
"records": [
{
"type": "A",
"ttl": 3600,
"value": "93.184.216.34"
}
]
},
"meta": {
"latency": 45,
"region": "us-east"
}
}
Lookup Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| domain | string | Yes | The domain name to lookup (e.g. google.com) |
| type | string | Optional | DNS record type (A, MX, TXT, etc). Defaults to 'A'. |
| server | string | Optional | Specific nameserver to query against (IP or Hostname). |
Last updated: October 24, 2023
Was this page helpful?