# Request parameters

Send a `POST` request to `https://api.zyte.com/v1/search`.

| Field             | Type     | Required   | Description                                                                                                              |
|-------------------|----------|------------|--------------------------------------------------------------------------------------------------------------------------|
| `domain`          | string   | Yes        | A supported search domain. Unsupported domains return a 400 error.                                                       |
| `query`           | string   | Yes        | The search keywords (1-2048 characters). URL-encoded automatically.                                                      |
| `include`         | string[] | No         | What to return: `"html"` (raw HTML), `"organic"` (parsed results), `"aiOverview"` (coming soon). Defaults to `["html"]`. |
| `maxResults`      | integer  | No         | Number of organic results: 10, 20, 30 … 100. Default: `10`. Request weight = `max(1, maxResults / 10)`.                  |
| `queryParameters` | object   | No         | Additional engine-specific query parameters. See below.                                                                  |

## queryParameters

Controls geo-targeting and other search modifiers. Two styles are
supported via the `style` field.

### Engine-specific style

Pass engine-native parameters directly. Set `style` to `"engineSpecific"`.

```json
{
    "domain": "search.engine.com",
    "query": "web scraping tools",
    "queryParameters": {
        "style": "engineSpecific",
        "gl": "us",
        "hl": "en"
    }
}
```

Supported engine-specific fields:

| Field   | Example       | Purpose                                   |
|---------|---------------|-------------------------------------------|
| `gl`    | `"us"`        | Geographic limit (country)                |
| `hl`    | `"en"`        | Interface language                        |
| `cr`    | `"countryUS"` | Country restrict                          |
| `lr`    | `"lang_en"`   | Language restrict                         |
| `safe`  | `"active"`    | SafeSearch (`"active"` or `"off"`)        |
| `nfpr`  | `1`           | Disable autocorrect                       |
| `uule`  | `"w+CAI..."`  | Encoded location for city-level targeting |

### Generic style

A portable, engine-agnostic interface. Set `style` to `"generic"`.

```json
{
    "domain": "search.engine.com",
    "query": "web scraping tools",
    "queryParameters": {
        "style": "generic",
        "geolocation": "US",
        "locale": "en-US"
    }
}
```

| Field         | Example   | Maps to    |
|---------------|-----------|------------|
| `geolocation` | `"US"`    | `gl=US`    |
| `locale`      | `"en-US"` | `hl=en-US` |

## Error responses

|   HTTP | Type                            | When                              |
|--------|---------------------------------|-----------------------------------|
|    400 | `/request/domain-not-supported` | Domain is not supported           |
|    400 | `/request/max-results-invalid`  | `maxResults` is not a valid value |
|    401 | `/auth/key-not-found`           | Missing or invalid API key        |
|    429 | `/limits/over-search-limit`     | Rate limit exceeded               |
