# Dunelm Autocomplete API Documentation

<p><strong>Dunelm Autocomplete API</strong> returns public search suggestions for a query. Each suggestion has text, a url and a type. The <code>query</code> echoes the request. When the public service supplies no url, the suggestion url is a dunelm.com search url for its text; when it supplies no type, the type is <code>suggestion</code>. Brand and category attributes and the attribution token are returned when the public service supplies them. Up to 20 suggestions can be requested.</p><p><strong>Credits:</strong> 1 credit per successful request. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/dunelm-api/dunelm_autocomplete](https://scrappa.co/docs/dunelm-api/dunelm_autocomplete)
- **API group:** Dunelm API
- **Endpoint:** `GET https://scrappa.co/api/dunelm/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 | Partial search query, for example sofa. |
| `limit` | integer | No | Maximum suggestions, up to 20. Default 5. |

## Example response

```json
{
    "data": {
        "query": "sofa",
        "brands": [
            "Dunelm"
        ],
        "source": "dunelm",
        "categories": [
            "Home and Furniture > Sofa Beds"
        ],
        "suggestions": [
            {
                "url": "https://www.dunelm.com/search?q=sofa%20bed",
                "text": "sofa bed",
                "type": "suggestion",
                "attributes": []
            }
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | Send a query of 1 to 100 characters. This response is not billed. |
| 503 | Upstream Unavailable | Dunelm autocomplete is temporarily unavailable. Not billed. |

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