TLD-API.com
API documentation
Endpoints
GET /v1/domains/<domain> | Single domain lookup. |
POST /v1/domains | Bulk lookup for 1-100 domains. |
GET /v1/availability/<name> | Stream (SSE) a name's availability across registrable ccTLDs. |
POST /v1/query | Query the indexed domain store with a small JSON DSL (filter, sort, paginate). Also serves domain_cache, registrars, and changes. |
GET /v1/query/schema | The query-language catalogue: resources, filterable/sortable fields, operators, and limits. Powers the visual builder. |
GET /v1/health | Service stats. |
GET /v1/tlds/<suffix> | RDAP bases, WHOIS host, and parser for a public suffix. |
GET /v1/registrars | IANA 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:
domains— array of 1-100 domain strings. Order is preserved.fields— optional strict selector string orall.
[
{"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
{ "tld": "com" }— equals (shorthand).{ "tld": ["com", "net"] }— in-list (array shorthand).{ "dates.expires": { "$lt": "2027-01-01" } }— range:$gt,$ge,$lt,$le.{ "registrar.name": { "$exists": true } }— null check.$and,$or,$not— logic, nestable. A bare array (or multiple keys in one object) is an implicit$and.
{
"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, handle | Domain identity and registry handle. |
registrar | name, iana_id, url, country, whois_server, rdap_url, reseller. |
status, dates | EPP status codes and ISO dates for created, updated, and expires. |
registrant, admin, tech | Contact fields: privacy, name, org, email, phone, address fields, and country. |
abuse | Registrar abuse email and phone when available. |
dns | Nameservers, DNSSEC delegates, and web/mail/TXT record groups with original TTLs. |
meta | Fetched time and lookup timings. |
Errors
{"error":{"code":"invalid_domain","message":"Invalid domain","domain":"localhost"}}400 | invalid_domain, bad_request, or bad_fields. |
404 | not_found. |
422 | too_many_domains. |
502 / 503 | Upstream lookup failures or temporary WHOIS cooldowns. |