Skip to main content

Setup

Put them in your environment or .env; Data APIs covers the other ways.

Notes

  • Billing is in credits; the free plan has 3,000 credits a day. A geocode is 1 credit, a places page 1 credit per 20 places returned, a route 1 credit per waypoint pair plus surcharges.
  • Coordinate order differs by call: filter and bias strings are longitude first (circle:lon,lat,radius; rect:lon1,lat1,lon2,lat2; proximity:lon,lat), routing waypoints are latitude first unless prefixed lonlat:, and reverse geocoding takes separate lat and lon.
  • Responses are GeoJSON by default; pass format=json for a flat results list where the call offers it.

Endpoints

  • The default bias favours the country of the caller’s IP; pass bias=countrycode:none to turn it off.

Reverse geocode a coordinate

Autocomplete an address

  • 1 credit per request, so every keystroke costs; debounce.
  • Give filter or bias: one of them is required. 1 credit per 20 places returned, so a limit of 500 can cost 25 credits.

Get a place’s details

  • Each extra feature costs: details and building 1 credit each, an isoline 1 credit per 5 minutes, nearby places 1 credit per 20.

Get a route between waypoints

  • Cost: 1 credit per consecutive waypoint pair, plus 1 per avoid rule, 1 per pair each for route_details and elevation, 1 per 500 km, and a matrix charge when optimize_stops reorders more than three waypoints.