Whois API
The Whois API retrieves domain registration information for any given domain using the WHOIS protocol.
For basic domain availability information, check out our Domain API instead.
/v1/whois GET
https://api.api-ninjas.com/v1/whois
Returns domain registration details (e.g. registrar, contact information, expiration date, name servers) for a given domain name.
Parameters
domainrequiredValid domain to check (e.g.
example.com). For top-level domains other than .com, a premium subscription is required.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Sample Request Live Demo!
domain
https://api.api-ninjas.com/v1/whois?domain=example.comHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"domain_name": "example.com",
"registrar": "reserved-internet assigned numbers authority",
"whois_server": "whois.iana.org",
"updated_date": 1628924504,
"creation_date": 808372800,
"expiration_date": 1660363200,
"name_servers": [
"a.iana-servers.net",
"b.iana-servers.net"
],
"dnssec": "signeddelegation"
}Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/whois?domain=example.com" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.