Géographie
Régions, départements, arrondissements et communes, avec leurs parents et enfants.
Essayer depuis cette page
Le bouton « Essayer » appelle l'API depuis votre navigateur. Sans clé, l'appel compte dans le quota anonyme (100 appels par jour et par adresse IP) ; avec une clé dans le champ Authorization, le quota passe à 1 000. La clé reste dans votre navigateur. Obtenir une clé
Paramètres de requête
page?integer
Format
int64Plage
1 <= valuePar défaut
1per_page?integer
Format
int64Plage
1 <= value <= 100Par défaut
20level?string
Valeurs possibles
- "region"
- "departement"
- "arrondissement"
- "ville"
- "commune"
parent_id?string
q?string
Sans accents ni casse ; « thies » trouve Thiès.
Longueur
1 <= lengthCorps de la réponse
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 }}Paramètres de requête
from*string
Identifiant de lieu ou « latitude,longitude ».
Longueur
1 <= lengthto*string
Identifiant de lieu ou « latitude,longitude ».
Longueur
1 <= lengthCorps de la réponse
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" }}Paramètres de requête
lat*number
Format
doublePlage
12.3 <= value <= 16.7lon*number
Format
doublePlage
-17.6 <= value <= -11.3Corps de la réponse
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"}