---
title: "Whois API"
method: GET
path: "/api/v1/domain/whois"
tags: ["Domain"]
---

# Whois API

`GET /api/v1/domain/whois`

## Request

- Base URL: `https://xranks.com`
- URL: `https://xranks.com/api/v1/domain/whois`
- Auth: API key in header `Authorization`

Get the registration record of a domain as clean JSON instead of raw whois text: who the registrar is, when the domain was created, when it expires, its status codes and its name servers.

Use cases: Watch domains that are about to expire; Check domain age as a trust signal; See which registrar and DNS host a site uses.

## Query parameters

- `domain` string, required

## Response `200`

Data for the domain. May instead be an Error object (HTTP 200) when the domain is unknown.

- union
  - WhoisResponse
    - `domain` string, required: The domain you asked for.
    - `whois` object, required
      - `registrar` string, nullable: Registrar name.
      - `creation_date` string, date-time, nullable: When the domain was first registered.
      - `expiration_date` string, date-time, nullable: When the current registration expires.
      - `updated_date` string, date-time, nullable: Last change to the record.
      - `status` string[]: EPP status codes, e.g. clientTransferProhibited.
      - `dns_servers` string[]: Name servers.
  - Error
    - `error` string, required: Human-readable message.
    - `code` 'missing_api_key' | 'invalid_api_key' | 'inactive_api_key' | 'quota_exceeded' | 'invalid_domain' | 'domain_not_found' | 'no_data' | 'unknown_service' | 'too_many_domains' | 'invalid_request': Stable machine-readable code.

## Other responses

- `401`: Missing, invalid or inactive API key.
- `429`: Quota used up for the rolling 30 days (or the batch needs more lookups than are left).

---

[API](https://skmtc.dev/xranks/apis/xranks-domain-data-api.md) · [All operations](https://skmtc.dev/xranks/apis/xranks-domain-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xranks/apis/xranks-domain-data-api/revisions/c1c3388c4b34?raw)
