# Homes.com Autocomplete API Documentation

<p><strong>Homes.com Autocomplete API</strong> turns text into Homes.com places. Each result has a category (place, neighborhood, school, building, community or address), the page URL, the city, state and ZIP, coordinates and a bounding box. Places, neighborhoods and communities carry a <code>location_id</code> that you pass to the search route. A street address carries a <code>property_id</code> that you pass to the listing route. School and neighborhood results also carry an <code>id</code> for the school and neighborhood routes. An empty list is a valid answer and is billed.</p>

- **Documentation:** [https://scrappa.co/docs/homes-com-api/homes_com_autocomplete](https://scrappa.co/docs/homes-com-api/homes_com_autocomplete)
- **API group:** Homes.com API
- **Endpoint:** `GET https://scrappa.co/api/homes-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, TX. |
| `limit` | integer | No | Number of results, 1 to 25. Default 10. |
| `type` | string | No | Keep one result type: place, neighborhood, school, building, community or address. |
| `listing_type` | string | No | sale (default) or rent. |

## Example response

```json
{
    "data": {
        "query": "Austin",
        "results": [
            {
                "id": "f5xx96v6x6171",
                "url": "https://www.homes.com/austin-tx/",
                "city": "Austin",
                "name": "Austin, TX",
                "state": "TX",
                "county": "Travis",
                "street": null,
                "category": "place",
                "coordinates": {
                    "latitude": 30.29861,
                    "longitude": -97.75405
                },
                "description": "City",
                "location_id": "2.f5xx96v6x6171",
                "postal_code": null,
                "property_id": null,
                "bounding_box": {
                    "east": -97.52759,
                    "west": -97.93836,
                    "north": 30.51666,
                    "south": 30.07558
                },
                "display_name": "Austin, TX"
            },
            {
                "id": "0dqk6nmm631zg",
                "url": "https://www.homes.com/austin-tx/northeast-austin-neighborhood/",
                "city": "Austin",
                "name": "Northeast Austin, Austin, TX",
                "state": "TX",
                "county": "Travis",
                "street": null,
                "category": "neighborhood",
                "coordinates": {
                    "latitude": 30.3244,
                    "longitude": -97.55753
                },
                "description": "Neighborhood",
                "location_id": "4.0dqk6nmm631zg",
                "postal_code": null,
                "property_id": null,
                "bounding_box": {
                    "east": -97.41946,
                    "west": -97.70677,
                    "north": 30.48521,
                    "south": 30.198
                },
                "display_name": "Northeast Austin, Austin, TX"
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter or a range is invalid, or the page is beyond the first 700 results. This response is not billable. |
| 503 | Upstream Unavailable | Homes.com could not be reached or returned data that does not match the request. This response is not billable and is retryable. |

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