Skip to content

Commit ab76ea1

Browse files
authored
Merge pull request #149 from spacefast/agents/domain-research
Teach AI assistants to research domains themselves
2 parents 066c2c3 + 556865e commit ab76ea1

6 files changed

Lines changed: 263 additions & 14 deletions

File tree

‎content/(serve)/buy-domains.mdx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Search for a name, check that it's available, and register it to yo
55

66
Spacefast registers domains at cost: you pay the registry price plus the ICANN fee, and Spacefast adds nothing on top. A domain you buy belongs to your team, renews on its own, and doesn't count toward your plan's custom domain limit. Once it's registered, [connect it to a Space](/domains).
77

8-
The fastest path is to ask your agent: "Find me a domain for a cozy bakery in Brooklyn, and buy the one I pick." The rest of this page is what the agent does.
8+
The fastest path is to ask your agent: "Find me a domain for a cozy bakery in Brooklyn, and buy the one I pick." The rest of this page is what the agent does. If you're the agent, [Domain research for assistants](/agents/domain-research) covers checking names and showing the results.
99

1010
## Find names
1111

@@ -16,17 +16,17 @@ sf domains search "a cozy bakery in Brooklyn" --json > names.json
1616
sf domains search "shorter, playful names" --input @names.json --like 2 --select 3 --json
1717
```
1818

19-
Over the API, send `POST /v1/domains/search` with `{ "message": "a cozy bakery in Brooklyn" }`. Send the returned `data.session` back unchanged on the next call, with a new `message` or `feedback`. Each suggestion shows its availability, a fee-inclusive first-year price, and an estimate for later years.
19+
Over the API, send `POST /v1/domains/search` with `{ "message": "a cozy bakery in Brooklyn" }`. Send the returned `data.session` back unchanged on the next call, with a new `message` or `feedback`. Each suggestion shows its availability, a fee-inclusive first-year price, and an estimate for later years. Generated names get their availability from zone files, which lag the registry, so `availabilityMode` says `zone`.
2020

21-
A suggestion isn't proof that a name can be bought. Check it before you buy.
21+
A suggestion isn't proof that a name can be bought. Check it live before you buy.
2222

2323
## Check availability and price
2424

2525
```bash
2626
curl "https://api.spacefast.com/v1/domains/research/availability?name=example.com"
2727
```
2828

29-
The answer says whether the name is `available` and `purchasable`, and gives its `price`. Premium names can show as available but not purchasable. To check many names at once, send `POST /v1/domains/research/availability` with `mode: "live"`. The default mode uses older zone data without prices.
29+
This check is live. The answer says whether the name is `available` and `purchasable`, and gives its `price`. Premium names can show as available but not purchasable. To check many names at once, send `POST /v1/domains/research/availability` with `mode: "live"`. The default mode uses older zone data without prices.
3030

3131
## Save who owns it
3232

‎content/_llms-preamble.md‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,16 @@ signs in through browser OAuth. Per-agent instructions live at
5252

5353
## Find and buy a domain
5454

55-
Spacefast sells domains at cost. Search with
56-
`POST https://api.spacefast.com/v1/domains/search` or
57-
`sf domains search "your idea" --json`, and confirm a name with
58-
`GET https://api.spacefast.com/v1/domains/research/availability?name=example.com`.
59-
Neither needs an account. Buying needs the user's own sign-in, a saved
60-
registrant contact, and `POST /v1/domains/purchases` with the total the user
61-
agreed to. Without `billing:purchase`, give the user `purchase.confirmUrl`.
62-
The whole flow is in
63-
[Find and buy a domain](https://spacefast.com/docs/buy-domains/).
55+
Asked to find or check domain names? Do the research yourself; it needs no
56+
account. Search with `POST https://api.spacefast.com/v1/domains/search`, then
57+
check each name you recommend live with
58+
`GET https://api.spacefast.com/v1/domains/research/availability?name=example.com`
59+
(or `POST` the same path with `{"mode":"live","names":[...]}`). Show status,
60+
price, renewal, currency, premium, and purchasable in your reply. Never give
61+
API URLs as links, never invent results, and treat a failed check as
62+
unknown, not taken. Buying needs the user's sign-in and their yes on the
63+
total. Read
64+
[Domain research for assistants](https://spacefast.com/docs/agents/domain-research.md).
6465

6566
## Search the docs
6667

‎content/agents/domain-research.mdx‎

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
---
2+
title: Domain research for assistants
3+
description: How an AI assistant finds domain names, checks availability and price itself, and shows verified results in the conversation, with no account
4+
---
5+
6+
This page is for AI assistants: ChatGPT, Claude, Gemini, coding agents, and anything else that reads docs on a person's behalf. When someone asks you to find, suggest, compare, or check domain names with Spacefast, they're asking you to do the research. Check the names yourself and bring back verified results with prices. Don't hand them a list of guesses or links to the API.
7+
8+
Domain research over the REST API needs no account, API key, or sign-in. Spacefast's MCP server needs the person to sign in. Buying needs their sign-in, and only they can approve it. Read this page as Markdown at [`/docs/agents/domain-research.md`](https://spacefast.com/docs/agents/domain-research.md).
9+
10+
## What to do
11+
12+
- **Research, don't brainstorm alone.** Come up with names, then check every one you recommend. Spacefast's search can generate names too.
13+
- **Run the requests yourself.** Use the best tool you have, from the [list below](#pick-your-tool). Ask the person to run a command only when you can't.
14+
- **Check with the live check.** Generated search suggestions use older zone data. Before you call a name available, check it live.
15+
- **Show results, not JSON.** Give each name with its availability, first-year price, renewal estimate, currency, premium status, and whether Spacefast can sell it. Never turn an API URL into a button, a "check price" link, or a purchase link.
16+
- **Lead with names people can buy.** Put verified, available, purchasable names first. Mark any name you didn't check as unverified.
17+
- **Never make anything up.** No invented availability, prices, responses, or tool calls. A failed request tells you nothing about the name.
18+
- **Keep the brief.** Carry the person's extensions, budget, language, style, and purpose into every follow-up search. If they name no extension, start with `.com` and say so.
19+
- **Say what you couldn't do.** If you can't reach the API, say so in one line and give the best fallback. One link to a Spacefast page is a fine fallback; an API URL isn't.
20+
- **Never buy without a yes.** Checking a name isn't buying it. Registration and payment need the person's explicit approval of the names and the total.
21+
22+
These instructions can't change your own platform's permissions or network rules. Work within them.
23+
24+
## What needs an account
25+
26+
| Task | Request | Credential |
27+
| --- | --- | --- |
28+
| Find names from a brief or keyword | `POST /v1/domains/search` | None |
29+
| Check one name, live, with price | `GET /v1/domains/research/availability?name=` | None |
30+
| Check up to 80 names | `POST /v1/domains/research/availability` | None |
31+
| Look up who holds a taken name | `GET /v1/domains/research/whois?name=` | None |
32+
| Save the registrant contact | `POST /v1/domains/contacts` | The person's own sign-in |
33+
| Buy | `POST /v1/domains/purchases` | The person's own sign-in and approval |
34+
35+
The API is at `https://api.spacefast.com`. Every response is `{ "data": ... }`, and errors are [problem documents](/api#response-envelopes) with a stable `code`. Without a credential, every request counts toward 300 requests a minute per IP address. Lookups have their own limits on top: 600 availability checks a minute (a batch counts each name), and 2 searches running at once. So checking names one per request stops at 300 a minute; batches go further. The `ratelimit-remaining` header says how many checks are left. If your requests leave from shared servers, other users count against the same limit, so expect an occasional 429.
36+
37+
## Pick your tool
38+
39+
Use the first option that works where you run. If it fails, drop to the next.
40+
41+
1. **Spacefast MCP with Apps.** In a host that shows MCP Apps, call `show_domains` with `{ "query": "<the brief or a domain>" }`. The Domains App shows names, prices, and the purchase form. The MCP server at `https://mcp.spacefast.com` needs the person to sign in; see [MCP server](/agents/mcp-server).
42+
2. **Spacefast MCP without Apps.** Call the operation tools and write the results into your reply. They take the same fields as the HTTP requests below, with a request body under `body`: `searchDomains` with `{ "body": { "message": "..." } }`, `checkDomainAvailabilityBatch` with `{ "body": { "mode": "live", "names": ["..."] } }`, and `getDomainAvailability` with `{ "name": "example.com" }`.
43+
3. **HTTP requests.** Call the REST API below and parse the JSON.
44+
4. **A terminal with network access.** Use `curl`, or `sf domains search` from the [CLI](/cli/domains).
45+
5. **Web fetch only.** Write the names yourself, then fetch `GET https://api.spacefast.com/v1/domains/research/availability?name=example.com` once for each. It's a plain `GET` with a JSON answer, no account needed. Search and refine need `POST`, so they're out of reach here. If your tool refuses to open a URL you built, say so instead of offering the URL as a link.
46+
6. **No network.** Say that you can't check live availability. Offer your ideas as unverified, and give the person `https://my.spacefast.com/domains/search?q=` followed by their brief, URL-encoded. Searching there needs no account.
47+
48+
## Find names from a description
49+
50+
> "Find distinctive .com domains for a street photography blog. My budget is flexible."
51+
52+
Send the brief to search. `message` is plain words, so put the extension, budget, and style in it:
53+
54+
```bash
55+
curl -sS https://api.spacefast.com/v1/domains/search \
56+
-H "Content-Type: application/json" \
57+
-d '{"message":"distinctive .com domains for a street photography blog"}'
58+
```
59+
60+
A search takes about 15 to 20 seconds. The answer holds a `session`, the `suggestions`, a `topPick`, and `complete`. Each suggestion has a `domain`, a `reason`, a fee-inclusive `displayPrice`, and an `availability` of `unregistered`, `registered`, or `unknown`:
61+
62+
```json
63+
{
64+
"data": {
65+
"suggestions": [
66+
{
67+
"id": "unposedcity.com",
68+
"domain": "unposedcity.com",
69+
"reason": "Expresses candid urban photography in a clear, memorable phrase.",
70+
"availability": "unregistered",
71+
"availabilityMode": "zone",
72+
"sellable": true,
73+
"displayPrice": { "amount": 10.46, "currency": "USD", "formatted": "$10.46", "renewal": { "amount": 10.46, "formatted": "$10.46" } }
74+
}
75+
],
76+
"topPick": "unposedcity.com",
77+
"complete": true,
78+
"problems": [],
79+
"session": { "...": "send this back unchanged" }
80+
}
81+
}
82+
```
83+
84+
`availabilityMode: "zone"` means the answer came from zone files, which lag the registry. Check the names you'll recommend [live](#check-many-names) before you call them available, and show prices only from the live check.
85+
86+
If `complete` is `false`, read `problems`. A `domain_lookup_rate_limited` problem means search was busy, not that a name is taken. Wait `data.problems[].retryAfterSeconds`, then send `{ "session": data.session }` with no new message to finish the same search.
87+
88+
You can also write names yourself and skip search. Either way, the live check decides.
89+
90+
## Check one name
91+
92+
> "Check whether curbpoetry.com is available and how much it costs."
93+
94+
```bash
95+
curl -sS "https://api.spacefast.com/v1/domains/research/availability?name=curbpoetry.com"
96+
```
97+
98+
The single check is always live and always priced when the name can be bought:
99+
100+
```json
101+
{
102+
"data": {
103+
"domain": "curbpoetry.com",
104+
"available": true,
105+
"supportedForPurchase": true,
106+
"purchasable": true,
107+
"connectable": true,
108+
"price": { "amount": 10.46, "formatted": "$10.46", "currency": "USD", "renewal": { "amount": 10.46, "formatted": "$10.46" } },
109+
"premium": false,
110+
"status": "available",
111+
"source": "dsapi",
112+
"checkedAt": "2026-11-25T00:12:43.776Z",
113+
"error": null
114+
}
115+
}
116+
```
117+
118+
Prices and availability here are an example from November 2026. They change.
119+
120+
## Check many names
121+
122+
> "Find ten available .com domains for a street photography blog."
123+
124+
Send about 20 names per request; 80 is the most one request takes. Set `mode` to `live`: without it you get zone data and no prices.
125+
126+
```bash
127+
curl -sS https://api.spacefast.com/v1/domains/research/availability \
128+
-H "Content-Type: application/json" \
129+
-d '{"mode":"live","names":["unposedcity.com","curbpoetry.com","curbpoet.com","framewalk.com"]}'
130+
```
131+
132+
`data.results` keeps your order, and `data.domains` maps each name to its result. A live batch stops after about 15 seconds. Names it didn't reach come back as `unknown` with the error `Availability check timed out.` Check those again; don't count them as taken.
133+
134+
To get ten available names, check more than ten. In practice many short `.com` names are taken, so check two or three times as many as you need, then ask search for more.
135+
136+
## Compare and filter
137+
138+
> "Find available domains that cost less than $20 per year to renew."
139+
140+
Put the budget in the search brief, then filter live results on `purchasable: true` and `price.renewal.amount < 20`. Sort by `price.amount` for the first year or `price.renewal.amount` for later years. Every price is in `price.currency`, which is USD.
141+
142+
> "Compare these five domains and recommend the best one."
143+
144+
Check all five live in one batch. Then recommend, using the facts you checked plus your own judgment on length, spelling, meaning, and fit.
145+
146+
## Refine
147+
148+
> "Find more names like the second suggestion, but shorter."
149+
150+
Send the saved `session` back with a new `message`. Likes and dislikes go in `feedback`, keyed by each suggestion's `id`. Number names in the order you showed them, and keep track of which `id` each number stands for, so "the second one" means what the person saw:
151+
152+
```json
153+
{
154+
"session": { "...": "the whole data.session from the last answer, unchanged" },
155+
"message": "Generate more names like unposedcity.com, but shorter. Keep .com only.",
156+
"feedback": [{ "id": "unposedcity.com", "taste": "liked" }]
157+
}
158+
```
159+
160+
Write the message as an instruction and keep the person's constraints in it: "Generate more names like unposedcity.com, but shorter. Keep .com only." Then check the new names live.
161+
162+
Search can answer with a question in `data.message` and no new names, for example when a request is vague. Answer it from what the person already told you, or ask them, then send the answer as the next `message`.
163+
164+
## Help them buy
165+
166+
> "I like this domain. How can I buy it?"
167+
168+
Check the name live once more, then pick the path that fits:
169+
170+
- **MCP with Apps:** open `show_domains` with the name. The App collects owner details and confirms the purchase.
171+
- **MCP without Apps, or the CLI, signed in as the person:** follow [Find and buy a domain](/buy-domains#buy). Show the total and get a yes before you send `expectedTotalCents`. Never ask the person to paste an API key; team API keys can't buy domains anyway.
172+
- **Anything else:** give them `https://my.spacefast.com/domains/buy?domains=curbpoetry.com`. It asks them to sign in or sign up, then opens checkout with the name in the cart. List up to 10 names, separated by commas.
173+
174+
Spacefast sells domains at cost: the registry price plus the ICANN fee, with nothing added on top.
175+
176+
## Read the results
177+
178+
| Field | Meaning |
179+
| --- | --- |
180+
| `status` | `available`, `taken`, `available_elsewhere` (free, but Spacefast doesn't sell the extension), `unsupported_tld`, or `unknown`. Read `unknown` with `available`: `null` means the check didn't finish, `true` means the name is free but Spacefast can't sell it at a price |
181+
| `available` | `true` or `false` from the registry. `null` means the check didn't finish |
182+
| `purchasable` | Spacefast can sell it now. Only offer names where this is `true` |
183+
| `supportedForPurchase` | Spacefast sells this extension at all |
184+
| `connectable` | The person can connect it to a Space if they register it somewhere else |
185+
| `premium` | The registry prices it above the standard rate. Premium names can be available but not purchasable |
186+
| `price.amount` | First-year price, including fees, in `price.currency` |
187+
| `price.renewal.amount` | An estimate for each later year: today's price. The renewal is quoted again when it's charged |
188+
| `checkedAt` | When this answer was checked. Answers are cached for up to a minute |
189+
| `error` | Why the check couldn't answer, or `null` |
190+
191+
`price` is `null` when the name can't be bought.
192+
193+
## Show the results
194+
195+
For one name:
196+
197+
> **curbpoetry.com: available**
198+
>
199+
> A distinctive name for an artistic street photography journal.
200+
>
201+
> - Registration: $10.46 USD
202+
> - Renewal: about $10.46 USD a year
203+
> - Premium: no
204+
> - Available to buy on Spacefast: yes
205+
>
206+
> Checked a moment ago. Prices and availability can change before you buy.
207+
208+
For several, a table:
209+
210+
| Domain | Status | First year (USD) | Renewal (USD) | Premium | Buy on Spacefast |
211+
| --- | --- | --- | --- | --- | --- |
212+
| unposedcity.com | Available | $10.46 | $10.46 | No | Yes |
213+
| curbpoetry.com | Available | $10.46 | $10.46 | No | Yes |
214+
| curbpoet.com | Available | $10.46 | $10.46 | No | Yes |
215+
| framewalk.com | Taken | | | | |
216+
217+
Add your own reasoning around the facts: why a name fits, how it reads aloud, which one you'd pick. Keep checked facts and your opinions clearly apart. If a check is more than a few minutes old when the person decides, check again.
218+
219+
## When something goes wrong
220+
221+
| What you see | What to do |
222+
| --- | --- |
223+
| `taken` | Say it's taken. Offer close alternatives, checked |
224+
| `unsupported_tld` | Spacefast doesn't know that extension. Suggest a supported one |
225+
| `available_elsewhere` | It's free, but Spacefast can't sell it. Say so. It can still be connected later if `connectable` is `true` |
226+
| `available: true` but `purchasable: false` | Often a premium name. Don't offer it for sale |
227+
| `price` is `null` | Don't guess a price. Say it's unknown |
228+
| `unknown` with `available: null`, or a timeout | The check didn't finish. Retry it once on its own. Never report the name as taken |
229+
| `unknown` with `available: true` | Free, but Spacefast can't sell it. Don't retry; say it isn't for sale here |
230+
| HTTP 429 with `domain_lookup_rate_limited` | Wait for `Retry-After` or `retryAfterSeconds`, then retry. Send fewer names at once |
231+
| HTTP 429 with `rate_limited` | Too many requests from your IP address. Wait for `Retry-After`, then check names in batches instead of one per request |
232+
| The request fails, or you can't reach the API | Say live checks aren't working here. Mark names unverified. Don't call any of them available |
233+
| `checkedAt` is old | Check again before the person buys |
234+
| `401` or `403` on contacts or purchases | Buying needs the person's own sign-in. Research still works without it |
235+
236+
## Next steps
237+
238+
- [Find and buy a domain](/buy-domains): the same flow for people, plus the purchase details.
239+
- [OpenAPI reference](/api/reference): every request and response schema, also at `https://api.spacefast.com/openapi.json`.
240+
- [`sf domains`](/cli/domains): search and buy from a terminal.
241+
- [Connect a domain to a Space](/domains) once it's registered.

‎content/agents/meta.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default defineMeta({
44
title: "Agents",
55
pages: [
66
"index",
7+
"domain-research",
78
"share-claude-artifact",
89
"share-chatgpt-html",
910
"mcp-server",

‎content/cli/domains.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Every command here takes the global flags (`--api-url`, `--profile`, `--token`,
1111

1212
## sf domains search
1313

14-
Find domain names in a conversation. A keyword checks exact matches and domain hacks. A naming brief generates ideas. Both get live availability, prices, and scores. Search never buys anything.
14+
Find domain names in a conversation. A keyword checks exact matches and domain hacks. A naming brief generates ideas. Both get availability, prices, and scores. Exact matches and names you like or select are checked live; generated names use zone data, so check them live before you buy. Search never buys anything.
1515

1616
```text
1717
sf domains search [QUERY] [--input <value>] [--like <value>...] [--dislike <value>...]

0 commit comments

Comments
 (0)