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.
From 5,265 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 397ms | 423ms | 473ms | 853ms | 1232ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
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.
Response
A JSON object with the following fields or an error if the request is unsuccessful. The exact set of fields returned varies by the domain's TLD and registrar — some fields below may be absent for a given domain, and some TLDs return additional fields such as emails.
domain_nameThe domain name that was queried.
registrarName of the domain registrar.
registrar_urlURL of the domain registrar. Not returned for all TLDs.
whois_serverWHOIS server used for the query. Not returned for all TLDs.
updated_dateUnix timestamp of when the domain was last updated.
creation_dateUnix timestamp of when the domain was created.
expiration_dateUnix timestamp of when the domain expires.
name_serversArray of name server hostnames.
dnssecDNSSEC status (e.g.,
signeddelegation).emailsContact email(s) from the WHOIS record. Returned only for some TLDs (e.g.
.org); not present for.com.is_euWhether the registrant country is an EU member state.
nullwhen the registrant country is not published — most registrars redact it, so this is unset for the majority of domains.is_eeaWhether the registrant country is in the European Economic Area.
nullwhen the registrant country is not published.is_sepaWhether the registrant country is in the Single Euro Payments Area.
nullwhen the registrant country is not published.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/whois?domain=example.comHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
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.
Frequently Asked Questions
Can I use the Whois API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Whois API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Whois API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Whois API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.What information does the Whois API return for a domain?
A single GET request to/v1/whoisreturns a JSON object with the domain'sregistrar,whois_server,name_serversarray,dnssecstatus, and Unix timestamps forcreation_date,updated_date, andexpiration_date. If the lookup is unsuccessful you'll receive an error instead, as described in our error codes reference.How do I look up a specific domain with the Whois API?
Pass the domain you want to check in the requireddomainquery parameter, for exampledomain=example.com. Note that domains with top-level domains other than .com require a premium subscription.What are some use cases for the Whois API?
You can use theregistrarandexpiration_datefields to monitor domain ownership and upcoming renewals, verify a domain'screation_datefor trust and fraud checks, or auditname_serversanddnssecconfiguration. For complementary domain data, pair it with the DNS Lookup API or the Domain API for availability.How is the Whois API different from the Domain API?
The Whois API retrieves registry details such asregistrar,name_servers, and registration dates via the WHOIS protocol, whereas the Domain API is geared toward basic domain availability. You can also explore related tools like the URL Lookup and MX Lookup APIs.