# Nha Tot Autocomplete API Documentation

Resolve free text into ready search suggestions such as a district, a project or a property type in a place. Each item has the label, the type, the Nha Tot page url, the project id when it is a project, and filters with region_id, district_id, ward_id, category_id and the transaction (sale or rent) that you can pass to /search. A query without a match returns an empty list as a successful response.

- **Documentation:** [https://scrappa.co/docs/chotot-nha-api/chotot_nha_autocomplete](https://scrappa.co/docs/chotot-nha-api/chotot_nha_autocomplete)
- **API group:** Nha Tot API
- **Endpoint:** `GET https://scrappa.co/api/chotot-nha/v1/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 | Free text, 2 to 80 characters. Example: quan 12. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/chotot-nha/v1/autocomplete?q=quan+12"
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter is missing, unknown or invalid. The response is not billable. |
| 503 | Unexpected Upstream Response | Nha Tot answered with a body that is not the documented shape or a result that breaks a requested filter. The response is not billable. |
| 503 | Upstream Unavailable | Nha Tot was temporarily unavailable or blocked the request. The response is not billable and the request never answers 429. |

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