DNS Lookup API User Guide - Whois XML API
  • Sign In / Sign Up
      Forgot Username/Password ?
      New User ?
HOME
  • PRODUCTS
    • APIs
    • Whois API
    • Domain Availability API
    • Whois History API
    • Reverse Whois API
    • Reverse IP/DNS API
    • Reverse MX API
    • Reverse NS API
    • Brand Alert API
    • Registrant Alert API
    • Bulk Whois API
    • DNS Lookup API
    • Email Verification API
    • IP Geolocation API
    • IP Netblocks API
    • Domain Reputation API
    • DOMAIN RESEARCH
    • Whois Lookup
    • Reverse Whois/Registrant Search
    • Bulk Whois Lookup
    • Bulk Email Verification
    • ENTERPRISE PACKAGES
    • Enterprise API Package
    • Enterprise Data Feed Packages
    • Enterprise Tools Packages
    • DATA FEEDS
    • Whois Database Download
    • Newly Registered Domains
    • All Registered Domains
    • DNS Database Download
    • Real-time Domain Registration
    • IP Geolocation Data Feed
    • IP Netblocks Whois Data Feed
    • Website Contact Database
    • OTHER DATA FEEDS
    • Website Classification Database
    • Internet Retailer Database
    • Threat Intelligence Data Feeds
    • CUSTOM SOLUTIONS
    • Whois API Software Package
    • Registrar Whois Service
    • Internet Statistics Reports
    • CYBER-SECURITY RESEARCH
    • Threat Intelligence Platform
    • Threat Intelligence API
  • |
  • SOLUTIONS
    • Cyber Security Solutions
    • Domainer Solutions
    • Brand Protection Solutions
    • Marketing Research Solutions
    • Registrar Solutions
    • Law Enforcement Solutions
    • Fraud Detection Solutions
    • Investment Fund & Banking Solutions
  • |
  • TOOLS
    • DASHBOARD
    • MONITOR TOOLS
    • Domain Monitor
    • Brand Monitor
    • Registrant Monitor
    • SEARCH TOOLS
    • Whois Search
    • Reverse Whois Search
    • Domain Availability
    • Bulk Whois Search
    • Bulk Email Verification
    • SETTINGS
    • PRICING
  • |
  • CONTACT US
  • |
  • BLOG
Unified & Consistent
Whois API & Whois
Parser System
Example: google.com
user anonymous [104.237.52.57] account balance: not available

DNS Lookup API User Guide

This version of the API is deprecated. For the latest version, please visit
dns-lookup-api.whoisxmlapi.com/docs
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 lookup calls are complimentary when you register for a free developer account.

API status

You can check the API's current performance and availability status on the API Status Page.

Making a Call to DNS Lookup API Web Service

Use the following URL:
https://www.whoisxmlapi.com/whoisserver/DNSService?domainName=google.com&type=1&username=xxxxx&password=xxxxx
Supported input parameters
Parameters Values
domainName required, the domain for which DNS data is requested
username required unless ApiKey authentication is used, your account username
password required unless ApiKey authentication is used, your account password;
make sure it is URL-encoded if it contains special characters (&, %, * etc.)
requestObject required unless password authentication is used, encoded user identifier for ApiKey authentication
digest required unless password authentication is used, ApiKey access token
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
outputFormat XML | JSON (defaults to XML)
callback a javascript function used when outputFormat is JSON;
this is an implementation known as JSONP which invokes the callback on the returned response

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

Usage of HTTP & HTTPS

You can use both http and https to make the API query. With HTTPs the connection would be more secure but slightly slower.

Sample code for making a query to DNS Lookup API Web Service

You may view examples of querying DNS Lookup API by clicking on the following links or visiting our GitHub page
User password authentication
Responsive image C# code: example, full project
Responsive image Java code: example, full project
Responsive image Javascript code: JSONP
Responsive image Node.js code: example
Responsive image Perl code: example
Responsive image PHP code: example
Responsive image PowerShell code: example
Responsive image Python code: example
Responsive image Ruby code: example
API key authentication
Responsive image C# code: example, full project
Responsive image Java code: example, full project
Responsive image Javascript code: JSONP
Responsive image Node.js code: example
Responsive image Perl code: example
Responsive image PHP code: example
Responsive image PowerShell code: example
Responsive image Python code: example
Responsive image Ruby code: example

Usage Limits

The maximum number of requests per second is 1. In case that the limit is breached (either from single IP address or from multiple IPs), you will be penalized with the 30 second ban. That ban includes IPs that were used at the time of the offence, and includes all following IPs (based on username from additional requests) used during the ban time.

Query Account Balance Information

In order to query your account balance, use the following URL:
https://www.whoisxmlapi.com/accountServices.php?servicetype=accountbalance&username=xxxxx&password=xxxxx
Supported input parameters
Parameters Values
servicetype required, type of service;
in this case, "accountBalance"
username required, your account username
password required, your account password;
make sure it is URL-encoded if it contains special characters (&, %, * etc.)
output_format XML | JSON (defaults to XML)
You will receive a response with your account balance.

Authentication

Password authentication
This method uses your account's username and password to authenticate with the web service. Just pass your credentials as query string parameters (username, password).
API key authentication
Generate access tokens providing your API and secret keys to make DNS Lookup API calls without sending your username and password. These tokens will need to be included as part of the request URL (requestObject, digest). Please, note that all tokens expire after 5 minutes and will have to be regenerated. Access the API Key Management section of your account to create your keys (make sure the key you're using is marked as active).

TLDs Supported

We support thousands of TLDs, both gTLDs and ccTLDS. You can see the entire list here.

Sample Output

XML
JSON

                                

Printable guide

You can also download the PDF version of this guide.
TRUSTED BY OVER
50,000
CUSTOMERS
Search over thousands of TLDs
SERVICES
APIs
  • Whois API
  • Domain Availability API
  • Whois History API
  • Reverse Whois API
  • Reverse IP/DNS API
  • Reverse MX API
  • Reverse NS API
  • Brand Alert API
  • Registrant Alert API
  • Bulk Whois API
  • DNS Lookup API
  • Email Verification API
  • IP Geolocation API
  • IP Netblocks API
  • Domain Reputation API
Domain Research
  • Whois Lookup
  • Reverse Whois/Registrant Search
  • Bulk Whois Lookup
  • Bulk Email Verification
Cyber-security Research
  • Threat Intelligence Platform
  • Threat Intelligence API
Custom Solutions
  • Whois Api Software Package
  • Registrar Whois Service
  • Internet Statistics Reports
Enterprise Packages
  • Enterprise API Package
  • Enterprise Data Feed Packages
  • Enterprise Tools Packages
Data Feeds
  • Whois Database Download
  • Website Contact Database
  • Newly Registered Domains
  • Website Classification Database
  • Internet Retailer Database
  • Threat Intelligence Data Feeds
  • All Registered Domains
  • Domain IP Database
  • Real-time Domain Registration
  • IP Geolocation Data Feed
  • IP Netblocks Whois Data Feed
SUBSCRIBE
MOBILE APPLICATION

Need access to whois data on the go?
Install our application on your device!

"Who Owns This Website"

THREE-YEAR GROWTH 1,640%

TOP IT SERVICES COMPANIES

Terms Of Use | Privacy Policy | Affiliate | Contact Us |
©2014-2021 Whois API, Inc. All rights reserved.
Header
Message
Loading.....