DOCUMENTATION

Everything you need to make your first WHOIS lookup. Questions? Contact us.

  1. Create an account and confirm your email.
  2. Copy your API key from the dashboard.
  3. Send a GET request to https://jsonwhois.com/api/v1/whois?domain=google.com with the key in the Authorization header.

The API speaks JSON over HTTPS. Any HTTP client works; no SDK is needed.

Send your API key in the Authorization header of every request:

Authorization: Token token=YOUR_API_KEY

The key cannot be passed as a query parameter. Keep it secret: anyone with the key can spend your lookups.

GET https://jsonwhois.com/api/v1/whois?domain=google.com
ParameterRequiredDescription
domain yes Domain name to look up, for example google.com or bbc.co.uk. A full URL is accepted too: https://www.example.com/page is looked up as example.com. An IPv4 address returns the record of its network.

Code samples

curl -H "Authorization: Token token=YOUR_API_KEY" \
  "https://jsonwhois.com/api/v1/whois?domain=google.com"
# pip install requests
import requests

response = requests.get(
    "https://jsonwhois.com/api/v1/whois",
    params={"domain": "google.com"},
    headers={"Authorization": "Token token=YOUR_API_KEY"},
    timeout=30,
)
record = response.json()
print(record["registrar"]["name"], record["expires_on"])
// Node.js 18+ (built-in fetch)
const url = new URL("https://jsonwhois.com/api/v1/whois");
url.searchParams.set("domain", "google.com");

const response = await fetch(url, {
  headers: { Authorization: "Token token=YOUR_API_KEY" },
});
const record = await response.json();
console.log(record.registrar?.name, record.expires_on);
<?php
$ch = curl_init("https://jsonwhois.com/api/v1/whois?domain=" . urlencode("google.com"));
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => ["Authorization: Token token=YOUR_API_KEY"],
]);
$record = json_decode(curl_exec($ch), true);
curl_close($ch);

echo $record["registrar"]["name"] ?? "", " ", $record["expires_on"];
require "net/http"
require "json"

uri = URI("https://jsonwhois.com/api/v1/whois")
uri.query = URI.encode_www_form(domain: "google.com")

request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Token token=YOUR_API_KEY"

response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 30) { |http| http.request(request) }
record = JSON.parse(response.body)
puts record.dig("registrar", "name"), record["expires_on"]

Response

A request for google.com returns (lists shortened):

{
  "disclaimer": null,
  "domain": "google.com",
  "domain_id": "2138514_DOMAIN_COM-VRSN",
  "status": "registered",
  "available?": false,
  "registered?": true,
  "created_on": "1997-09-15T04:00:00.000Z",
  "updated_on": "2024-08-02T02:17:33.000Z",
  "expires_on": "2028-09-14T07:00:00.000Z",
  "registrar": {
    "id": "292",
    "name": "Markmonitor Inc.",
    "organization": "Markmonitor Inc.",
    "url": null
  },
  "registrant_contacts": [
    {
      "id": null,
      "type": 1,
      "name": null,
      "organization": null,
      "address": null,
      "city": null,
      "zip": null,
      "state": "CA",
      "country": "UNITED STATES",
      "country_code": "US",
      "phone": null,
      "fax": null,
      "email": null,
      "url": null,
      "created_on": null,
      "updated_on": null
    }
  ],
  "admin_contacts": [],
  "technical_contacts": [],
  "nameservers": [
    { "name": "ns1.google.com", "ipv4": null, "ipv6": null },
    { "name": "ns2.google.com", "ipv4": null, "ipv6": null }
  ],
  "raw": "..."
}

Fields

FieldTypeDescription
domainstringThe domain that was looked up, normalized (lower case, no scheme, no www.).
statusstringregistered or available.
registered?, available?booleanThe same as status, as booleans.
domain_idstring or nullRegistry object ID, when the registry publishes one.
created_on, updated_on, expires_onISO 8601 UTC or nullRegistration, last update and expiry dates.
registrarobject or nullid (IANA ID), name, organization.
registrant_contacts, admin_contacts, technical_contactsarrayZero or one contact each. type is 1 for registrant, 2 for administrative, 3 for technical. Most registries now redact personal data, so many fields are null or say REDACTED.
nameserversarrayName servers in lower case, as {"name": ...} objects.
rawstring or nullThe record as published by the registry or registrar: WHOIS text or, for registries that moved to RDAP, the RDAP JSON as a string.
disclaimernullKept for compatibility; always null.

Fields the registry does not publish are null (or empty lists). How much data you get depends on the TLD: some country-code registries, for example .de, publish only the name servers and the last update date.

GET https://jsonwhois.com/api/v1/account

Returns how many lookups your plan includes and how many are left in the current billing period. This request is free.

{
  "remaining_whois": 8735,
  "remaining_screenshots": 50,
  "renewal_date": "2026-12-17T10:00:00.000Z",
  "whois": 10000,
  "screenshots": 50
}

screenshots and remaining_screenshots are legacy fields and can be ignored.

  • Every successful WHOIS lookup counts against your plan's monthly volume. Failed lookups are not counted.
  • Free plan: when the monthly volume is used up, lookups answer {"error": "Limit reached."} until the next billing period.
  • Paid plans: lookups keep working after the volume is used up. Each extra lookup costs $0.01 and is added to your next invoice. We email you when you reach the limit.

See pricing for plans, and the billing page to change your plan, card or invoices.

Errors come back as JSON with an error message.

HTTP statusBodyMeaning
401HTTP Token: Access denied. (plain text)The Authorization header is missing or malformed.
200{"error": "Incorrect API Key"}The header is present, but the key does not exist. Check for typos or a regenerated key.
200{"error": "Limit reached."}Free plan only: the monthly volume is used up.
400{"error": "Domain field is required"}The domain parameter is missing.
400{"error": "… is not a valid domain."}The value could not be read as a domain.
500{"error": "Call failed"}The WHOIS record could not be fetched right now. The lookup is not counted; retry later.

Because some errors are returned with status 200, always check the response for an error key.

JsonWHOIS uses cookies to provide you with the best user experience on our website. They also help us understand how our site is being used. Find out more here. By continuing to use our site you consent to the use of cookies.