# 4zida Place Autocomplete API Documentation

Resolve free text into cities, municipalities and neighborhoods. Latin and Cyrillic spelling both work. Each item has the place id, title, full title with its parents, the city id, the ancestors and a relevance score. Use the id as place_ids[] in /search. Use this endpoint first: a wrong place id silently returns listings of other places. A page holds 10 suggestions. A query without a match returns an empty list as a successful response.

- **Documentation:** [https://scrappa.co/docs/4zida-api/fourzida_autocomplete](https://scrappa.co/docs/4zida-api/fourzida_autocomplete)
- **API group:** 4zida API
- **Endpoint:** `GET https://scrappa.co/api/4zida/v1/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 | Free text, 2 to 80 characters. Example: novi sad. |
| `page` | integer | No | One-based page number of suggestions. Defaults to 1. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/4zida/v1/autocomplete?q=beograd"
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter is missing, unknown or invalid, or 4zida cannot resolve a filter value. The response is not billable. |
| 404 | Resource Not Found | The requested 4zida resource does not exist. The response is not billable. |
| 503 | Unexpected Upstream Response | 4zida answered with a body that is not the documented shape. The response is not billable. |
| 503 | Upstream Unavailable | 4zida was temporarily unavailable or blocked the request. The response is not billable and the request never answers 429. |

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