# Mapbox Directions

> Mapbox Directions is a paid API for AI agents from Mapbox at mapbox.mpp.paywithlocus.com, paid per call via MPP, $0.005/call, status healthy (last checked 2026-10-09, last successful call 2026-09-12).

Calculates turn-by-turn routes between coordinates using driving, walking, or cycling profiles with traffic and road exclusion options

## Facts

- Endpoint: POST https://mapbox.mpp.paywithlocus.com/mapbox/directions?utm_source=zero.xyz
- Price: $0.005/call
- Payment: MPP
- Status: healthy
- Last checked: 2026-10-09
- Last successful call: 2026-09-12
- Success rate: 67% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 3
- Provider: Mapbox
- Docs: https://docs.mapbox.com/api/
- Website: https://www.mapbox.com
- Tags: maps, geocoding, directions, routing, geospatial, data
- Canonical page: https://www.zero.xyz/c/mapbox-directions-c8b758e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mQ1zpld5kPqOtqhA-byFp

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability mapbox-directions-c8b758e1 -d '<json body>'
```

Example prompt: Give me walking directions with turn-by-turn steps in English from Times Square (-73.9855, 40.7580) to the National Mall in Washington DC (-77.0366, 38.8971), returning the route as GeoJSON with a simplified overview.

## When to prefer this

Use this endpoint when you need point-to-point or multi-waypoint routing with rich navigation data including turn-by-turn instructions, traffic-aware driving, road type exclusions, and detailed geometry. Prefer over Matrix when you need full route details rather than just distance/duration summaries, and over Isochrone when you have a specific destination rather than a reachability area.

## Known failure modes

- Invalid coordinates format (not semicolon-separated lon,lat pairs) returns 422
- Unsupported routing profile string returns validation error
- Coordinates outside routable road network returns no-route error
- Too many waypoints exceeds API limits
- Invalid language code returns fallback or error
- Excluding too many road types may make route impossible

## How this service works

Get driving, walking, cycling, or traffic-aware routes between 2-25 coordinates.

## Output

Returns one or more route objects containing geometry (GeoJSON, polyline, or polyline6), total distance and duration, step-by-step maneuver instructions with street names, and optional annotations like speed, congestion, and max speed per road segment.

## Example request

```json
{
 "steps": true,
 "profile": "mapbox/driving",
 "language": "en",
 "overview": "simplified",
 "geometries": "geojson",
 "coordinates": "-73.9855,40.7580;-74.0060,40.7128"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "profile",
  "coordinates"
 ],
 "properties": {
  "steps": {
   "type": "boolean",
   "description": "Include turn-by-turn instructions"
  },
  "exclude": {
   "type": "string",
   "description": "Road types to exclude: motorway, toll, ferry, unpaved, cash_only_tolls"
  },
  "profile": {
   "type": "string",
   "description": "Routing profile: mapbox/driving, mapbox/driving-traffic, mapbox/walking, mapbox/cycling"
  },
  "language": {
   "type": "string",
   "description": "Language for turn instructions (e.g. \"en\")"
  },
  "overview": {
   "type": "string",
   "description": "Route geometry detail: full, simplified, false"
  },
  "geometries": {
   "type": "string",
   "description": "Response geometry format: geojson, polyline, polyline6"
  },
  "annotations": {
   "type": "string",
   "description": "Comma-separated: distance, duration, speed, congestion, maxspeed, closure"
  },
  "coordinates": {
   "type": "string",
   "description": "Semicolon-separated lon,lat pairs (e.g. \"-73.99,40.73;-77.03,38.90\")"
  },
  "alternatives": {
   "type": "boolean",
   "description": "Return up to 2 alternative routes"
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapbox-directions-c8b758e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mapbox.mpp.paywithlocus.com](https://www.zero.xyz/host/mapbox.mpp.paywithlocus.com/llms.txt)
