# PriceSpy Autocomplete API Documentation

GET /api/pricespy/autocomplete returns product ids, names, prices, image URLs and category filter ids from a keyword. Use an id with the product and price-history endpoints.

- **Documentation:** [https://scrappa.co/docs/pricespy-api/pricespy_autocomplete](https://scrappa.co/docs/pricespy-api/pricespy_autocomplete)
- **API group:** PriceSpy API
- **Endpoint:** `GET https://scrappa.co/api/pricespy/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 |
| --- | --- | --- | --- |
| `q` | string | Yes | Search keyword, e.g. iphone. |

## Example response

```json
{
    "meta": {
        "attempts": 1,
        "billable": true
    },
    "success": true,
    "suggestions": [
        {
            "id": "12345",
            "name": "Apple iPhone",
            "price": {
                "value": 699,
                "currency": "GBP"
            },
            "category_id": "42"
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | One or more query parameters failed validation. |
| 503 | Upstream Unavailable | The public source is temporarily unavailable through every approved route. |

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