Documentation
Authentication
The Domainr API requires authentication for all requests.
RapidAPI
For RapidAPI users:
- Subscribe to the Domainr API on this page; a credit card is required.
- 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 can 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
Commercial
High-volume commercial 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: ..."
}