# Komplett Autocomplete API Documentation

`GET /api/komplett/autocomplete` returns public product suggestions. Each hit has a material number that works unchanged in search, product and reviews, plus public category ids.

## What you get

`items` holds `id`, `mpn`, `brand`, `name`, `category_id`, `category_name`, `category_tree` and `url`. This support endpoint is free.

## Credits

This support endpoint costs **0 credits**. Errors cost nothing.

- **Documentation:** [https://scrappa.co/docs/komplett-api/komplett_autocomplete](https://scrappa.co/docs/komplett-api/komplett_autocomplete)
- **API group:** Komplett API
- **Endpoint:** `GET https://scrappa.co/api/komplett/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 words. |
| `store` | string | No | Storefront. Currently no. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/komplett/autocomplete?q=iphone"
```

## Example response

```json
{
    "success": true,
    "data": {
        "items": [
            {
                "id": "1328693",
                "object_id": "1328693",
                "mpn": "MG7F3_no",
                "brand": "Apple",
                "name": "iPhone 17 128 GB",
                "description": null,
                "category_id": "21064",
                "category_name": "Mobiltelefoner",
                "category_tree": [],
                "url": "https://www.komplett.no/product/1328693"
            }
        ],
        "query": "iphone",
        "store": "no",
        "total": 489
    },
    "meta": {
        "endpoint_family": "komplett-autocomplete",
        "billable": false,
        "attempts": 1,
        "credits_charged": 0,
        "unavailable_reason": []
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing, unknown or unsupported. Price and sort filters and later result pages are rejected instead of silently returning page one. Non-billable. |
| 503 | Upstream Unavailable | The storefront could not be reached or changed its page shape (`upstream_blocked`, `upstream_unavailable`, `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)
