# Get   /v1/sub-domains

Returns the available sub-domains and their parameter definitions for one or more search domains.

Does not consume free or paid search quota · Does not count as search usage.

#### Request Parameters

| FIELD | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| domain | string[] | Yes | Repeat the query parameter to request multiple domains. |

> Multiple domains: use ?domain=code&domain=finance. Do not send domains or a comma-separated list.

Repeated values do not produce duplicate entries. Unknown domains return HTTP 200 with an empty data.domains array.

#### Request Example

```bash
curl 'https://api.anysearch.com/v1/sub-domains?domain=code&domain=finance' \
  -H "Authorization: Bearer YOUR_ANYSEARCH_API_KEY"
```

#### Response Format

| FIELD | DESCRIPTION |
| --- | --- |
| data.domains | Requested domain capability list. |
| sub_domains | Available sub-domain definitions. |
| sub_domain | Full capability tag, for example code.snippet. |
| params | Parameter definitions keyed by name; omitted when the sub-domain has no parameters. Each definition includes description, required, and sort_order. |

#### Response Example

```json
{
  "code": 0,
  "message": "success",
  "request_id": "3c7e91b5-6a24-4fd8-b310-2e9a6c54f781",
  "data": {
    "domains": [{
      "domain": "code",
      "description": "Developer documentation and code search",
      "sub_domains": [{
        "sub_domain": "code.snippet",
        "description": "Search real code implementations",
        "params": {
          "lang": {"description": "Filter by programming language", "required": false, "sort_order": 0}
        }
      }]
    }, {
      "domain": "finance",
      "description": "Financial data and market information",
      "sub_domains": [{
        "sub_domain": "finance.quote",
        "description": "Real-time and historical quotes for stocks, forex, crypto, commodities, indices, ETFs, futures",
        "params": {
          "type": {"description": "Asset type. Values: `stock` (global stocks + A-shares), `forex` (foreign exchange), `crypto` (cryptocurrency), `commodity` (commodities), `index` (Chinese indices), `etf` (Chinese ETFs)", "required": true, "sort_order": 0}
        }
      }]
    }]
  }
}
```

#### Error Responses

| STATUS | DESCRIPTION |
| --- | --- |
| 400 | The domain query parameter is missing. |
| 429 | Request rate limit exceeded. |
| 502 | Domain definitions failed to load. |

### missing domain

```json
{
  "code": -1,
  "message": "At least one domain parameter is required.",
  "request_id": "9a4d2f68-1b75-4c3e-8f20-6d91a7b5c432"
}
```
