Mapbox Geocoding API
Mapbox Geocoding API (part of Mapbox Search) converts addresses to coordinates and vice versa, with global coverage and structured feature types.
Source
Endpoints (v6)
| Type | Use |
|---|---|
| Forward | mapbox.places — query string → ranked features |
| Reverse | lat,lon → nearest address/place/POI |
Returns GeoJSON-like features with place_type, relevance, and bounding boxes.
Example
bash
curl "https://api.mapbox.com/search/geocode/v6/forward?q=1600+pennsylvania&access_token=YOUR_TOKEN"Tips
- Set
proximityto bias results near a map center - Use
typesfilter (address,place,poi, …) to reduce noise - Cache responses — geocoding is billed per request