Search administrative units
Full-text search across all administrative units (provinces, districts, communes, and villages) by name or postal code. Returns paginated results with the unit kind, slug, name, type, and a deep-link href. Use page and pageSize for pagination.
Authorization
ApiKeyAuth x-api-key<token>
API key passed in the x-api-key header. Obtain a key from the developer dashboard. Example: x-api-key: YOUR_API_KEY
In: header
Query Parameters
q*string
Search query string
Length
1 <= lengthlang?string
Language for the response (en or km)
Default
"en"Value in
- "en"
- "km"
page?integer
Page number for pagination
Range
1 <= valueDefault
1pageSize?integer
Number of items per page
Range
1 <= value <= 100Default
10Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/search?q=Phnom+Penh&lang=en&page=1&pageSize=10"{ "statusCode": 200, "data": { "items": [ { "kind": "location", "slug": "phnom-penh-capital", "name": "Phnom Penh Capital", "type": "capital", "href": "/phnom-penh-capital", "postal_code_prefix": "12000000" }, { "kind": "location", "slug": "sangkat-phnom-penh-thmei", "name": "Sangkat Phnom Penh Thmei", "type": "commune", "href": "/phnom-penh-capital/khan-saensokh/sangkat-phnom-penh-thmei", "postal_code_prefix": "12080100", "parent_name": "Khan Saensokh" } ], "total": 2, "page": 1, "pageSize": 10 }, "metadata": { "correlationId": "01a0642a-d55f-70f8-b40f-2ce1c5c12035" }}