# HolidayCheck Autocomplete API Documentation

<p><strong>HolidayCheck Autocomplete API Documentation</strong> Find HolidayCheck destinations (regions and cities) and hotels by name. Each suggestion has the id, type, name, parent places and a relevance score. Hotel suggestions also have the public HolidayCheck page url. Use the destination id with the hotels endpoint and the hotel id with the hotel and reviews endpoints. hotels_count is capped at 10000 by HolidayCheck. A text without matches is a successful response with empty lists.</p>

- **Documentation:** [https://scrappa.co/docs/holidaycheck-api/holidaycheck_autocomplete](https://scrappa.co/docs/holidaycheck-api/holidaycheck_autocomplete)
- **API group:** HolidayCheck API
- **Endpoint:** `GET https://scrappa.co/api/holidaycheck/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 text, 1 to 100 characters. Example: mallorca. |
| `limit` | integer | No | Maximum number of suggestions, 1 to 20. Defaults to 10. |

## Example response

```json
{
    "data": {
        "query": "mallorca",
        "hotels": [
            {
                "id": "90a9d6db-5941-446f-91ba-9a4a2893ab95",
                "url": "https://www.holidaycheck.de/hi/x/90a9d6db-5941-446f-91ba-9a4a2893ab95",
                "name": "Alua Calas de Mallorca Resort",
                "type": "HOTEL",
                "score": 972.15,
                "parents": [
                    "Cales de Mallorca / Calas de Mallorca",
                    "Mallorca",
                    "Spanien"
                ]
            }
        ],
        "destinations": [
            {
                "id": "07f5f656-4acc-3230-b7dd-aec3c13af37c",
                "name": "Mallorca",
                "type": "DESTINATION_REGION",
                "score": 1419.62,
                "parents": [
                    "Spanien"
                ]
            },
            {
                "id": "b934be2d-e042-3a8e-8fcc-00301dc2fb7d",
                "name": "Palma de Mallorca",
                "type": "DESTINATION_CITY",
                "score": 630.42,
                "parents": [
                    "Mallorca",
                    "Spanien"
                ]
            }
        ],
        "hotels_count": 10000,
        "destinations_count": 131
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required query parameter is missing or invalid. This response is not billable. |
| 503 | Service Unavailable | HolidayCheck could not be reached or answered in an unexpected format. This response is not billable. |

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