API Documentation

Static JSON API. No authentication, no rate limits. CORS enabled. Served from CDN.

Base URL

https://openadmindata.org/api/v1/

Endpoint Builder

Select a country and level to build an API URL.

Endpoints

GET /api/v1/countries.json
List all countries with metadata
Example: /api/v1/countries.json
GET /api/v1/countries/{code}.json
Full country data (all levels)
Example: /api/v1/countries/bn.json
GET /api/v1/{country}/{level}.json
All entities at a level
Example: /api/v1/bn/district.json
GET /api/v1/{country}/{level}/{slug}.json
Entity detail + children
GET /api/v1/stats.json
Aggregate statistics
Example: /api/v1/stats.json

Examples

List all countries

curl https://openadmindata.org/api/v1/countries.json

Get Brunei data

fetch('https://openadmindata.org/api/v1/countries/bn.json')
  .then(r => r.json())
  .then(data => {
    console.log(data.meta.countryName.en); // "Brunei"
    console.log(data.data.district.length); // 4
  });

Python

import requests
data = requests.get('https://openadmindata.org/api/v1/countries/th.json').json()
provinces = data['data']['province']
print(f"{len(provinces)} provinces")

Response Format

All responses are JSON with UTF-8 encoding.

{
  "meta": {
    "country": "bn",
    "countryName": { "local": "Brunei Darussalam", "en": "Brunei" },
    "levels": [...],
    "stats": { "district": 4, "mukim": 42, "kampong": 438 }
  },
  "data": {
    "district": [
      { "id": "BN-BE", "name_local": "Belait", "name_en": "Belait", "lat": 4.392, "lon": 114.581 }
    ]
  }
}

Available Countries

CodeCountryLevelsRecordsAPI Docs
af Afghanistan 2 435 Endpoints & Examples →
bd Bangladesh 3 567 Endpoints & Examples →
bt Bhutan 2 225 Endpoints & Examples →
bn Brunei 3 484 Endpoints & Examples →
bf Burkina Faso 3 415 Endpoints & Examples →
kh Cambodia 3 1,887 Endpoints & Examples →
cm Cameroon 3 428 Endpoints & Examples →
ht Haiti 3 720 Endpoints & Examples →
hk Hong Kong 2 470 Endpoints & Examples →
id Indonesia 4 88,297 Endpoints & Examples →
kg Kyrgyzstan 3 522 Endpoints & Examples →
la Laos 3 13,496 Endpoints & Examples →
my Malaysia 3 2,035 Endpoints & Examples →
mv Maldives 2 1,577 Endpoints & Examples →
mm Myanmar 4 17,626 Endpoints & Examples →
np Nepal 3 859 Endpoints & Examples →
pk Pakistan 3 744 Endpoints & Examples →
ph Philippines 4 43,771 Endpoints & Examples →
sg Singapore 3 392 Endpoints & Examples →
lk Sri Lanka 4 14,416 Endpoints & Examples →
th Thailand 3 8,369 Endpoints & Examples →
vn Vietnam 2 3,355 Endpoints & Examples →

CORS & Caching

All API endpoints include:

Access-Control-Allow-Origin: *
Cache-Control: public, max-age=3600
Content-Type: application/json; charset=utf-8