await api.domains.search("example"); // across the usual extensions
await api.domains.search("example.com"); // that one
await api.domains.search("example", { tlds: ["fr"] }); // the ones you nameapi.domains.search("example") # across the usual extensions
api.domains.search("example.com") # that one
api.domains.search("example", tlds=["fr"]) # the ones you namequerystringrequiredA name, with or without an extension. Not a phrase.
tldsstring[]Which extensions to try.
Returns
[{ name: "example.com", available: false, priceCredits: null }][{"name": "example.com", "available": False, "priceCredits": None}]namestringThe full name.
availableboolean|nullnull when DNS did not answer clearly. Not a guess.
priceCreditsinteger|nullnull while no registrar is wired — better than a price that is not real.
DNS not answering clearly is a real state, and turning it into « available » would be the expensive kind of wrong. Show « unknown » rather than a guess.
A phrase is refused
It is not a name generator. Asking it to find something for « a bakery in Lyon » returns a refusal rather than a name nobody asked for — which is what it would have to invent.
It reads DNS, not a registry
A name that resolves is taken. A name that does not is probably free — and the registrar is the one that decides, at registration.
Nothing is reserved and nothing is charged
Searching is free and leaves no trace. Attaching is add(), and it works on a domain you already own.