# Encuentra24 Autocomplete API Documentation

<p><strong>Encuentra24 Autocomplete API</strong> suggests provinces, cantons and districts for a text of at least 3 characters. Each result has a <code>slug</code> that you pass as <code>region</code> to the search route, the full name, level and coordinates.</p><p>A text without a match returns an empty list. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/encuentra24-api/encuentra24_autocomplete](https://scrappa.co/docs/encuentra24-api/encuentra24_autocomplete)
- **API group:** Encuentra24 API
- **Endpoint:** `GET https://scrappa.co/api/encuentra24/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, 3 to 100 characters. |
| `country` | string | No | costa-rica (default), panama, nicaragua or honduras. |
| `limit` | integer | No | Number of results, 1 to 25 (default 10). |

## Example response

```json
{
    "data": {
        "query": "san jo",
        "country": "costa-rica",
        "results": [
            {
                "id": "116",
                "name": "San Jos\u00e9 provincia",
                "slug": "costa-rica-es-san-jose-provincia",
                "zoom": 10,
                "level": 2,
                "latitude": 9.963440335314614,
                "full_name": "San Jos\u00e9 provincia",
                "longitude": -84.1360473632812
            },
            {
                "id": "139",
                "name": "San Jos\u00e9 Capital",
                "slug": "costa-rica-es-san-jose-provincia-san-jose-capital",
                "zoom": 13,
                "level": 3,
                "latitude": 9.95464844992134,
                "full_name": "San Jos\u00e9 Capital, San Jos\u00e9 provincia",
                "longitude": -84.09107208251956
            },
            {
                "id": "38",
                "name": "Santo Domingo",
                "slug": "costa-rica-es-heredia-provincia-santo-domingo",
                "zoom": 14,
                "level": 3,
                "latitude": 9.979670885582053,
                "full_name": "Santo Domingo, Heredia provincia",
                "longitude": -84.0896987915039
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing, out of range or not supported. This response is not billable. |
| 503 | Upstream Unavailable | Encuentra24 could not be reached or returned data that does not match the request. This response is not billable and is retryable. |

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