Skip to content

Developers

Quickstart: geocode an address

Resolve an address to coordinates. You'll need an API key — see get started.

1. Send the request

Pass your key in the X-API-Key header.

curl "https://airfreemap.com/api/v1/geocoding/search?q=Flinders+St+Station&limit=1" \
  -H "X-API-Key: $AIRFREE_MAPS_KEY"

2. Read the response

A GeoJSON FeatureCollection. The first feature is the best match; its coordinates are [lng, lat].

json
{
  "type": "FeatureCollection",
  "features": [{
    "type": "Feature",
    "properties": { "place_name": "Flinders Street Station, Melbourne VIC 3000, Australia" },
    "geometry": { "type": "Point", "coordinates": [144.9671, -37.8183] }
  }],
  "attribution": "© OpenStreetMap contributors"
}

3. Next steps