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/{country}/{level}/{slug}.json
Entity detail + children
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
CORS & Caching
All API endpoints include:
Access-Control-Allow-Origin: *
Cache-Control: public, max-age=3600
Content-Type: application/json; charset=utf-8