# QuintoAndar Location Autocomplete API Documentation

Scrappa's `GET /api/quintoandar/autocomplete` turns a place name into the `slug` that the search endpoint takes.

## What you get

Brazilian cities and the neighbourhoods QuintoAndar features for them, matched by the start of the name first. Send a full slug (`pinheiros-sao-paulo-sp-brasil`) to check that it exists: you get one result with its true name, or an empty list.

## Limits

QuintoAndar has no public free-text address search, so street addresses and unlisted neighbourhoods are matched only through a full slug.

- **Documentation:** [https://scrappa.co/docs/quintoandar-api/quintoandar_autocomplete](https://scrappa.co/docs/quintoandar-api/quintoandar_autocomplete)
- **API group:** QuintoAndar API
- **Endpoint:** `GET https://scrappa.co/api/quintoandar/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 | City or neighbourhood name, or a full slug to validate. |
| `limit` | integer | No | Maximum results, 1-25 (default 10). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/quintoandar/autocomplete?q=curit"
```

## Example response

```json
{
    "success": true,
    "query": "curit",
    "returned": 1,
    "locations": [
        {
            "slug": "curitiba-pr-brasil",
            "type": "CITY",
            "name": "Curitiba",
            "city": "Curitiba",
            "state_code": "PR",
            "formatted_name": "Curitiba - PR",
            "latitude": -25.480876,
            "longitude": -49.304425
        }
    ],
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter failed validation or is not supported. Unsupported parameters are rejected instead of ignored. Non-billable. |
| 503 | Upstream Unavailable | QuintoAndar could not be reached after a retry, or answered with a body this API cannot read (`upstream_unavailable`, `upstream_blocked`, `parser_drift`). Retryable and never billed. Clients are never rate limited. |

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