Geography
Regions, departments, districts and communes, with their parents and children.
Try it from this page
The "Try" button calls the API from your browser. Without a key, the call counts against the anonymous quota (100 calls per day and per IP address); with a key in the Authorization field, the quota rises to 1,000. The key stays in your browser. Get a key
Query Parameters
page?integer
Format
int64Range
1 <= valueDefault
1per_page?integer
Format
int64Range
1 <= value <= 100Default
20level?string
Value in
- "region"
- "departement"
- "arrondissement"
- "ville"
- "commune"
parent_id?string
q?string
Ignores accents and case; "thies" finds Thiès.
Length
1 <= lengthResponse Body
application/json
application/json
curl -X GET "https://example.com/v1/geographie"{ "data": [ { "id": "string", "lat": 0, "level": "string", "lon": 0, "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0, "search_key": "string" } ], "meta": { "attribution": "string", "licence": "string", "source": "string", "verified_on": "string", "version": "string" }, "pagination": { "page": 0, "per_page": 0, "total": 0, "total_pages": 0 }}Query Parameters
from*string
Place identifier or "latitude,longitude".
Length
1 <= lengthto*string
Place identifier or "latitude,longitude".
Length
1 <= lengthResponse Body
application/json
application/json
curl -X GET "https://example.com/v1/geographie/distance?from=reg_om6lpn2l&to=14.7910%2C-16.9359"{ "avertissements": [ "string" ], "description": "string", "distance_km": 0.1, "distance_m": 0, "from": { "entree": "string", "lat": 0.1, "lieu": { "contexte": "Dakar Plateau, Dakar, Dakar", "coordonnees": { "lat": 0.1, "lon": 0.1, "precision": "region" }, "id": "string", "level": "region", "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0 }, "lon": 0.1, "precision": "string" }, "methode": "vol_oiseau", "to": { "entree": "string", "lat": 0.1, "lieu": { "contexte": "Dakar Plateau, Dakar, Dakar", "coordonnees": { "lat": 0.1, "lon": 0.1, "precision": "region" }, "id": "string", "level": "region", "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0 }, "lon": 0.1, "precision": "string" }}Query Parameters
lat*number
Format
doubleRange
12.3 <= value <= 16.7lon*number
Format
doubleRange
-17.6 <= value <= -11.3Response Body
application/json
application/json
curl -X GET "https://example.com/v1/geographie/rattacher?lat=14.6928&lon=-17.4467"{ "arrondissement": { "id": "string", "lat": 0, "level": "string", "lon": 0, "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0, "search_key": "string" }, "avertissements": [ "string" ], "commune": { "id": "string", "lat": 0, "level": "string", "lon": 0, "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0, "search_key": "string" }, "departement": { "id": "string", "lat": 0, "level": "string", "lon": 0, "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0, "search_key": "string" }, "distance_centroide_km": 0, "lat": 0.1, "lon": 0.1, "methode": "contour", "precision": "string", "region": { "id": "string", "lat": 0, "level": "string", "lon": 0, "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0, "search_key": "string" }, "sources": [ { "licence": "string", "official": true, "title": "string", "url": "string" } ]}curl -X GET "https://example.com/v1/geographie/string"{ "ancestors": [ { "id": "string", "lat": 0, "level": "string", "lon": 0, "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0, "search_key": "string" } ], "children": [ { "id": "string", "lat": 0, "level": "string", "lon": 0, "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0, "search_key": "string" } ], "id": "string", "lat": 0, "level": "string", "lon": 0, "name": "string", "name_source": "string", "parent_id": "string", "population_2023": 0, "search_key": "string"}