Making requests | Documentation | WHOIS API | WhoisXML API

Making requests

Our Hosted Whois Web Service provides registration details, also known as WHOIS Records, of a domain names, an IP addresses or an email address.

WhoisXMLAPI.com provides RESTful APIs. It is designed for server-to-server communication between your system and the WhoisXMLAPI.com network using HTTPs protocol. Query responses are delivered in either XML or JSON format based on your requests which are made via GET/POST methods.

To get started you need an account with WhoisXmlApi.com. Authentication is required each time in order to use the API. The first 500 WHOIS API calls are complimentary when you register for a free account.

API endpoints

You can use the following endpoints to make requests to the WHOIS API:

  • Use the GET method with query parameters
  • Use the POST method with JSON body
GET https://www.whoisxmlapi.com/whoisserver/WhoisService?apiKey=API_KEY&domainName=google.com
POST https://www.whoisxmlapi.com/whoisserver/WhoisService
It takes up to a minute to activate your account after the registration.

Example of cURL request with body in JSON format

curl --location 'https://www.whoisxmlapi.com/whoisserver/WhoisService' \
    --header 'Content-Type: application/json' \
    --data '{
        "domainName": "google.com",
        "apiKey": "API_KEY"
    }'

Example of cURL request with an Authorization header

curl --location 'https://www.whoisxmlapi.com/whoisserver/WhoisService?domainName=google.com' \
--header 'Authorization: Bearer %accessToken%'

Postman collection

Postman is a desktop and web application that allows you to make requests to an API from a graphical user interface. We recommend using Postman with WhoisXML APIs endpoints when exploring the APIs functionality, as well as when you are troubleshooting issues with your application.

The WhoisXML API Postman collection is available at the following links:

The collection includes a preconfigured environment. You will need to set up the api_key variable to fire each request. Get your personal API KEY on the My products page. If you have questions related to the API, contact us.

Authorization: required

Use your personal API key or Server-to-Server OAuth token to authenticate your requests. You can find your API key on the My products page. The apiKey query parameter has the highest priority. If you provide the apiKey parameter, the service will ignore the Authorization header if it is present.

Via the query parameter

apiKey

Get your personal API key on the My products page.

Via the header

Authorization

API key or Server-to-Server OAuth token.

Authentication scheme: Bearer.

Example:
Authorization: Bearer %API_KEY%
Authorization: Bearer %OAUTH_ACCESS_TOKEN%

Input parameters: required

domainName

The domain/IPv4/IPv6/email address for which WHOIS data is requested.

Input parameters: optional

outputFormat

Response output format.

Acceptable values: JSON | XML

Default: XML

preferFresh

1 results in getting the latest WHOIS record even if it's incomplete.

Acceptable values: 0 | 1

Default: 0

da

1 results in a quick check on domain availability, 2 is slower but more accurate. Results are returned under WhoisRecord → domainAvailability (AVAILABLE | UNAVAILABLE | UNDETERMINED)

Acceptable values: 0 | 1 | 2

Default: 0

ip

1 results in returning IPs for the domain name.

Acceptable values: 0 | 1

Default: 0

ipWhois

1 results in returning the WHOIS record for the hosting IP if the WHOIS record for the tld of the input domain is not supported.

Acceptable values: 0 | 1

Default: 0

checkProxyData

1 results in fetching proxy/WHOIS guard data, if it exists, in the WhoisRecord → privateWhoisProxy schema element.

Acceptable values: 0 | 1

Default: 0

thinWhois

1 results in returning WHOIS data from registry only, without fetching data from registrar. Returned registry data corresponds to the WhoisRecord → registryData schema element.

Acceptable values: 0 | 1

Default: 0

ignoreRawTexts

1 results in stripping all raw text from the output.

Acceptable values: 0 | 1

Default: 0

callback

A javascript function used when outputFormat is JSON; this is an implementation known as JSONP which invokes the callback on the returned response.

registryRawText

A string representing the registry WHOIS raw text to be parsed; works only when the _parse parameter is equal to 1.

registrarRawText

A string representing the registrar WHOIS raw text to be parsed; works only when the _parse parameter is equal to 1.

multiIdIana

1 results in having a multi ID IANA match for parsing registrarName to get registrarIANAID when it is not a strict match.

Acceptable values: 0 | 1

Default: 0

_parse

1 provides parsing for input WHOIS raw texts described below.

Acceptable values: 0 | 1

Default: 0

_hardRefresh

1 provides real-time data, but it will cost 5 WHOIS API credits.

Acceptable values: 0 | 1

Default: 0

Free access

After Sign Up you automatically get a free subscription plan limited to 500 queries.