Returns a GeoJSON FeatureCollection of addresses matching the search query. Each result includes coordinates (lat/lon), full address label, street name, postal code, city, and a relevance score. Use this to geocode addresses (convert address text to coordinates).
From spec: Geocode an address query to get matching locations with coordinates. Returns a GeoJSON FeatureCollection.
Usage Tips
- Maximum results: 20 per request (use limit parameter)
- Supports house numbers, streets, localities, and municipalities
- Add type=housenumber to filter for exact addresses
- Coordinates are in EPSG:4326 (WGS84) format
import requests
resp = requests.get(
"https://api-adresse.data.gouv.fr/search",
params={
'q': '20 avenue de Segur',
'type': 'housenumber',
},
)
data = resp.json()
import zingu_apis
api = zingu_apis.api("api-adresse")
result = api.fetch("search", q="20 avenue de Segur", type="housenumber")
for item in result:
print(item)
const resp = await fetch("https://api-adresse.data.gouv.fr/search?q=20+avenue+de+Segur&type=housenumber");
const data = await resp.json();