Base URL https://api.listpostcode.com. Send your key in the x-api-key header.
/v1/countriesAll countries. hasPostcodes=true keeps countries that have postcode data.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| hasPostcodes | query | boolean | no | true | When true, only countries with postcode data are returned. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries"{
"statusCode": 200,
"data": [
{
"code": "AF",
"alpha3": "AFG",
"name": "Afghanistan",
"slug": "afghanistan",
"region": "AS",
"subRegion": null,
"currencyCode": "AFN",
"timezone": "Asia/Kabul",
"latitude": 33.93911,
"longitude": 67.709953,
"postalCodeFormat": null,
"hasPostcodes": true,
"url": "https://listpostcode.com/afghanistan"
},
{
"code": "AX",
"alpha3": "ALA",
"name": "Aland Islands",
"slug": "aland-islands",
"region": "EU",
"subRegion": null,
"currencyCode": "EUR",
"timezone": "Europe/Mariehamn",
"latitude": null,
"longitude": null,
"postalCodeFormat": "#####",
"hasPostcodes": true,
"url": "https://listpostcode.com/aland-islands"
},
{
"code": "AL",
"alpha3": "ALB",
"name": "Albania",
"slug": "albania",
"region": "EU",
"subRegion": null,
"currencyCode": "ALL",
"timezone": "Europe/Tirane",
"latitude": 41.153332,
"longitude": 20.168331,
"postalCodeFormat": "####",
"hasPostcodes": true,
"url": "https://listpostcode.com/albania"
}
],
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILED401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}One country with usage statistics when it has postcode data.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH"{
"statusCode": 200,
"data": {
"code": "KH",
"alpha3": "KHM",
"name": "Cambodia",
"slug": "cambodia",
"region": "AS",
"subRegion": null,
"currencyCode": "KHR",
"timezone": "Asia/Phnom_Penh",
"latitude": 12.565679,
"longitude": 104.990963,
"postalCodeFormat": "#####",
"hasPostcodes": true,
"url": "https://listpostcode.com/cambodia",
"stats": {
"totalPlaces": 16635,
"distinctPostcodes": 16634,
"levels": [
{
"level": 1,
"count": 25
},
{
"level": 2,
"count": 226
},
{
"level": 3,
"count": 1663
},
{
"level": 4,
"count": 14721
}
]
}
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/placesPlaces of one administrative level. Sorted by name, then id. Paginated with page and pageSize (max 100).
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| level | query | integer | no | 1 | Administrative level. |
| page | query | integer | no | 1 | Page number, starting at 1. |
| pageSize | query | integer | no | 3 | Items per page. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/places"{
"statusCode": 200,
"data": {
"items": [
{
"id": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"countryCode": "KH",
"level": 1,
"name": "Banteay Meanchey Province",
"localName": "ខេត្ត បន្ទាយមានជ័យ",
"type": "province",
"slug": "banteay-meanchey-provine",
"path": "/banteay-meanchey-provine",
"postalCode": "01000000",
"latitude": 13.7531914,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine"
},
{
"id": "8d721ec8-4c9d-632f-6f06-7f89cc14862c",
"countryCode": "KH",
"level": 1,
"name": "Battambang Province",
"localName": "ខេត្ត បាត់ដំបង",
"type": "province",
"slug": "battambang-provine",
"path": "/battambang-provine",
"postalCode": "02000000",
"latitude": 13.0286971,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/battambang-provine"
},
{
"id": "7ec8cbec-5c4b-fee2-2830-8fd9f2a7baf3",
"countryCode": "KH",
"level": 1,
"name": "Kampong Cham Province",
"localName": "ខេត្ត កំពង់ចាម",
"type": "province",
"slug": "kampong-cham-province",
"path": "/kampong-cham-province",
"postalCode": "03000000",
"latitude": 12.0982918,
"longitude": 105.3131185,
"parentId": null,
"url": "https://listpostcode.com/cambodia/kampong-cham-province"
}
],
"pageNumber": 1,
"pageSize": 3,
"totalCount": 25,
"totalPages": 9,
"hasPreviousPage": false,
"hasNextPage": true
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATA401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/places/{id}One place with its ancestors (root first) and child count.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| id | path | string | yes | 3842cac4-b9a0-8223-0dcc-509a6f75849b | Place id, as returned in `id` fields of place results. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/places/3842cac4-b9a0-8223-0dcc-509a6f75849b"{
"statusCode": 200,
"data": {
"id": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"countryCode": "KH",
"level": 1,
"name": "Banteay Meanchey Province",
"localName": "ខេត្ត បន្ទាយមានជ័យ",
"type": "province",
"slug": "banteay-meanchey-provine",
"path": "/banteay-meanchey-provine",
"postalCode": "01000000",
"latitude": 13.7531914,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine",
"ancestors": [],
"childCount": 9
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATAPLACE_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/places/{id}/childrenDirect children of a place. Sorted by name, then id. Paginated with page and pageSize (max 100).
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| id | path | string | yes | 3842cac4-b9a0-8223-0dcc-509a6f75849b | Place id, as returned in `id` fields of place results. |
| page | query | integer | no | 1 | Page number, starting at 1. |
| pageSize | query | integer | no | 3 | Items per page. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/places/3842cac4-b9a0-8223-0dcc-509a6f75849b/children"{
"statusCode": 200,
"data": {
"items": [
{
"id": "aacdd37f-74ba-b0a0-ef3d-707a8545df7c",
"countryCode": "KH",
"level": 2,
"name": "Malai District",
"localName": "ស្រុក ម៉ាឡៃ",
"type": "district",
"slug": "malai-district",
"path": "/banteay-meanchey-provine/malai-district",
"postalCode": "01090000",
"latitude": 13.5261712,
"longitude": 102.5527505,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/malai-district"
},
{
"id": "bb457d77-dfbc-d450-9c42-c70ad7acf5fe",
"countryCode": "KH",
"level": 2,
"name": "Mongkol Borei District",
"localName": "ស្រុក មង្គលបូរី",
"type": "district",
"slug": "mongkol-borei-district",
"path": "/banteay-meanchey-provine/mongkol-borei-district",
"postalCode": "01020000",
"latitude": 13.4381017,
"longitude": 102.9435536,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/mongkol-borei-district"
},
{
"id": "e35c609e-6abb-34d1-bb55-c54d861ceb6a",
"countryCode": "KH",
"level": 2,
"name": "Ou Chrov District",
"localName": "ស្រុក អូរជ្រៅ",
"type": "district",
"slug": "ou-chrov-district",
"path": "/banteay-meanchey-provine/ou-chrov-district",
"postalCode": "01050000",
"latitude": 13.6481785,
"longitude": 102.8284772,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/ou-chrov-district"
}
],
"pageNumber": 1,
"pageSize": 3,
"totalCount": 9,
"totalPages": 3,
"hasPreviousPage": false,
"hasNextPage": true
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATAPLACE_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/resolveTurns the path of a listpostcode.com place page into a place. https://listpostcode.com/cambodia/a/b maps to /v1/countries/KH/resolve?path=/a/b.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| path | query | string | yes | /banteay-meanchey-provine/malai-district | Place path of 1-4 segments starting with `/`, e.g. the part of the page URL after the country slug. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/resolve?path=/banteay-meanchey-provine/malai-district"{
"statusCode": 200,
"data": {
"id": "aacdd37f-74ba-b0a0-ef3d-707a8545df7c",
"countryCode": "KH",
"level": 2,
"name": "Malai District",
"localName": "ស្រុក ម៉ាឡៃ",
"type": "district",
"slug": "malai-district",
"path": "/banteay-meanchey-provine/malai-district",
"postalCode": "01090000",
"latitude": 13.5261712,
"longitude": 102.5527505,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/malai-district",
"ancestors": [
{
"id": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"countryCode": "KH",
"level": 1,
"name": "Banteay Meanchey Province",
"localName": "ខេត្ត បន្ទាយមានជ័យ",
"type": "province",
"slug": "banteay-meanchey-provine",
"path": "/banteay-meanchey-provine",
"postalCode": "01000000",
"latitude": 13.7531914,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine"
}
],
"childCount": 6
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATAPLACE_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/postcodes/{postcode}Places that use this postcode. The postcode is trimmed, spaces are collapsed and letters upper-cased. At most 100 places.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| postcode | path | string | yes | 01090000 | Postcode to look up, 1-20 characters. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/postcodes/01090000"{
"statusCode": 200,
"data": {
"countryCode": "KH",
"postcode": "01090000",
"places": [
{
"id": "aacdd37f-74ba-b0a0-ef3d-707a8545df7c",
"countryCode": "KH",
"level": 2,
"name": "Malai District",
"localName": "ស្រុក ម៉ាឡៃ",
"type": "district",
"slug": "malai-district",
"path": "/banteay-meanchey-provine/malai-district",
"postalCode": "01090000",
"latitude": 13.5261712,
"longitude": 102.5527505,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/malai-district",
"ancestors": [
{
"id": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"countryCode": "KH",
"level": 1,
"name": "Banteay Meanchey Province",
"localName": "ខេត្ត បន្ទាយមានជ័យ",
"type": "province",
"slug": "banteay-meanchey-provine",
"path": "/banteay-meanchey-provine",
"postalCode": "01000000",
"latitude": 13.7531914,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine"
}
],
"childCount": 6
}
]
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATAPOSTCODE_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/autocompleteName search over countries and places, ranked for autocomplete.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| q | query | string | yes | sydney | Search text, 2-100 characters. |
| country | query | string | no | KH | ISO 3166-1 alpha-2 country code. Restricts results to one country. |
| limit | query | integer | no | 3 | Maximum number of results. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/autocomplete?q=sydney"{
"statusCode": 200,
"data": [
{
"kind": "place",
"name": "Synej",
"countryCode": "AL",
"countryName": "Albania",
"postalCode": null,
"path": "/tirana/bashkia-kavaje/synej",
"url": "https://listpostcode.com/albania/tirana/bashkia-kavaje/synej"
},
{
"kind": "place",
"name": "Stoney Ground",
"countryCode": "AI",
"countryName": "Anguilla",
"postalCode": null,
"path": "/stoney-ground",
"url": "https://listpostcode.com/anguilla/stoney-ground"
},
{
"kind": "place",
"name": "Rodney Bay",
"countryCode": "LC",
"countryName": "Saint Lucia",
"postalCode": null,
"path": "/gros-islet/rodney-bay",
"url": "https://listpostcode.com/saint-lucia/gros-islet/rodney-bay"
}
],
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATA401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/reverseNearest place within 80 km. Without country, the country is inferred from the nearest country centre — pass country near borders.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| lat | query | number | yes | 11.5564 | Latitude of the point. |
| lng | query | number | yes | 104.9282 | Longitude of the point. |
| country | query | string | no | KH | ISO 3166-1 alpha-2 country code. Restricts results to one country. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/reverse?lat=11.5564&lng=104.9282"{
"statusCode": 200,
"data": {
"place": {
"id": "d7d40ac2-e96f-5977-aa27-a0c99bff6710",
"countryCode": "KH",
"level": 1,
"name": "Phnom Penh Capital",
"localName": "រាជធានី ភ្នំពេញ",
"type": "capital",
"slug": "phnom-penh-capital",
"path": "/phnom-penh-capital",
"postalCode": "12000000",
"latitude": 11.5563738,
"longitude": 104.9282099,
"parentId": null,
"url": "https://listpostcode.com/cambodia/phnom-penh-capital",
"ancestors": [],
"childCount": 14
},
"distanceKm": 0
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATANO_NEARBY_PLACE401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDEDBase URL https://api.listpostcode.com. Send your key in the x-api-key header.
/v1/countriesAll countries. hasPostcodes=true keeps countries that have postcode data.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| hasPostcodes | query | boolean | no | true | When true, only countries with postcode data are returned. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries"{
"statusCode": 200,
"data": [
{
"code": "AF",
"alpha3": "AFG",
"name": "Afghanistan",
"slug": "afghanistan",
"region": "AS",
"subRegion": null,
"currencyCode": "AFN",
"timezone": "Asia/Kabul",
"latitude": 33.93911,
"longitude": 67.709953,
"postalCodeFormat": null,
"hasPostcodes": true,
"url": "https://listpostcode.com/afghanistan"
},
{
"code": "AX",
"alpha3": "ALA",
"name": "Aland Islands",
"slug": "aland-islands",
"region": "EU",
"subRegion": null,
"currencyCode": "EUR",
"timezone": "Europe/Mariehamn",
"latitude": null,
"longitude": null,
"postalCodeFormat": "#####",
"hasPostcodes": true,
"url": "https://listpostcode.com/aland-islands"
},
{
"code": "AL",
"alpha3": "ALB",
"name": "Albania",
"slug": "albania",
"region": "EU",
"subRegion": null,
"currencyCode": "ALL",
"timezone": "Europe/Tirane",
"latitude": 41.153332,
"longitude": 20.168331,
"postalCodeFormat": "####",
"hasPostcodes": true,
"url": "https://listpostcode.com/albania"
}
],
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILED401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}One country with usage statistics when it has postcode data.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH"{
"statusCode": 200,
"data": {
"code": "KH",
"alpha3": "KHM",
"name": "Cambodia",
"slug": "cambodia",
"region": "AS",
"subRegion": null,
"currencyCode": "KHR",
"timezone": "Asia/Phnom_Penh",
"latitude": 12.565679,
"longitude": 104.990963,
"postalCodeFormat": "#####",
"hasPostcodes": true,
"url": "https://listpostcode.com/cambodia",
"stats": {
"totalPlaces": 16635,
"distinctPostcodes": 16634,
"levels": [
{
"level": 1,
"count": 25
},
{
"level": 2,
"count": 226
},
{
"level": 3,
"count": 1663
},
{
"level": 4,
"count": 14721
}
]
}
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/placesPlaces of one administrative level. Sorted by name, then id. Paginated with page and pageSize (max 100).
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| level | query | integer | no | 1 | Administrative level. |
| page | query | integer | no | 1 | Page number, starting at 1. |
| pageSize | query | integer | no | 3 | Items per page. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/places"{
"statusCode": 200,
"data": {
"items": [
{
"id": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"countryCode": "KH",
"level": 1,
"name": "Banteay Meanchey Province",
"localName": "ខេត្ត បន្ទាយមានជ័យ",
"type": "province",
"slug": "banteay-meanchey-provine",
"path": "/banteay-meanchey-provine",
"postalCode": "01000000",
"latitude": 13.7531914,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine"
},
{
"id": "8d721ec8-4c9d-632f-6f06-7f89cc14862c",
"countryCode": "KH",
"level": 1,
"name": "Battambang Province",
"localName": "ខេត្ត បាត់ដំបង",
"type": "province",
"slug": "battambang-provine",
"path": "/battambang-provine",
"postalCode": "02000000",
"latitude": 13.0286971,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/battambang-provine"
},
{
"id": "7ec8cbec-5c4b-fee2-2830-8fd9f2a7baf3",
"countryCode": "KH",
"level": 1,
"name": "Kampong Cham Province",
"localName": "ខេត្ត កំពង់ចាម",
"type": "province",
"slug": "kampong-cham-province",
"path": "/kampong-cham-province",
"postalCode": "03000000",
"latitude": 12.0982918,
"longitude": 105.3131185,
"parentId": null,
"url": "https://listpostcode.com/cambodia/kampong-cham-province"
}
],
"pageNumber": 1,
"pageSize": 3,
"totalCount": 25,
"totalPages": 9,
"hasPreviousPage": false,
"hasNextPage": true
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATA401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/places/{id}One place with its ancestors (root first) and child count.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| id | path | string | yes | 3842cac4-b9a0-8223-0dcc-509a6f75849b | Place id, as returned in `id` fields of place results. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/places/3842cac4-b9a0-8223-0dcc-509a6f75849b"{
"statusCode": 200,
"data": {
"id": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"countryCode": "KH",
"level": 1,
"name": "Banteay Meanchey Province",
"localName": "ខេត្ត បន្ទាយមានជ័យ",
"type": "province",
"slug": "banteay-meanchey-provine",
"path": "/banteay-meanchey-provine",
"postalCode": "01000000",
"latitude": 13.7531914,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine",
"ancestors": [],
"childCount": 9
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATAPLACE_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/places/{id}/childrenDirect children of a place. Sorted by name, then id. Paginated with page and pageSize (max 100).
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| id | path | string | yes | 3842cac4-b9a0-8223-0dcc-509a6f75849b | Place id, as returned in `id` fields of place results. |
| page | query | integer | no | 1 | Page number, starting at 1. |
| pageSize | query | integer | no | 3 | Items per page. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/places/3842cac4-b9a0-8223-0dcc-509a6f75849b/children"{
"statusCode": 200,
"data": {
"items": [
{
"id": "aacdd37f-74ba-b0a0-ef3d-707a8545df7c",
"countryCode": "KH",
"level": 2,
"name": "Malai District",
"localName": "ស្រុក ម៉ាឡៃ",
"type": "district",
"slug": "malai-district",
"path": "/banteay-meanchey-provine/malai-district",
"postalCode": "01090000",
"latitude": 13.5261712,
"longitude": 102.5527505,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/malai-district"
},
{
"id": "bb457d77-dfbc-d450-9c42-c70ad7acf5fe",
"countryCode": "KH",
"level": 2,
"name": "Mongkol Borei District",
"localName": "ស្រុក មង្គលបូរី",
"type": "district",
"slug": "mongkol-borei-district",
"path": "/banteay-meanchey-provine/mongkol-borei-district",
"postalCode": "01020000",
"latitude": 13.4381017,
"longitude": 102.9435536,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/mongkol-borei-district"
},
{
"id": "e35c609e-6abb-34d1-bb55-c54d861ceb6a",
"countryCode": "KH",
"level": 2,
"name": "Ou Chrov District",
"localName": "ស្រុក អូរជ្រៅ",
"type": "district",
"slug": "ou-chrov-district",
"path": "/banteay-meanchey-provine/ou-chrov-district",
"postalCode": "01050000",
"latitude": 13.6481785,
"longitude": 102.8284772,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/ou-chrov-district"
}
],
"pageNumber": 1,
"pageSize": 3,
"totalCount": 9,
"totalPages": 3,
"hasPreviousPage": false,
"hasNextPage": true
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATAPLACE_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/resolveTurns the path of a listpostcode.com place page into a place. https://listpostcode.com/cambodia/a/b maps to /v1/countries/KH/resolve?path=/a/b.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| path | query | string | yes | /banteay-meanchey-provine/malai-district | Place path of 1-4 segments starting with `/`, e.g. the part of the page URL after the country slug. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/resolve?path=/banteay-meanchey-provine/malai-district"{
"statusCode": 200,
"data": {
"id": "aacdd37f-74ba-b0a0-ef3d-707a8545df7c",
"countryCode": "KH",
"level": 2,
"name": "Malai District",
"localName": "ស្រុក ម៉ាឡៃ",
"type": "district",
"slug": "malai-district",
"path": "/banteay-meanchey-provine/malai-district",
"postalCode": "01090000",
"latitude": 13.5261712,
"longitude": 102.5527505,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/malai-district",
"ancestors": [
{
"id": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"countryCode": "KH",
"level": 1,
"name": "Banteay Meanchey Province",
"localName": "ខេត្ត បន្ទាយមានជ័យ",
"type": "province",
"slug": "banteay-meanchey-provine",
"path": "/banteay-meanchey-provine",
"postalCode": "01000000",
"latitude": 13.7531914,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine"
}
],
"childCount": 6
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATAPLACE_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/countries/{country}/postcodes/{postcode}Places that use this postcode. The postcode is trimmed, spaces are collapsed and letters upper-cased. At most 100 places.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| country | path | string | yes | KH | ISO 3166-1 alpha-2 country code. |
| postcode | path | string | yes | 01090000 | Postcode to look up, 1-20 characters. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/countries/KH/postcodes/01090000"{
"statusCode": 200,
"data": {
"countryCode": "KH",
"postcode": "01090000",
"places": [
{
"id": "aacdd37f-74ba-b0a0-ef3d-707a8545df7c",
"countryCode": "KH",
"level": 2,
"name": "Malai District",
"localName": "ស្រុក ម៉ាឡៃ",
"type": "district",
"slug": "malai-district",
"path": "/banteay-meanchey-provine/malai-district",
"postalCode": "01090000",
"latitude": 13.5261712,
"longitude": 102.5527505,
"parentId": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine/malai-district",
"ancestors": [
{
"id": "3842cac4-b9a0-8223-0dcc-509a6f75849b",
"countryCode": "KH",
"level": 1,
"name": "Banteay Meanchey Province",
"localName": "ខេត្ត បន្ទាយមានជ័យ",
"type": "province",
"slug": "banteay-meanchey-provine",
"path": "/banteay-meanchey-provine",
"postalCode": "01000000",
"latitude": 13.7531914,
"longitude": 102.989615,
"parentId": null,
"url": "https://listpostcode.com/cambodia/banteay-meanchey-provine"
}
],
"childCount": 6
}
]
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATAPOSTCODE_NOT_FOUND401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/autocompleteName search over countries and places, ranked for autocomplete.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| q | query | string | yes | sydney | Search text, 2-100 characters. |
| country | query | string | no | KH | ISO 3166-1 alpha-2 country code. Restricts results to one country. |
| limit | query | integer | no | 3 | Maximum number of results. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/autocomplete?q=sydney"{
"statusCode": 200,
"data": [
{
"kind": "place",
"name": "Synej",
"countryCode": "AL",
"countryName": "Albania",
"postalCode": null,
"path": "/tirana/bashkia-kavaje/synej",
"url": "https://listpostcode.com/albania/tirana/bashkia-kavaje/synej"
},
{
"kind": "place",
"name": "Stoney Ground",
"countryCode": "AI",
"countryName": "Anguilla",
"postalCode": null,
"path": "/stoney-ground",
"url": "https://listpostcode.com/anguilla/stoney-ground"
},
{
"kind": "place",
"name": "Rodney Bay",
"countryCode": "LC",
"countryName": "Saint Lucia",
"postalCode": null,
"path": "/gros-islet/rodney-bay",
"url": "https://listpostcode.com/saint-lucia/gros-islet/rodney-bay"
}
],
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATA401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED/v1/reverseNearest place within 80 km. Without country, the country is inferred from the nearest country centre — pass country near borders.
| Name | In | Type | Required | Example | Description |
|---|---|---|---|---|---|
| lat | query | number | yes | 11.5564 | Latitude of the point. |
| lng | query | number | yes | 104.9282 | Longitude of the point. |
| country | query | string | no | KH | ISO 3166-1 alpha-2 country code. Restricts results to one country. |
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.listpostcode.com/v1/reverse?lat=11.5564&lng=104.9282"{
"statusCode": 200,
"data": {
"place": {
"id": "d7d40ac2-e96f-5977-aa27-a0c99bff6710",
"countryCode": "KH",
"level": 1,
"name": "Phnom Penh Capital",
"localName": "រាជធានី ភ្នំពេញ",
"type": "capital",
"slug": "phnom-penh-capital",
"path": "/phnom-penh-capital",
"postalCode": "12000000",
"latitude": 11.5563738,
"longitude": 104.9282099,
"parentId": null,
"url": "https://listpostcode.com/cambodia/phnom-penh-capital",
"ancestors": [],
"childCount": 14
},
"distanceKm": 0
},
"metadata": {
"correlationId": "0199a1b2-3c4d-7e5f-8a9b-0c1d2e3f4a5b"
}
}VALIDATION_FAILEDCOUNTRY_NOT_FOUNDNO_POSTCODE_DATANO_NEARBY_PLACE401 TOSKEY_API_KEY_MISSING401 TOSKEY_API_KEY_INVALID401 TOSKEY_API_KEY_REVOKED401 TOSKEY_API_KEY_EXPIRED429 TOSKEY_RATE_LIMITED429 TOSKEY_QUOTA_EXCEEDED