Making requests | Documentation | DNS Lookup API | Whois XML API

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 a developer's 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 developer account.


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

Input parameters

apiKey

Required. Get your personal API KEY on 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

callback

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 per month.

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.

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
Have questions?

We are here to listen. For a quick response, please select your request type or check our Contact us page for more information. By submitting a request, you agree to our Terms of Service and Privacy Policy.

Or shoot us an email to