Quick Start
Make your first API call in under 5 minutes
1. Get Your API Key
Sign up and generate an API key from your dashboard.
2. Make Your First Request
List all provinces:
curl -H "x-api-key: YOUR_API_KEY" \
https://api.cambodiapostalcode.com/v1/provinces?lang=enResponse:
{
"statusCode": 200,
"data": [
{
"id": "d7d40ac2-e96f-5977-aa27-a0c99bff6710",
"name": "Phnom Penh Capital",
"type": "capital",
"postal_code_prefix": "12",
"postal_code_range": "12010101-12140706"
}
],
"metadata": {
"correlationId": "01a0642a-d55f-70f8-b40f-2ce1c5c12035"
}
}data is always the list itself — list endpoints return an array, not an
{ items: [...] } wrapper. Search is the exception: its data is a paged
object with items, pageNumber, pageSize, totalCount, totalPages,
hasPreviousPage, and hasNextPage.
3. Look Up a Postal Code
Reverse-lookup a postal code to get the full administrative hierarchy (province → district → commune):
curl -H "x-api-key: YOUR_API_KEY" \
https://api.cambodiapostalcode.com/v1/lookup/12010101?lang=en4. Search
Full-text search across all administrative units by name or postal code:
curl -H "x-api-key: YOUR_API_KEY" \
https://api.cambodiapostalcode.com/v1/search?q=phnom+penh&lang=enNext Steps
- API Reference — Full endpoint documentation
- Error Handling — Understand error responses
- Rate Limits — Know your quotas