Skip to content
Scrappa Get API key
DDproperty API 1 credit/request

DDproperty Autocomplete API Documentation

GET https://scrappa.co/api/ddproperty/autocomplete

DDproperty Autocomplete API turns a place or project name into codes for the search route. Each row has an id, a type (region, district, area, property, station or subneighbourhood), the name, a short description and a ready search_params object that you can pass into the search route. Stations and sub-neighbourhoods map to keyword. English and Thai queries work. A valid empty result is a successful, billable answer.

DDproperty Autocomplete API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/ddproperty/autocomplete
Auth header
x-api-key
Cost
1 credit/request
query = coffee shops
Response preview
200 OK
{
    "data": {
        "query": "thonglor",
        "results": [
            {
                "id": "55",
                "name": "Thonglor Tower",
                "type": "property",
                "type_label": "Condo",
                "description": "Soi Thonglor, Sukhumvit 55 Road 10110, Khlongtoei Nua, Bangkok",
                "district_code": "TH1039",
                "search_params": {
                    "property_id": "55"
                }
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

2 optional filters available.

query string Required

Search text, 2 to 100 characters. English or Thai.

Example value coffee shops
locale string Optional

en (default) or th. The language of the names.

Example value en-US
limit integer Optional

Number of results, 1 to 20 (default 10).

Example value 10

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "query": "thonglor",
        "results": [
            {
                "id": "55",
                "name": "Thonglor Tower",
                "type": "property",
                "type_label": "Condo",
                "description": "Soi Thonglor, Sukhumvit 55 Road 10110, Khlongtoei Nua, Bangkok",
                "district_code": "TH1039",
                "search_params": {
                    "property_id": "55"
                }
            },
            {
                "id": "TH10",
                "name": "Bangkok",
                "type": "region",
                "type_label": "Province",
                "description": null,
                "district_code": null,
                "search_params": {
                    "region_code": "TH10"
                }
            },
            {
                "id": "TH1020",
                "name": "Bangkok Noi",
                "type": "district",
                "type_label": "District",
                "description": "Bangkok",
                "district_code": "TH1020",
                "search_params": {
                    "district_code": "TH1020"
                }
            },
            {
                "id": "TH102601",
                "name": "Din Daeng",
                "type": "area",
                "type_label": "Area",
                "description": "Din Daeng, Bangkok",
                "district_code": null,
                "search_params": {
                    "area_code": "TH102601"
                }
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

The query is missing or shorter than 2 characters, or locale is not en or th. This response is not billable.

{
    "errors": {
        "query": [
            "The query field must be at least 2 characters."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

DDproperty could not be reached or returned data that does not match the request. This response is not billable and is retryable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "DDproperty could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.