TLD-API.com

API documentation

Endpoints

GET /v1/domains/<domain>Single domain lookup.
POST /v1/domainsBulk lookup for 1-100 domains.
GET /v1/availability/<name>Stream (SSE) a name's availability across registrable ccTLDs.
POST /v1/queryQuery the indexed domain store with a small JSON DSL (filter, sort, paginate). Also serves domain_cache, registrars, and changes.
GET /v1/query/schemaThe query-language catalogue: resources, filterable/sortable fields, operators, and limits. Powers the visual builder.
GET /v1/healthService stats.
GET /v1/tlds/<suffix>RDAP bases, WHOIS host, and parser for a public suffix.
GET /v1/registrarsIANA registrar directory mirror. Filter via /v1/query (resource: registrars).

Single Lookup

curl https://tld-api.com/v1/domains/google.com

The default response is sparse: null leaves, empty arrays, and empty objects are removed. DNS enrichment is included when it finishes within the short lookup budget.

Projection

curl 'https://tld-api.com/v1/domains/google.com?fields=dates.expires,registrar.name'

fields is a comma-separated list of dotted paths. Use fields=all for the full normalized record with nulls preserved.

Field selectors are strict. Unknown paths or invalid syntax return bad_fields.

Bulk Lookup

curl -X POST https://tld-api.com/v1/domains \
  -H 'Content-Type: application/json' \
  -d '{"domains":["google.com","orania.co.za"],"fields":"registrar.name,dates.expires"}'

Request body:

[
  {"input":"google.com","ok":true,"domain":"google.com","data":{...}},
  {"input":"bad.invalid","ok":false,"error":{
    "code":"not_found","message":"Domain not found","domain":"bad.invalid","tld":"invalid"
  }}
]

Query

Build queries visually at /query, or POST to /v1/query directly. The where clause is a small JSON DSL for filtering a resource by field value, list, range, or existence.

curl -X POST https://tld-api.com/v1/query \
  -H 'Content-Type: application/json' \
  -d '{"where":{"tld":"com","dates.expires":{"$lt":"2027-01-01"}},"fields":"domain,registrar.name,dates.expires"}'

The where DSL

{
  "where": {
    "$and": [
      { "tld": ["com", "net"] },
      { "registrar.iana_id": "292" },
      { "dates.expires": { "$lt": "2027-01-01" } }
    ]
  },
  "fields": "domain,tld,registrar.name,dates.expires",
  "sort": [{ "field": "dates.expires", "dir": "asc" }],
  "limit": 50
}

The default resource is domains (registered records; filter state to reach the negative cache). Set resource to registrars or changes for those tables. Project only the fields you need — nested data is fetched lazily, so scalar-only queries stay cheap. See /v1/query/schema for every field and operator.

{
  "resource": "registrars",
  "where": { "is_vip": 1 },
  "fields": "iana_id,name,status,rdap_url,seen_count",
  "sort": [{ "field": "seen_count", "dir": "desc" }]
}

Fields

domain, tld, unicode_name, handleDomain identity and registry handle.
registrarname, iana_id, url, country, whois_server, rdap_url, reseller.
status, datesEPP status codes and ISO dates for created, updated, and expires.
registrant, admin, techContact fields: privacy, name, org, email, phone, address fields, and country.
abuseRegistrar abuse email and phone when available.
dnsNameservers, DNSSEC delegates, and web/mail/TXT record groups with original TTLs.
metaFetched time and lookup timings.

Errors

{"error":{"code":"invalid_domain","message":"Invalid domain","domain":"localhost"}}
400invalid_domain, bad_request, or bad_fields.
404not_found.
422too_many_domains.
502 / 503Upstream lookup failures or temporary WHOIS cooldowns.