# OTTO Search Suggestions API Documentation

Scrappa's `GET /api/otto/suggest` returns the search suggestions OTTO shows while a shopper types. Use it to find the words people search for.

## What you get

`suggestions` is a list of `term` values in OTTO's order. `limit` is 1-20 (default 10).

## Credits

A successful request costs **1 credit**. Errors, blocks and `404` answers cost nothing. The response shows the charge in `meta.credits_charged`.

- **Documentation:** [https://scrappa.co/docs/otto-api/otto_suggest](https://scrappa.co/docs/otto-api/otto_suggest)
- **API group:** OTTO API
- **Endpoint:** `GET https://scrappa.co/api/otto/suggest`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | First letters or words, for example jack. |
| `limit` | integer | No | Number of suggestions, 1-20. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/otto/suggest?query=jack&limit=5"
```

## Example response

```json
{
    "success": true,
    "query": "jack",
    "suggestions": [
        {
            "term": "jacken damen",
            "type": null
        },
        {
            "term": "jacke herren",
            "type": null
        }
    ],
    "meta": {
        "endpoint_family": "otto-suggest",
        "billable": true,
        "attempts": 1,
        "credits_charged": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | OTTO could not be reached in time or answered with a block or an unexpected page (`upstream_unavailable`, `upstream_blocked`, `parser_drift`). Retryable and never billed. Clients are never rate limited. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
