# LandWatch Autocomplete API Documentation

<p><strong>LandWatch Autocomplete API</strong> finds states, counties, cities and postal codes by name. Each suggestion has a <code>kind</code> and the <code>state</code>, <code>county</code>, <code>city</code> or <code>postal_code</code> values to send to the search route. An unknown query returns an empty <code>items</code> list and is still a successful response.</p>

- **Documentation:** [https://scrappa.co/docs/landwatch-api/landwatch_autocomplete](https://scrappa.co/docs/landwatch-api/landwatch_autocomplete)
- **API group:** LandWatch API
- **Endpoint:** `GET https://scrappa.co/api/landwatch/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 | Place name or postal code prefix, 2 to 100 characters. Example: aust. |

## Example response

```json
{
    "data": {
        "items": [
            {
                "id": 1235,
                "city": "Austin",
                "kind": "city",
                "label": "Austin, TX",
                "state": "TX"
            },
            {
                "id": 1240,
                "city": "Austin",
                "kind": "city",
                "label": "Austin, AR",
                "state": "AR"
            },
            {
                "id": 1231,
                "city": "Austell",
                "kind": "city",
                "label": "Austell, GA",
                "state": "GA"
            }
        ],
        "query": "aust"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 503 | Upstream Unavailable | LandWatch could not be reached, or it answered with 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)
