API — Nigeria (NG)

37 states, 774 local government areas, 8,799 wards.

Endpoints

GET /api/v1/countries/ng.json
Full dataset — all levels, all records
GET /api/v1/ng/state.json
All 37 states (State)
GET /api/v1/ng/lga.json
All 774 local government areas (Local Government Area)
/api/v1/ng/lga.json
GET /api/v1/ng/ward.json
All 8,799 wards (Ward)
GET /api/v1/ng/state/{slug}.json
Single state with children
Example: /api/v1/ng/state/abia-ng001.json

Quick Start

JavaScript

fetch('https://openadmindata.org/api/v1/countries/ng.json')
  .then(r => r.json())
  .then(data => {
    const levels = data.meta.levels.map(l => l.name_en);
    console.log('Nigeria:', levels.join(' → '));
    
    console.log(data.data.state.length, 'states');
  });

Python

import requests
data = requests.get('https://openadmindata.org/api/v1/countries/ng.json').json()
states = data['data']['state']
print(f"Nigeria: {len(states)} states")

cURL

curl -s https://openadmindata.org/api/v1/ng/state.json | jq '.count'

Schema

Each entity record contains:

FieldTypeDescription
idstringUnique identifier
name_localstringName in local script
name_enstringEnglish / romanized name
slugstringURL-safe slug
latnumberLatitude (WGS84)
lonnumberLongitude (WGS84)
parent_idstring?Parent entity ID (null for top level)
parent_name_localstring?Parent name in local script
parent_name_enstring?Parent English name
postal_codestring?Postal code (deepest level only, where available)