API — Japan (JP)
47 prefectures, 1,597 municipalitys.
Endpoints
GET
/api/v1/jp/prefecture/{slug}.json
Single prefecture with children
Quick Start
JavaScript
fetch('https://api.openadmindata.org/api/v1/countries/jp.json')
.then(r => r.json())
.then(data => {
const levels = data.meta.levels.map(l => l.name_en);
console.log('Japan:', levels.join(' → '));
console.log(data.data.prefecture.length, 'prefectures');
});
Python
import requests
data = requests.get('https://api.openadmindata.org/api/v1/countries/jp.json').json()
prefectures = data['data']['prefecture']
print(f"Japan: {len(prefectures)} prefectures")
cURL
curl -s https://api.openadmindata.org/api/v1/jp/prefecture.json | jq '.count'
Schema
Each entity record contains:
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
name_local | string | Name in local script |
name_en | string | English / romanized name |
slug | string | URL-safe slug |
lat | number | Latitude (WGS84) |
lon | number | Longitude (WGS84) |
parent_id | string? | Parent entity ID (null for top level) |
parent_name_local | string? | Parent name in local script |
parent_name_en | string? | Parent English name |
postal_code | string? | Postal code (deepest level only, where available) |