Skip to content

DNSDB API authentication

The DNSDB API is provided over an encrypted HTTPS transport over the Internet at the following URL:

https://api.dnsdb.info/

Authentication is performed by providing an API key (a long string of hexadecimal digits or dashes) in a special HTTP request header, X-API-Key.

If your API key is d41d8cd98f00b204e9800998ecf8427e, then the following HTTP header should be added to the HTTP request:

X-API-Key: d41d8cd98f00b204e9800998ecf8427e

If the X-API-Key header is not present, or the provided API key is not valid, a 403 Forbidden response will be returned to the HTTP client.

All IDN DNS names used with the DNSDB API must be encoded in Punycode.

For convenience in examples throughout this documentation, you can set your API key as an environment variable. For storage trade-offs and rotation guidance, see Storing credentials securely.

export DNSDB_API_KEY="d41d8cd98f00b204e9800998ecf8427e"

Then use it in curl commands:

curl -H "Accept: application/x-ndjson" -H "X-API-Key: $DNSDB_API_KEY" \
"https://api.dnsdb.info/dnsdb/v2/lookup/rrset/name/example.com"