API — Mauritania (MR)

15 wilayas, 63 moughataas, 238 communes.

Endpoints

GET /api/v1/countries/mr.json
Full dataset — all levels, all records
GET /api/v1/mr/wilaya.json
All 15 wilayas (ولاية)
GET /api/v1/mr/moughataa.json
All 63 moughataas (مقاطعة)
GET /api/v1/mr/commune.json
All 238 communes (بلدية)
GET /api/v1/mr/wilaya/{slug}.json
Single wilaya with children
Example: /api/v1/mr/wilaya/adrar-mr07.json

Quick Start

JavaScript

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

Python

import requests
data = requests.get('https://openadmindata.org/api/v1/countries/mr.json').json()
wilayas = data['data']['wilaya']
print(f"Mauritania: {len(wilayas)} wilayas")

cURL

curl -s https://openadmindata.org/api/v1/mr/wilaya.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)