Mapbox
Mapbox
Tool
Matrix Tool
matrix_toolCalculates travel times and distances between multiple points using Mapbox Matrix API.
Pricing
Per call
$0.01
Model
flat
Pay only for what you use. No subscriptions.
Inputs
bearings
stringsources
stringprofile *
stringdestinations
stringcoordinates *
arrayannotations
stringapproaches
stringTry It
API
MCP Config
Input Parameters
A semicolon-separated list of headings and allowed deviation indicating the direction of movement. Input as two comma-separated values per location: a heading course measured clockwise from true north between 0 and 360, and the range of degrees by which the angle can deviate (recommended value is 45° or 90°), formatted as {angle,degrees}. If provided, the number of bearings must equal the number of coordinates. You can skip a coordinate and show its position in the list with the ; separator.
Use the coordinates at given indices as sources. Possible values are: a semicolon-separated list of 0-based indices, or "all" (default). The option "all" allows using all coordinates as sources.
Routing profile for different modes of transport. Options:
- driving-traffic: automotive with current traffic conditions (limited to 10 coordinates)
- driving: automotive based on typical traffic
- walking: pedestrian/hiking
- cycling: bicycle
Use the coordinates at given indices as destinations. Possible values are: a semicolon-separated list of 0-based indices, or "all" (default). The option "all" allows using all coordinates as destinations.
Array of coordinate objects with longitude and latitude properties. Must include at least 2 coordinate pairs. Up to 25 coordinates total are supported for most profiles (10 for driving-traffic).
Specifies the resulting matrices. Possible values are: duration (default), distance, or both values separated by a comma.
A semicolon-separated list indicating the side of the road from which to approach waypoints. Accepts "unrestricted" (default, route can arrive at the waypoint from either side of the road) or "curb" (route will arrive at the waypoint on the driving_side of the region). If provided, the number of approaches must be the same as the number of waypoints. You can skip a coordinate and show its position with the ; separator.

