Authentication (deprecated)

Fastly update

Domainr joined Fastly in 2023, and the Domain Research API is now part of the Fastly API. These original Domainr API docs are now deprecated, though we are leaving them online for users who haven't migrated to the Fastly API yet.


The Domainr API requires authentication for all requests.

RapidAPI

For RapidAPI users:

  1. Subscribe to the Domainr API here; a credit card is required.
  2. From the Endpoints page, use the X-RapidAPI-Key value as the ?mashape-key={string} query parameter value in your Domainr API requests. Further documentation regarding RapidAPI keys is here.

Note: To keep your API key secret, you should proxy your Domainr API requests through a server you control.

Example

https://domainr.p.rapidapi.com/v2/status?mashape-key=${your_rapidapi_key}&domain=acmecoffee.shop

High-volume Usage

High-volume users will append a client_id parameter to authenticate—contact us for details.

Example

https://api.domainr.com/v2/status?client_id=${client_id}&domain=acmecoffee.shop

Cross-Domain and JSONP

The Domainr API supports CORS (Cross-Origin Resource Sharing) for cross-domain API access from the browser. API clients must whitelist their origin hosts prior to accessing the API. For example:

example.com www.example.com staging.example.com

Note: localhost (and equivalent IP addresses) are automatically whitelisted.

Email us if you need to update your list of origin hosts.

To query the Domainr API from a browser that does not support CORS, you can request a JSONP response by including the callback parameter with the name of a JavaScript function to call in any API URL.

Note: all JSON requests will respond with a 200 OK status to ensure the browser evaluates the response.

Errors

In the event of an authentication error, the response will be an HTTP 401 code, and will include a message key describing the error.

{
    "message": "unauthorized: invalid client ID: ..."
}