Maps & Geolocation
API Key
Mapbox REST API
Location data platform for mobile and web applications
Mapbox provides APIs and SDKs for custom interactive maps, geocoding, directions, and spatial analysis. Developers use Mapbox to add maps, search, navigation, and location intelligence to their applications with highly customizable vector maps and real-time traffic data.
Base URL
https://api.mapbox.com
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /geocoding/v5/mapbox.places/{query}.json | Forward geocoding - convert location text to geographic coordinates |
| GET | /geocoding/v5/mapbox.places/{longitude},{latitude}.json | Reverse geocoding - convert coordinates to place names |
| GET | /directions/v5/mapbox/{profile}/{coordinates} | Get directions between coordinates using driving, walking, or cycling profiles |
| GET | /styles/v1/{username}/{style_id} | Retrieve a style JSON document for rendering maps |
| GET | /styles/v1/{username}/{style_id}/tiles/{z}/{x}/{y} | Retrieve raster or vector tiles for a specific style |
| GET | /styles/v1/{username}/{style_id}/static/{overlay}/{lon},{lat},{zoom}/{width}x{height} | Generate static map images with custom markers and overlays |
| GET | /optimized-trips/v1/mapbox/{profile} | Solve the traveling salesman problem for route optimization |
| GET | /matching/v5/mapbox/{profile} | Snap GPS traces to the road network using map matching |
| GET | /isochrone/v1/mapbox/{profile}/{coordinates} | Get isochrone polygons showing reachable areas within time limits |
| GET | /directions-matrix/v1/mapbox/{profile} | Calculate travel times between multiple coordinates |
| GET | /tilequery/v1/{tileset_id}/{longitude},{latitude}.json | Query data from vector tilesets at specific coordinates |
| POST | /datasets/v1/{username} | Create a new dataset for storing custom geographic data |
| GET | /datasets/v1/{username}/{dataset_id}/features | List all features in a dataset |
| PUT | /datasets/v1/{username}/{dataset_id}/features/{feature_id} | Insert or update a feature in a dataset |
| GET | /tokens/v2/{username} | List access tokens for authentication and authorization |
Code Examples
# Forward geocoding example
curl "https://api.mapbox.com/geocoding/v5/mapbox.places/Los%20Angeles.json?access_token=pk.eyJ1IjoieW91cnVzZXJuYW1lIiwiYSI6InlvdXJ0b2tlbiJ9"
# Get driving directions
curl "https://api.mapbox.com/directions/v5/mapbox/driving/-122.42,37.78;-77.03,38.91?access_token=pk.eyJ1IjoieW91cnVzZXJuYW1lIiwiYSI6InlvdXJ0b2tlbiJ9&geometries=geojson&steps=true"
Connect Mapbox to AI
Deploy a Mapbox MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Mapbox through these tools:
geocode_address
Convert a text address or place name into geographic coordinates (latitude/longitude) for mapping and location-based operations
reverse_geocode
Convert geographic coordinates into human-readable address information and place names
calculate_route
Calculate optimal driving, walking, or cycling routes between multiple waypoints with turn-by-turn directions and estimated travel time
generate_static_map
Create static map images with custom markers, overlays, and styling for embedding in documents or applications
calculate_isochrone
Generate isochrone polygons showing all areas reachable from a point within specified time limits for location analysis
optimize_trip
Optimize the order of multiple stops to find the most efficient route using traveling salesman problem solving
query_location_data
Query geographic features and custom data at specific coordinates from vector tilesets
Deploy in 60 seconds
Describe what you need, AI generates the code, and IOX deploys it globally.
Deploy Mapbox MCP Server →