Skip to Content
Domain API

Domain Lookup1 Credit

Look up a domain's registration data over RDAP or WHOIS, in one normalized format.

GET
/v1/domain

The Domain API provides comprehensive domain registration data by automatically selecting the best data source (RDAP or WHOIS), providing the most complete information possible. Fields with redacted or privacy-protected data are left null by default and all other fields have normalized formatting.

Each call costs 1 credit. Results are cached for up to 24 hours.

Authorization

See Authentication for details.

headerX-API-Key<token>

Provide your API key in an HTTP request header.

Query Parameters

domain*string

The domain name to look up

Length1 <= length
verbose?boolean

Return extra detail: totalElapsed, retries and params, plus each errors entry's detail when the lookup fails. For domain, each result also has source (the protocol, server and time the record came from), redacted (the fields a server redacted), provenance (whether each part of the record came from the registry or the registrar) discrepancies (where the two disagree) and attempts (every server asked, with what it said and how long it took).

Defaultfalse
redacted?boolean

Return the values a registry or registrar redacted as it sent them ("REDACTED FOR PRIVACY", a privacy service's name). By default they are null, and a contact left with nothing but its handle is null

Defaultfalse

Response Body

Successful domain response

application/json
  1. response
tool*string

Tool that generated this result

Value in"dns""domain""reverse""site""dnssec""ssl""email""redirect"
query*string

The original query string

requestId*|

Unique request identifier that generated this result

timestamp*string

UTC timestamp when the result was generated

elapsed*|

Time taken to generate the result in milliseconds

cached*boolean

Whether this result was served from cache

totalElapsed?|

Returned with verbose. Total time in milliseconds, including retries and any lookups this one made. For a cached result, the time to read it

retries?number

Returned with verbose. Number of retries before the answer, 0 for a cached result

params?

Returned with verbose. The query parameters you set that differ from their defaults

results*array<>|

One result: the registration record

errors*array<>

Empty on a clean answer. On any other status, why the request failed. The HTTP status is in the response line only

Errors

See Errors for the response format.

invalid_request
A parameter is missing or not valid, or is not one this endpoint takes.
400
invalid_query
The query is not a domain name that can be looked up.
400
authentication_failed
No API key was sent, or it could not be checked.
401
invalid_api_key
The API key is not valid.
401
api_key_expired
The API key has expired.
401
out_of_credits
The account has no credits left.
402
forbidden
The caller may not use this tool.
403
unsupported_tld
No WHOIS or RDAP server is known for the TLD.
422
rate_limited
The caller is over its rate limit; retry after the Retry-After header.
429
internal_error
An internal error on our side.
500
upstream_timeout
A WHOIS or RDAP server did not answer in time.
503
upstream_unreachable
A WHOIS or RDAP server could not be reached, or the proxy failed.
503
registry_throttled
A WHOIS or RDAP server is refusing requests for now.
503
upstream_invalid
The servers answered, but nothing usable came of it: empty, malformed or too little to tell.
503
Example Request
curl -X GET 'https://api.dns.tools/v1/domain?domain=google.com'
Example Response
{  "tool": "domain",  "query": "google.com",  "requestId": "a016aba0-d199-4c27-89f4-91e4dc69585e",  "timestamp": "2025-09-30T07:09:59.097Z",  "elapsed": 22,  "cached": false,  "errors": [],  "results": [    {      "domainName": "google.com",      "domainNameUnicode": null,      "creationDate": "1997-09-15T04:00:00Z",      "expirationDate": "2028-09-14T07:00:00Z",      "registryExpirationDate": "2028-09-14T04:00:00Z",      "updatedDate": "2024-08-02T02:17:33Z",      "nameservers": [        "ns1.google.com",        "ns2.google.com",        "ns3.google.com",        "ns4.google.com"      ],      "dnssec": false,      "eppStatus": [        "clientDeleteProhibited",        "clientTransferProhibited",        "clientUpdateProhibited",        "serverDeleteProhibited",        "serverTransferProhibited",        "serverUpdateProhibited"      ],      "unmappedStatus": [],      "available": false,      "reserved": false,      "registrar": {        "ianaId": 292,        "name": "Markmonitor Inc.",        "address": [          "3540 E Longwing Ln"        ],        "city": "Meridian",        "state": "ID",        "postalCode": "83646",        "countryCode": "US",        "phone": null,        "phoneExt": null,        "fax": null,        "faxExt": null,        "email": null,        "url": "https://www.markmonitor.com/contact-us/",        "abuseEmail": null,        "abusePhone": "+1.2086851750"      },      "reseller": null,      "registrant": {        "id": null,        "name": null,        "org": null,        "address": null,        "city": null,        "state": "CA",        "postalCode": null,        "countryCode": "US",        "phone": null,        "phoneExt": null,        "fax": null,        "faxExt": null,        "email": null,        "url": "https://domains.markmonitor.com/whois/contact/google.com"      },      "admin": null,      "tech": {        "id": null,        "name": null,        "org": null,        "address": null,        "city": null,        "state": null,        "postalCode": null,        "countryCode": null,        "phone": null,        "phoneExt": null,        "fax": null,        "faxExt": null,        "email": null,        "url": "https://domains.markmonitor.com/whois/contact/google.com"      },      "billing": null    }  ]}