# Homes.com Agent Autocomplete API Documentation

<p><strong>Homes.com Agent Autocomplete API</strong> finds agents by name. Each result has the name, agency and city, the profile URL, a photo and the <code>agent_id</code> for the agent route. An empty list is a valid answer and is billed.</p>

- **Documentation:** [https://scrappa.co/docs/homes-com-api/homes_com_agent_autocomplete](https://scrappa.co/docs/homes-com-api/homes_com_agent_autocomplete)
- **API group:** Homes.com API
- **Endpoint:** `GET https://scrappa.co/api/homes-com/agent-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 | Agent name, 2 to 100 characters. Example: Ivan Mills. |
| `limit` | integer | No | Number of results, 1 to 25. Default 10. |

## Example response

```json
{
    "data": {
        "query": "Ivan Mills",
        "results": [
            {
                "url": "https://www.homes.com/real-estate-agents/ivan-mills/he96qg2/",
                "name": "Ivan Mills",
                "agent_id": "he96qg2",
                "photo_url": "https://imagescdn.homes.com/i2/y2wcZ6qdeAi-RPUkpMY4nKei8KhN8FfamxTTuA9hJMM/117/image.jpg?p=1",
                "description": "Mobile Bye Bye, Austin, TX"
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "agent_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)
