# Lyko Autocomplete API Documentation

<p><strong>Lyko Autocomplete API</strong> returns the public search suggestions for a query prefix. Each item has the suggestion text and the search url it opens. Analytics fields from the source are removed.</p><p><strong>Cost:</strong> 1 credit per request. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/lyko-api/lyko_autocomplete](https://scrappa.co/docs/lyko-api/lyko_autocomplete)
- **API group:** Lyko API
- **Endpoint:** `GET https://scrappa.co/api/lyko/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 | Query prefix, 1 to 100 characters. |
| `locale` | string | No | Site path. Default sv. |

## Example response

```json
{
    "data": {
        "suggestions": [
            {
                "url": "/sok?q=serum",
                "text": "serum"
            }
        ]
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
|  | Validation error | No query was sent |

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