Making requests

A domain has a number of records associated with it, a DNS server can be queried to determine the IP address of the primary domain (A record), mail servers (MX records), DNS servers (NS nameservers) and other items such as SPF records (TXT records).

WhoisXmlApi.com provides RESTful APIs. It is designed for server-to-server communication between your system and the WhoisXmlApi.com network using standard HTTP or HTTPS protocols. 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 DNS lookups are complimentary when you register for a free account.


GET https://www.whoisxmlapi.com/whoisserver/DNSService?domainName=bbc.com&type=_all
It takes up to a minute to activate your account after the registration.

Input parameters

apiKey

Required. Get your personal API KEY on the My products page.

domainName

Required. The target domain name.

type

Required. DNS type: A, NS, SOA, MX, etc. You can specify multiple comma-separated values, e.g., A,SOA,TXT; all records can be retrieved with type=_all.

Acceptable values: A, NS, SOA, MX, etc.;

outputFormat

Optional. Response output format.

Acceptable values: JSON | XML

Default: XML

digest

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

Free access

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

Usage limits and requests throttling

The maximum number of requests per second is 30. In case that the limit is breached, your subsequent requests will be rejected until the next second.

This API is also available with a dedicated load balancer and premium endpoint to enable faster querying as part of our Premium API Services and Enterprise API Packages.

Supported DNS Types

We support around fifty DNS types. You can use type codes or names from the table below:

Name Code Name Code
A1GPOS27
NS2AAAA28
MD3LOC29
MF4NXT30
CNAME5EID31
SOA6NIMLOC32
MB7SRV33
MG8ATMA34
MR9NAPTR35
NULL10KX36
WKS11CERT37
PTR12A638
HINFO13DNAME39
MINFO14APL42
MX15DS43
TXT16SSHFP44
RP17IPSECKEY45
AFSDB18RRSIG46
X2519NSEC47
ISDN20DNSKEY48
RT21DHCID49
NSAP22NSEC350
NSAP_PTR23NSEC3PARAM51
SIG24TLSA52
KEY25ANY255
PX26DLV32769