# Realtor.com Location Autocomplete API Documentation

<p><strong>Realtor.com Location Autocomplete API</strong> Find US locations by a search text. Each result has an area type (city, postal_code, neighborhood or address), a label, city, state, centroid and a slug_id. Use the slug_id as location in the search endpoint. An address result also carries a property_id that opens the listing, schools and agent endpoints.</p>

- **Documentation:** [https://scrappa.co/docs/realtor-com-api/realtor_com_autocomplete](https://scrappa.co/docs/realtor-com-api/realtor_com_autocomplete)
- **API group:** Realtor.com API
- **Endpoint:** `GET https://scrappa.co/api/realtor-com/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, 2 to 100 characters. Example: austin. |
| `limit` | integer | No | Rows to return, 1 to 10. Default 5. |
| `area_types` | string | No | Comma separated list of address, city, neighborhood, postal_code. |

## Example response

```json
{
    "data": {
        "query": "austin",
        "results": [
            {
                "city": "Austin",
                "line": null,
                "label": "Austin, TX",
                "mpr_id": null,
                "slug_id": "Austin_TX",
                "centroid": {
                    "lat": 30.2986219,
                    "lon": -97.7541339
                },
                "area_type": "city",
                "state_code": "TX",
                "postal_code": null,
                "property_id": null
            },
            {
                "city": "Austin",
                "line": null,
                "label": "Austin, MN",
                "mpr_id": null,
                "slug_id": "Austin_MN",
                "centroid": {
                    "lat": 43.6720977,
                    "lon": -92.9778634
                },
                "area_type": "city",
                "state_code": "MN",
                "postal_code": null,
                "property_id": null
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter is missing or invalid. This response is not billable. |
| 503 | Temporarily Unavailable | Realtor.com did not answer after several attempts. This response is not billable. Retry after a short pause. |

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