# Private Property Location Autocomplete

Autocomplete locations by prefix. Returns entries with a text, descriptor and item id that can be used as location_id in search.

- **Documentation:** [https://scrappa.co/docs/privateproperty-api/privateproperty_locations_autocomplete](https://scrappa.co/docs/privateproperty-api/privateproperty_locations_autocomplete)
- **API group:** Private Property API
- **Endpoint:** `GET https://scrappa.co/api/privateproperty/locations/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 | Location prefix, for example Pretoria. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/privateproperty/locations/autocomplete?q=Pretoria"
```

## Example response

```json
{
    "success": true,
    "suggestions": [
        {
            "text": "Pretoria",
            "descriptorText": "Gauteng",
            "itemId": 115
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 503 | Upstream Unavailable | Private Property returned an unsuccessful, empty or malformed answer. |

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