Image Alt

API Documentation

API Documentation

WhoAPI is a RESTful based API. Communication is made through normal HTTP requests.
Requests are made as strings using the HTTP GET method. All outputs are provided as a JSON or XML formatted response.

Authentication

Authentication is needed in order to use the API, and for this a WhoAPI account is required. You’ll need your API key every time you make a request. You have the option to limit API requests by a certain IP addresses in your account settings.

You can find your unique API key inside the “My account” section on the left once you register.

Setting Up Input Request

Get requests should provide their parameters as a request string, part of the URL.

GET http://api.whoapi.com/?domain=whoapi.com&r=NAME_OF_API&apikey=YOUR_API_KEY

We suggest you test the API requests via the API console before you start your implementation.

You have to be logged in to access the API console at: https://my.whoapi.com/api/console

When you make an API request, you have to specify the value of these parameters:

Request param.

 

domain

r

apikey

rr *optional

ip *optional

fullurl *optional

Description

 

full domain name, including the tld e.g. whoapi.com

type of the request are explained separately on API page

your private unique api key

returns your request in json result (useful for testing your scripts)

ip address for API functions like email blacklist or IP whois, not mandatory

some functions allow full URL e.g. screenshot API

The Content-Type header of the response is set to “application/json; charset=utf-8” Output is compressed with gzip.

Description for Input Parameters

WhoAPI consists of several different APIs. Complete list here. You can access (send requests) to any of our APIs, and upgrade the ones you plan to use. You can send requests to all APIs with the same API key. You can see in the examples below, you can put your API key at the beginning or the end of the URL. Once you register your account and get an API key, you can open the URL in your browser.

  • Example API request for Whois API
    https://api.whoapi.com/?domain=whoapi.com&r=whois&apikey=YOUR_API_KEY
  • Example API request for Domain Availability API
    https://api.whoapi.com/?domain=whoapi.com&r=taken&apikey=YOUR_API_KEY
  • Example API request for Screenshot API
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=screenshot&fullurl=whoapi.com&process=thumb&resolution=1366×768&asap=&node_geo=&delay=&thumbwidth=&thumbheight=
  • Example API request for Geolocation API
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=geo&domain=whoapi.com&ip=
  • Example API request for Blacklist API
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=blacklist&domain=whoapi.com&ip=
  • Example API request for IP Whois API
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=ipwhois&domain=whoapi.com&ip=
  • Example API request for SSL API
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=cert&domain=whoapi.com
  • Example API request for DNS Zone API
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=dnszone&domain=whoapi.com
  • Example API request for Domain Score API (set)
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=domainscore&domain=whoapi.com
  • Example API request for Domain Score API (check)
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=domainscore-check&domain=whoapi.com
  • Example API request for Email Score API (set)
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=emailscore&domain=whoapi.com
  • Example API request for Email Score API (check)
    https://api.whoapi.com/?apikey=YOUR_API_KEY&r=emailscore-check&domain=whoapi.com

Default Output Variables

You will always get these fields in the response:

Output Parameter

 

status

status_desc

Description

 

status code for your request, check all the codes here

description of the status in plain English

Let’s make an example request: (check domain availiability for whoapi.com)

http://api.whoapi.com/?domain=whoapi.com&r=taken&apikey=demokey

Output in the JSON format:

 

{
  "status":"0",
  "status_desc":"Request successful!",
  "taken": "1",
  "ip": "78.47.103.206"
}

 

Result is stored in the “taken” value which is in this case “1”, same as “Domain not available for registration”.
Each function has a set of its own resulting variables.

API Status Codes

Status Code

 

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Description

 

Request successful!

Invalid characters in domain name.

Use of double dot in domain name.

Domain name starting or ending with dash or dot.

TLD does not exist.

Too many characters in domain name (without TLD), maximum length is 64.

Too many characters in TLD.

Whois server not yet supported. We are adding new servers on a monthly basis.

Missing request type in ‘r’ parameter.

Invalid request type in ‘r’ parameter.

API key invalid.

Invalid characters in ‘port’ parameter.

Invalid API account.

Account suspended.

Account canceled.

IP not whitelisted in Account settings.

Too many tries, your IP has been blocked for a minute.

Query limit exceeded.

Query high usage limit exceeded.

Missing domain name in ‘domain’ parameter.

Invalid IP address in ‘ip’ parameter.

Invalid ‘fullurl’ parameter, must be fully qualified URL.

Invalid node data, only numeric characters allowed.

Missing ‘port’ parameter.

Missing valid TLD in a domain name.

Unknown output type.

Timeout getting the result from a node.

Fatal error detected in result from a node.

Unknown error detected in result from a node.

Cannot resolve domain name, IP needed.

Problem with the WHOIS server, please try again later.

WHOIS limit reached for used WhoAPI node. Please make a new request.

Cannot resolve domain availability by using the requested method.

You can’t make requests on a free account. Please upgrade.

Your free account has ended. Please upgrade in order to make additional requests.

You run out of free requests. Please upgrade in order to make additional requests.

You run out of monthly requests. Query limit exceeded.

You need to pass domain or IP param. or both to get the score.

Invalid domain address in ‘domain’ parameter.

Invalid IP in ‘IP’ parameter.

You need to pass ’email’ or ‘IP’ parameter or both to get the score.

Invalid email address in ’email’ parameter.

Unable to check domain availability.