# search_available_domains

Source: https://modulify.ai/docs/api/bought-domains/search-available-domains

Checks which domains can be bought for a name, with what each one costs, the same search as the Domains page.

- Title: Search for domains to buy
- Scope: `domains:read`
- Access: Read only
- Endpoint: `POST /v1/search_available_domains`

Modulify sells the extensions Name.com registers, apart from those whose registry needs extra details Modulify cannot collect yet, such as `.us` or `.eu`. A bare name such as `acme` is checked against the extensions Modulify features, such as `.com`, `.net`, `.org`, `.co`, `.io` and `.ai`, and a full domain such as `acme.studio` is checked first, followed by the featured ones. A leading `https://`, a `www.` and anything after the domain are ignored.

The answer carries `Label`, the name searched, `Requested`, the full domain you typed when its extension is on sale, `UnsupportedTld`, an extension you typed that Modulify does not sell, in which case the results cover the bare name, and `Results`, one entry per domain. Each result has `Available`, `Premium`, true when the registry prices the name above its usual rate, `PriceCents`, registering it for `Years` years, the shortest term its extension is sold for, `RenewalPriceCents`, renewing it for `RenewalYears` years, both in US cents, `Owned`, true when this workspace already owns it, and `Pending`, true while the workspace's own registration of that name is not confirmed yet, so `add_custom_domain` still refuses it. `Available` is `false` only when Name.com says the name cannot be registered, which almost always means someone holds it. An `Available` domain with `PriceCents` set to `null` cannot be bought here right now, for example because Name.com could not check it or the name has characters other than a to z, 0 to 9 and hyphens.

Every member of the workspace can search, and one person can run 30 searches a minute, shared with the **Domains** page. To buy a result, read its price for the term you want with `get_domain_price`, then call `buy_domain`. To check names from a website without a token, use the [Domain HTTP API](https://modulify.ai/docs/publish/domain-http-api), whose results carry neither `Owned` nor `Pending`. See [Search for a name](https://modulify.ai/docs/publish/buy-a-domain#search-for-a-name).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/search_available_domains`, sending the inputs below as a JSON object. The token needs the `domains:read` scope.

It only reads and changes nothing, so retrying it is safe.

```bash
curl -X POST https://api.modulify.ai/v1/search_available_domains \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workspaceId":"WORKSPACE_ID","query":"QUERY"}'
```

Over MCP, the same method is the [search_available_domains tool](https://modulify.ai/docs/mcp/bought-domains/search-available-domains).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | string | Yes | The workspace the domain would be bought for. |
| `query` | string | Yes | A name such as `acme`, or a full domain such as `acme.com`. Up to 253 characters. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) of `success`, `message`, `data`, `code` and `version`. `data` holds the result described above, and on a method that returns a total, `count` carries it. The [response headers](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) carry the call's `X-Request-Id` and what is left of your per-minute budget in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. [Errors](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.