# Wish Autocomplete API Documentation

<p><strong>Wish Autocomplete API Documentation</strong> Get the public typeahead suggestions Wish shows for a search prefix. The answer is a flat list of terms. Use a term as the query of the search endpoint. Empty and failed requests are never charged. 1 credit per answer with data.</p>

- **Documentation:** [https://scrappa.co/docs/wish-api/wish_autocomplete](https://scrappa.co/docs/wish-api/wish_autocomplete)
- **API group:** Wish API
- **Endpoint:** `GET https://scrappa.co/api/wish/autocomplete`

## 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 | Search prefix, e.g. phone. |

## Example response

```json
{
    "data": {
        "query": "phone",
        "suggestions": [
            "phone case",
            "phone holder"
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The query is missing or invalid. |

## 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)
