Name.ai developer portal / API
The Name.ai API is a public REST surface for domain search and availability, WHOIS lookup, TLD registration pricing and requirements, and marketplace listings. Every endpoint below works without an account or an API key. The machine-readable contract is an OpenAPI 3.1 document at thenamesmarket.com/openapi.json.
| Method | Path | What it returns |
|---|---|---|
| POST | /api/domain/search | Check whether a domain is available, with alternate-TLD siblings for the same label. |
| POST | /api/tools/whois | WHOIS/RDAP registration details: registrar, registrant, dates, nameservers. |
| GET | /api/pricing/tld | Current USD price to register, renew, transfer or restore on a given TLD. |
| GET | /api/tlds/{tld}/metadata | Registration requirements for a TLD: term range, organization and nameserver rules. |
| GET | /api/market/listings | Browse aftermarket listings. Follow page.next_cursor, or page by offset. |
| POST | /api/batch | Up to 20 of the reads above in one request. GET the same path for the catalogue. |
| POST | /api/domains/bulk/{op} | Apply one operation to up to 1,000 domains you own (signed-in). |
One request, no setup:
curl -s https://thenamesmarket.com/api/pricing/tld?tld=ai
curl -s -X POST https://thenamesmarket.com/api/domain/search \
-H 'Content-Type: application/json' \
-d '{"q":"example.ai"}'
# Several lookups, one round trip
curl -s -X POST https://thenamesmarket.com/api/batch \
-H 'Content-Type: application/json' \
-d '{"operations":[
{"id":"a","op":"search_domain","params":{"q":"acme.ai"}},
{"id":"b","op":"tld_registration_price","params":{"tld":"ai","op":"register"}},
{"id":"c","op":"whois_lookup","params":{"domain":"example.com"}}
]}'/api/v1/.Deprecation and RFC 8594 Sunset headers at least 90 days ahead.RateLimit-* headers; a 429 carries Retry-After.Idempotency-Key header on POST.components.schemas.Error in the spec.page object. Follow page.next_cursor until it is null — a cursor names the row you stopped at, so a listing added or sold while you page cannot shift the window under you. Offset (limit, offset, total) still works, and next_cursor comes back on offset pages too, so you can switch mid-walk. A cursor is only valid for the filters and sort it was issued with; reusing it elsewhere is a 400 invalid_cursor, never a quietly wrong page.POST /api/batch, not forty round trips. Each operation is dispatched to the same handler its single-call equivalent uses and counted the same against the rate limit; one bad entry returns its own 400 without costing you the rest.Official, zero-dependency clients for the endpoints above. Both cover cursor paging and batching, and both work with no account.
npm install nameai-sdk # JavaScript / TypeScript, Node >= 18
pip install nameai # Python >= 3.9import NameAI from 'nameai-sdk';
const nameai = new NameAI();
const { priceCents } = await nameai.tldPrice('ai', 'register');
for await (const listing of nameai.listAllListings({ tld: 'ai' })) {
console.log(listing.domain);
}Source for both: github.com/namekart/nameai_mcp (sdk/ and sdk-python/). They are hand-written rather than generated: six read endpoints do not need a generated transport layer, and a thin client is easier to read than the spec it came from.