Loading
Loading
Explore the complete API reference with detailed request parameters, response fields, error codes, and code examples: visit API Reference.
Include domain names or URLs in the request body. Our API will return the corresponding WHOIS data for each entry, providing precise and detailed information to meet your requirements.
To customize the response format for your Bulk WHOIS Lookup API, use the format parameter in your request. By default, the API returns responses in JSON format. To receive the data in XML format, simply set the format query parameter to xml. This customization ensures that you receive bulk WHOIS data in the format that best suits your needs, whether for comprehensive domain analysis or streamlined integration. This flexibility enhances your experience with our API, providing convenience and adaptability for both JSON and XML preferences.
Every distinct domain you send gets its own entry in bulk_whois_response, carrying its own domain_name. The entries do not come back in the order you sent them, so match them to your list by name, not by position. A URL comes back as its domain, and a name sent twice returns one entry. Check status first. There are three cases:
true entry with domain_registered: "yes" carries the full record. It is charged 18 credits.true entry with domain_registered: "no" is a normal result that carries only status, domain_name, query_time and domain_registered. It is charged like any successful lookup, and it means no registration record was found. For availability, use the Domain Availability API.false entry, such as an unsupported extension or a string that is not a domain, has a status_code of 403 and an error. It is not charged. A 403 for an unsupported extension is permanent, so remove the name instead of retrying it.The batch below holds one of each kind.
Branch on the three cases in code. For any other status: false entry, read status_code and error before you decide whether to retry. A request with more than 100 domains is rejected with 413. To get XML instead of JSON, add format=xml to the request URL.
One request takes 100 domains, so a list of 10,000 is 100 requests sent one after another. Split the list into groups of 100, send each group and read bulk_whois_response. Match results to your list by domain_name, not by position: every entry carries it, failed ones included, and the order of the entries can differ from the order you sent. Skip permanent 403 entries on a retry; failed domains are not charged. Save each batch as it returns, so a run that stops partway restarts from the last batch you saved and you do not pay again for domains you already have. This script reads a text file with one domain per line and writes a CSV.
The API returns the current record of each domain, so watching a list means saving each run and comparing it with the last. Run the same list on a schedule, save the fields you care about for each domain, and report any domain whose saved fields differ from the new ones. A moved expiry date, a changed registrar, a dropped transfer lock, new name servers or a lookalike that turned from "no" to "yes" all show up as a difference. For records from before your first saved run, use the WHOIS History API.
import requestsimport jsonurl = "https://api.apifreaks.com/v2.0/domain/whois/live"payload = json.dumps({"domainNames": ["google.com","microsoft.com"]})headers = {'Content-Type': 'application/json','X-apiKey': 'YOUR_API_KEY'}response = requests.request("POST", url, headers=headers, data=payload)print(response.text)