# Zonaprop Location Autocomplete

Type part of a place name and get back matching Zonaprop location ids with their full ancestry. Feed an id straight into the location filter of the search endpoint.

- **Documentation:** [https://scrappa.co/docs/zonaprop-api/zonaprop_location_suggestions](https://scrappa.co/docs/zonaprop-api/zonaprop_location_suggestions)
- **API group:** Zonaprop API
- **Endpoint:** `GET https://scrappa.co/api/zonaprop/locations/suggestions`

## 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 | Place name to search for, for example palermo. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/zonaprop/locations/suggestions?query=palermo"
```

## Example response

```json
{
    "success": true,
    "data": [
        {
            "location_id": "V1-C-1003694",
            "name": "palermo"
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | No Zonaprop posting or location matches that id. This response is not billable. |
| 422 | Validation Error | A parameter is invalid, including an unknown operation, property type, currency or sort value. Invalid enum values are rejected here rather than upstream, because upstream answers them with an empty result. This response is not billable. |
| 502 | Upstream Unavailable | Zonaprop did not return a usable result for this read. This response is not billable. |
| 503 | Service Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

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