Loading
Loading
Explore the complete API reference with detailed request parameters, response fields, error codes, and code examples: visit API Reference.
Pass the domain in the domainName parameter. The response lists every stored record in whois_domains_historical. Each item is one snapshot, so sort by query_time to read them in order.
See the full list of supported TLDs and SLDs for the extensions covered.
You can also pass a URL. The domain is extracted from it and the history of that domain is returned, so https://www.ai.com/page is read as ai.com. URL-encode the value in the query string.
A sub-domain has no WHOIS record of its own. It relies on the root domain it sits under. When you pass a sub-domain such as api.apifreaks.com, the API looks up the root domain, apifreaks.com, and returns its history.
You do not need to strip the sub-domain first. Check domain_name on each record to see which domain the history belongs to.
The response is cut to the oldest and the newest of the 30 records. Every record names apifreaks.com, not the sub-domain you sent.
Some extensions are registered one level down, under a second-level domain (SLD) such as gov.uk or co.uk. A name such as ons.gov.uk is registered on its own under that SLD, with its own WHOIS record.
The API treats that name as the domain. The history returned is that of ons.gov.uk itself, not of its parent gov.uk. A sub-domain of it, such as www.ons.gov.uk, resolves to ons.gov.uk in the same way.
The response is cut to the oldest and the newest of the 18 records. Fields a registry does not publish, such as the dates on an early record, are left out of a record. The registrar is not always a company: for some registrations it is the registry itself or the organization.
For the extensions covered, see the full list of supported TLDs and SLDs.
The API returns records. What you usually want is the moments something changed. Sort the records, keep the fields you track, and print each change.
Output for ai.com:
Privacy labels such as "redacted for privacy" or a proxy company are not owners. Treat them as "owner hidden" and look at the country, registrar and name servers around them.
Found a real past owner, such as Future Media Architects above? Search that name or email with the Reverse WHOIS API to list every domain they hold today.
import requestsurl = "https://api.apifreaks.com/v1.0/domain/whois/history?domainName=ai.com"payload = {}headers = {'X-apiKey': 'YOUR_API_KEY'}response = requests.request("GET", url, headers=headers, data=payload)print(response.text)