# Rumah123 Autocomplete API Documentation

<p><strong>Rumah123 Autocomplete API</strong> turns text into Indonesian locations. Each result has a <code>kind</code> (location or poi), a type label such as City, the place name, province, city, district, coordinates, the number of listings and the lowest sale and monthly rent price. Pass the <code>id</code> of a result as <code>location_id</code> to the search route. A query needs at least two characters. An empty list is a valid answer and is billed.</p>

- **Documentation:** [https://scrappa.co/docs/rumah123-api/rumah123_autocomplete](https://scrappa.co/docs/rumah123-api/rumah123_autocomplete)
- **API group:** Rumah123 API
- **Endpoint:** `GET https://scrappa.co/api/rumah123/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: jakarta sel. |
| `kind` | string | No | Keep one result kind: location or poi. |

## Example response

```json
{
    "data": {
        "query": "jakarta sel",
        "results": [
            {
                "id": "fd7063ac-b425-49de-a925-abcc4a2aa2db",
                "lat": -6.26899,
                "lng": 106.806,
                "city": "Jakarta Selatan",
                "kind": "location",
                "name": "Jakarta Selatan",
                "slug": "jakarta-selatan",
                "type": "City",
                "level": 2,
                "district": null,
                "province": "Jakarta",
                "listing_count": 11500,
                "min_sale_price": null,
                "min_rent_price_monthly": null
            },
            {
                "id": "578f592e-7613-4e43-8650-3c90b13c0b3a",
                "lat": -6.297639846801758,
                "lng": 106.78559112548828,
                "city": "Jakarta Selatan",
                "kind": "poi",
                "name": "RS Mayapada Jakarta Selatan",
                "slug": "jakarta-selatan-poi-rs-mayapada-jaksel",
                "type": null,
                "level": 0,
                "district": "Cilandak",
                "province": "Jakarta",
                "listing_count": 690,
                "min_sale_price": null,
                "min_rent_price_monthly": 12000
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter or a range is invalid. This response is not billable. |
| 503 | Upstream Unavailable | Rumah123 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)
