# PadMapper Autocomplete

Returns matches for a search text: cities, neighborhoods, ZIP codes, addresses, and buildings, each with a label, coordinates, a map box, and the url slug to pass as location to search. Set exclude_buildings to skip building matches.

- **Documentation:** [https://scrappa.co/docs/padmapper-api/padmapper_autocomplete](https://scrappa.co/docs/padmapper-api/padmapper_autocomplete)
- **API group:** PadMapper API
- **Endpoint:** `GET https://scrappa.co/api/padmapper/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 | Free text: city, neighborhood, ZIP, address, or building name. |
| `exclude_buildings` | boolean | No | Leave building matches out. |

## Example response

```json
{
    "data": {
        "status": "success",
        "matches": [
            {
                "box": [
                    -79.536797,
                    43.592346,
                    -79.273262
                ],
                "lat": 43.647938,
                "lng": -79.38355,
                "url": "toronto-on",
                "city": "Toronto",
                "name": "Toronto",
                "state": "ON",
                "country": "CAN",
                "record_id": 133788040,
                "record_type": "city"
            },
            {
                "box": [
                    -79.387783,
                    43.619131,
                    -79.357212
                ],
                "lat": 43.620833,
                "lng": -79.378611,
                "url": "toronto-islands-on",
                "city": "Toronto Islands",
                "name": "Toronto Islands",
                "state": "ON",
                "country": "CAN",
                "record_id": 812479052,
                "record_type": "city"
            },
            {
                "box": [
                    -80.747028,
                    40.41211,
                    -80.594664
                ],
                "lat": 40.465374,
                "lng": -80.59988,
                "url": "toronto-oh",
                "city": "Toronto",
                "name": "Toronto",
                "state": "OH",
                "country": "USA",
                "record_id": 360127092,
                "record_type": "city"
            }
        ]
    },
    "meta": {
        "duration_ms": 640,
        "upstream_calls": 1,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested listing, building, agent, or city was not found. Rent reports exist for US cities only. This response is not billable. |
| 422 | Validation Error | A required public parameter is missing or invalid. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. 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)
