DNSDB API authentication
The DNSDB API is provided over an encrypted HTTPS transport over the Internet at the following URL:
API Key Authentication
Section titled “API Key Authentication”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.
Example
Section titled “Example”If your API key is d41d8cd98f00b204e9800998ecf8427e, then the following HTTP header should be added to the HTTP request:
X-API-Key: d41d8cd98f00b204e9800998ecf8427eAuthentication Errors
Section titled “Authentication Errors”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.
Name Encoding
Section titled “Name Encoding”All IDN DNS names used with the DNSDB API must be encoded in Punycode.
Setting Up Your Environment
Section titled “Setting Up Your Environment”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"