The Mapbox connector lets your AI agent act in each user's Mapbox account. Each user connects their own Mapbox API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 20 tools.
- Tools
- 20
- What they doRead · write · destructive
- 20 · 0 · 020 read0 write0 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Mapbox connection
In AgentKit > Connections, create a Mapbox connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'mapbox'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Mapbox:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'mapbox_geocode_forward_structured',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "mapbox"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Mapbox:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="mapbox_geocode_forward_structured",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Mapbox credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolmapbox_dataset_feature_getGet one GeoJSON feature from a Mapbox dataset by its ID.Read-onlyGet Dataset Feature
Get one GeoJSON feature from a Mapbox dataset by its ID. Returns the feature with id, geometry and properties. Use mapbox_dataset_feature_get when you know the feature ID. Use mapbox_dataset_features_list to browse. Needs a token with the datasets:read scope.
Inputs
dataset_idstringrequired- ID of the dataset, from mapbox_datasets_list. Example: cjvf1msb3060i2vp6bq9m7t6l.
feature_idstringrequired- ID of the feature, from mapbox_dataset_features_list. Example: f6d9.
usernamestringrequired- The Mapbox username of the account that owns the datasets, shown in the Mapbox console. Example: mapbox-user.
mapbox_dataset_features_listList the GeoJSON features stored in a Mapbox dataset.Read-onlyList Dataset Features
List the GeoJSON features stored in a Mapbox dataset. Returns a GeoJSON FeatureCollection; each feature has id, geometry and properties. Use mapbox_dataset_features_list to read a dataset's data. Use mapbox_dataset_feature_get for one feature by ID. Needs a token with the datasets:read scope. To get the next page, pass the id of the last feature as start, and stop when no features come back.
Inputs
dataset_idstringrequired- ID of the dataset, from mapbox_datasets_list. Example: cjvf1msb3060i2vp6bq9m7t6l.
usernamestringrequired- The Mapbox username of the account that owns the datasets, shown in the Mapbox console. Example: mapbox-user.
limitinteger- Maximum number of features, from 1 to 1000. Defaults to 1000. Example: 100.
startstring- ID of the last feature on the previous page, to list the features after it. Example: f6d9.
mapbox_dataset_getGet the metadata of one Mapbox dataset.Read-onlyGet Dataset
Get the metadata of one Mapbox dataset. Returns id, name, description, owner, created, modified, bounds, features (the count) and size in bytes. Use mapbox_dataset_get to inspect one dataset. Use mapbox_dataset_features_list to read its features. Needs a token with the datasets:read scope.
Inputs
dataset_idstringrequired- ID of the dataset, from mapbox_datasets_list. Example: cjvf1msb3060i2vp6bq9m7t6l.
usernamestringrequired- The Mapbox username of the account that owns the datasets, shown in the Mapbox console. Example: mapbox-user.
mapbox_datasets_listList the datasets in a Mapbox account.Read-onlyList Datasets
List the datasets in a Mapbox account. Returns an array of datasets, each with id, name, description, owner, created, modified, bounds, feature count and size. Use mapbox_datasets_list to find a dataset_id. Use mapbox_dataset_get for one dataset and mapbox_dataset_features_list for its features. Needs a token with the datasets:list scope. Mapbox can return fewer than limit before the end; to get the next page, pass the id of the last dataset as start, and stop when a page comes back empty.
Inputs
usernamestringrequired- The Mapbox username of the account that owns the datasets, shown in the Mapbox console. Example: mapbox-user.
limitinteger- Maximum number of datasets to return. Example: 20.
sortbystring- Sort order: modified (most recently changed first) or created (oldest first). Example: modified.one of
modifiedcreated startstring- ID of the last dataset on the previous page, to list the datasets after it. Example: cjvf1msb3060i2vp6bq9m7t6l.
mapbox_directions_getGet a route between 2 to 25 points for driving, driving with traffic, walking or cycling from the Mapbox Directions API.Read-onlyGet Directions
Get a route between 2 to 25 points for driving, driving with traffic, walking or cycling from the Mapbox Directions API. Returns routes, each with distance in meters, duration in seconds, geometry and legs (with turn-by-turn steps when steps is true), plus the snapped waypoints and a code such as Ok or NoRoute. Use mapbox_directions_get to route through points in the given order. Use mapbox_optimized_trip_get to find the best visiting order, mapbox_matrix_get for travel times between many points, and mapbox_map_matching_get to snap a recorded GPS trace. Get coordinates from mapbox_geocode_forward or mapbox_search_forward when you only have addresses.
Inputs
coordinatesstringrequired- The points to route through, in order, as 2 to 25 longitude,latitude pairs separated by semicolons. Example: -122.42,37.78;-122.45,37.91.
profilestringrequired- Routing profile: driving-traffic (car, with live and historic traffic), driving (car), walking or cycling. Sent as mapbox/<profile>. Example: driving.one of
driving-trafficdrivingwalkingcycling alternativesboolean- Set true to also return up to two alternative routes when they exist. Defaults to false. Example: true.
annotationsstring- Extra per-segment data to return, comma-separated: distance, duration, speed, congestion, congestion_numeric, maxspeed, closure. Needs overview set to full. Congestion and closure are only available for driving-traffic. Example: distance,duration.
approachesstring- Side of the road to arrive from at each waypoint, semicolon-separated: unrestricted (default) or curb. Give one value per waypoint; leave a position empty to skip it. The first value is not used, so start the list with a semicolon. Example: ;curb.
arrive_bystring- Desired arrival time, in the same ISO 8601 formats as depart_at. Only for the driving profile. Example: 2026-12-01T09:00.
bearingsstring- Direction of travel at each coordinate, semicolon-separated, each as angle,deviation in degrees clockwise from true north (deviation 45 or 90 is typical). Leave a position empty to skip it. Example: 60,45;;45,45.
continue_straightboolean- Set true to keep going in the same direction after an intermediate waypoint, or false to allow a U-turn. Defaults to true for driving and false for walking and cycling. Example: false.
depart_atstring- Departure time, in ISO 8601 format YYYY-MM-DDThh:mm:ssZ, YYYY-MM-DDThh:mm:ss±hh:mm or YYYY-MM-DDThh:mm (local time at the first coordinate). Only for driving and driving-traffic. Do not combine with arrive_by. Example: 2026-12-01T08:30.
excludestring- Road types to avoid, comma-separated: motorway, toll, ferry, unpaved, cash_only_tolls, tunnel, country_border, state_border (most only for driving and driving-traffic). Avoidance is best effort. Example: toll,ferry.
geometriesstring- Format of returned route geometry: geojson (a GeoJSON LineString), polyline (precision 5, the default) or polyline6 (precision 6). Use geojson to read coordinates directly. Example: geojson.one of
geojsonpolylinepolyline6 languagestring- Language of turn-by-turn instruction text, such as en, de or es. Defaults to en. Only used with steps set to true. Example: de.
max_heightnumber- Vehicle height in meters, 0 to 10, to avoid roads with lower limits. Driving profiles only. Example: 3.5.
max_weightnumber- Vehicle weight in metric tons, 0 to 100, to avoid roads with lower limits. Driving profiles only. Example: 7.5.
max_widthnumber- Vehicle width in meters, 0 to 10, to avoid narrower roads. Driving profiles only. Example: 2.5.
overviewstring- Detail of the overview geometry: full, simplified (the default) or false for none. Example: full.one of
fullsimplifiedfalse radiusesstring- Maximum distance in meters each coordinate may move to snap to the road network, one value per coordinate separated by semicolons; leave a position empty to use the default. Values: any number greater than 0 or unlimited. Example: 50;;100.
stepsboolean- Set true to return turn-by-turn steps and instructions. Defaults to false. Example: true.
waypoint_namesstring- Names for the waypoints, semicolon-separated, used in arrival instructions; the first is the origin. Up to 500 characters in total. Only used with steps set to true. Example: Home;Work.
waypointsstring- Zero-based indexes of the coordinates to treat as waypoints (start and end of legs), semicolon-separated. Must include 0 and the last index. Other coordinates only shape the path. Example: 0;2.
mapbox_geocode_batchRun many forward, structured and reverse geocoding queries in one Mapbox Geocoding v6 request.Read-onlyBatch Geocode
Run many forward, structured and reverse geocoding queries in one Mapbox Geocoding v6 request. Returns batch, an array with one GeoJSON FeatureCollection per query in the order sent; a query with no match has an empty features array. Use mapbox_geocode_batch for a list of addresses or coordinates. Use mapbox_geocode_forward or mapbox_geocode_reverse for a single lookup.
Inputs
queriesarrayrequired- The geocoding queries to run, in order. Each item is one forward query (q plus optional filters such as types, country, bbox, proximity or limit), one structured query (address_number, street, place, region, postcode, country and so on) or one reverse query (longitude and latitude). Filters with several values can be arrays or comma-separated strings. Mapbox documents up to 1000 queries per request, but its error table also names a 50-query limit, so send 50 or fewer per call. Each query is billed as one Geocoding request. Example: [{"q": "1600 Pennsylvania Avenue NW, Washington, DC 20500", "types": ["address"], "limit": 1}, {"longitude": -73.986136, "latitude": 40.748895, "types": ["address"]}].
permanentboolean- Set true when you intend to store the results (permanent geocoding). Permanent geocoding needs a credit card on file or an enterprise contract on the Mapbox account and is billed at a different rate. Defaults to false (temporary results that must not be cached). Example: false.
mapbox_geocode_forwardConvert an address or place name in free text into coordinates with Mapbox Geocoding v6.Read-onlyGeocode Address
Convert an address or place name in free text into coordinates with Mapbox Geocoding v6. Returns a GeoJSON FeatureCollection; each feature has the coordinates, full_address, feature_type, match_code and the context (street, place, region, postcode, country). Use mapbox_geocode_forward for one free-text address. Use mapbox_geocode_forward_structured when the address is already split into parts, mapbox_geocode_batch for many addresses, and mapbox_search_forward to find businesses and points of interest, which Geocoding v6 does not return.
Inputs
qstringrequired- The address or place to look up, such as a full address, a city or a postcode. At most 256 characters and 20 words, with no semicolon. Example: 2 Lincoln Memorial Circle SW, Washington, DC.
autocompleteboolean- Set false to return only exact matches instead of results that start with the query (true is the default). Use false for complete addresses. Example: false.
bboxstring- Limit results to a bounding box, as four comma-separated numbers in minLon,minLat,maxLon,maxLat order. The box cannot cross the 180th meridian. Example: -74.27,40.49,-73.68,40.92.
countrystring- Limit results to one or more countries, as comma-separated ISO 3166 alpha-2 codes. Example: us,ca.
languagestring- Language of the returned text, as an IETF language tag. List several, comma-separated, to get translations; the first is the primary language. Example: en.
limitinteger- Maximum number of results, from 1 to 10. Defaults to 5. Example: 3.
permanentboolean- Set true when you intend to store the results (permanent geocoding). Permanent geocoding needs a credit card on file or an enterprise contract on the Mapbox account and is billed at a different rate. Defaults to false (temporary results that must not be cached). Example: false.
proximitystring- Bias results toward a location, as longitude,latitude, or the string ip to bias by the caller's IP address. Example: -73.99,40.73.
typesstring- Return only these feature types, comma-separated. Options: country, region, postcode, district, place, locality, neighborhood, street and address. Example: address,street.
worldviewstring- Return boundaries and names as seen by a regional audience. Defaults to us. Example: in.one of
arcninjpmarsrutrus
mapbox_geocode_forward_structuredConvert an address that is already split into parts (house number, street, city, region, postcode, country) into coordinates with Mapbox Geocoding v6.Read-onlyGeocode Structured Address
Convert an address that is already split into parts (house number, street, city, region, postcode, country) into coordinates with Mapbox Geocoding v6. Returns a GeoJSON FeatureCollection; each feature has the coordinates, full_address, feature_type, match_code and context. Use mapbox_geocode_forward_structured when you have address fields from a form or database; give at least one address part. Use mapbox_geocode_forward for a single free-text address.
Inputs
address_line1string- House number and street in one line. Use this or address_number and street. Example: 1600 Pennsylvania Ave NW.
address_numberstring- House number on its own, used with street. Example: 1600.
autocompleteboolean- Set false to return only exact matches; Mapbox recommends false for structured input. Defaults to true. Example: false.
bboxstring- Limit results to a bounding box, as four comma-separated numbers in minLon,minLat,maxLon,maxLat order. The box cannot cross the 180th meridian. Example: -74.27,40.49,-73.68,40.92.
blockstring- Block, an address component in some countries such as Japan. Example: 1丁目.
countrystring- Country as an ISO 3166 alpha-2 code, which strictly filters results, or a full country name, which only biases them. Example: us.
languagestring- Language of the returned text, as an IETF language tag. List several, comma-separated, to get translations; the first is the primary language. Example: en.
limitinteger- Maximum number of results, from 1 to 10. Defaults to 5. Example: 1.
localitystring- Official sub-city area used in postal addresses in some countries, such as an arrondissement in France. Example: 7e Arrondissement.
neighborhoodstring- Neighborhood name. Example: Foggy Bottom.
permanentboolean- Set true when you intend to store the results (permanent geocoding). Permanent geocoding needs a credit card on file or an enterprise contract on the Mapbox account and is billed at a different rate. Defaults to false (temporary results that must not be cached). Example: false.
placestring- City, town or village. Example: Washington.
postcodestring- Postal code. Example: 20500.
proximitystring- Bias results toward a location, as longitude,latitude, or the string ip to bias by the caller's IP address. Example: -73.99,40.73.
regionstring- State, province or other top-level region. Example: DC.
streetstring- Street name on its own, used with address_number. Example: Pennsylvania Ave NW.
typesstring- Return only these feature types, comma-separated. Options: country, region, postcode, district, place, locality, neighborhood, street and address. Example: address,street.
worldviewstring- Return boundaries and names as seen by a regional audience. Defaults to us. Example: in.one of
arcninjpmarsrutrus
mapbox_geocode_reverseLook up the address and places at a longitude and latitude with Mapbox Geocoding v6.Read-onlyReverse Geocode
Look up the address and places at a longitude and latitude with Mapbox Geocoding v6. Returns a GeoJSON FeatureCollection of the address, street, neighborhood, place, region, postcode and country at that point, each with full_address and context. Use mapbox_geocode_reverse to turn coordinates into an address. Use mapbox_search_reverse to also get points of interest near the point.
Inputs
latitudenumberrequired- Latitude of the location to look up, in decimal degrees between -90 and 90. Example: 40.733.
longitudenumberrequired- Longitude of the location to look up, in decimal degrees between -180 and 180. Example: -73.989.
countrystring- Limit results to one or more countries, as comma-separated ISO 3166 alpha-2 codes. Example: us,ca.
languagestring- Language of the returned text, as an IETF language tag. List several, comma-separated, to get translations; the first is the primary language. Example: en.
limitinteger- Maximum number of results, from 1 to 5. Defaults to 1 per level (one address, one place, one region and so on). A value above 1 requires exactly one value in types. Example: 3.
permanentboolean- Set true when you intend to store the results (permanent geocoding). Permanent geocoding needs a credit card on file or an enterprise contract on the Mapbox account and is billed at a different rate. Defaults to false (temporary results that must not be cached). Example: false.
typesstring- Return only these feature types, comma-separated. Options: country, region, postcode, district, place, locality, neighborhood, street and address. Example: address,street.
worldviewstring- Return boundaries and names as seen by a regional audience. Defaults to us. Example: in.one of
arcninjpmarsrutrus
mapbox_isochrone_getCalculate the area reachable from a point within given travel times or distances with the Mapbox Isochrone API.Read-onlyGet Isochrone
Calculate the area reachable from a point within given travel times or distances with the Mapbox Isochrone API. Returns a GeoJSON FeatureCollection with one contour per requested time or distance, as lines or polygons, with contour value and color properties. Use mapbox_isochrone_get to answer what can be reached within N minutes or meters. Use mapbox_matrix_get for travel times to specific points.
Inputs
coordinatesstringrequired- The center point, as one longitude,latitude pair. Example: -118.22258,33.99038.
profilestringrequired- Routing profile: driving-traffic (car, with live and historic traffic), driving (car), walking or cycling. Sent as mapbox/<profile>. Example: driving.one of
driving-trafficdrivingwalkingcycling contours_colorsstring- Hex colors without # for each contour, comma-separated, one per contour. Example: 6706ce,04e813,4286f4.
contours_metersstring- Travel distances in meters for up to four contours, comma-separated in increasing order, each at most 100000. Provide this or contours_minutes. Example: 1000,2000.
contours_minutesstring- Travel times in minutes for up to four contours, comma-separated in increasing order, each at most 60. Provide this or contours_meters. Example: 5,10,15.
denoisenumber- From 0.0 to 1.0: drops contours smaller than this fraction of the largest one. Defaults to 1.0, which keeps only the largest. Example: 0.5.
depart_atstring- Departure time, in ISO 8601 format YYYY-MM-DDThh:mm:ssZ, YYYY-MM-DDThh:mm:ss±hh:mm or YYYY-MM-DDThh:mm (local time at the first coordinate). Defaults to now. Contours reflect traffic at that time. Example: 2026-12-01T08:30.
excludestring- Road types to avoid, comma-separated: motorway, toll, ferry, unpaved, cash_only_tolls (driving and driving-traffic only). Avoidance is best effort. Example: toll,ferry.
generalizenumber- Simplification tolerance in meters for the contour shapes. Example: 50.
polygonsboolean- Set true to return contours as polygons instead of lines (false is the default). Example: true.
mapbox_map_matching_getSnap a recorded GPS trace to the road and path network with the Mapbox Map Matching API.Read-onlyMatch GPS Trace
Snap a recorded GPS trace to the road and path network with the Mapbox Map Matching API. Returns matchings, each with confidence (0 to 1), distance, duration, geometry and legs, plus tracepoints that map each input point to the network (null for dropped points). Use mapbox_map_matching_get to clean up a recorded trip or measure the distance actually driven. Use mapbox_directions_get to plan a new route.
Inputs
coordinatesstringrequired- The recorded trace, as 2 to 100 longitude,latitude pairs separated by semicolons, in the order recorded. Example: -117.17282,32.71204;-117.17288,32.71225;-117.17293,32.71244.
profilestringrequired- Routing profile: driving-traffic (car, with live and historic traffic), driving (car), walking or cycling. Sent as mapbox/<profile>. Example: driving.one of
driving-trafficdrivingwalkingcycling annotationsstring- Extra per-segment data to return, comma-separated: distance, duration, speed, congestion, congestion_numeric, maxspeed. Needs overview set to full. Example: distance,duration.
approachesstring- Side of the road to arrive from at each waypoint, semicolon-separated: unrestricted (default) or curb. Give one value per waypoint; leave a position empty to skip it. Needs steps set to true. Example: ;curb.
depart_atstring- Departure time, in ISO 8601 format YYYY-MM-DDThh:mm:ssZ, YYYY-MM-DDThh:mm:ss±hh:mm or YYYY-MM-DDThh:mm (local time at the first coordinate). Defaults to now. Example: 2026-12-01T08:30.
geometriesstring- Format of returned route geometry: geojson (a GeoJSON LineString), polyline (precision 5, the default) or polyline6 (precision 6). Use geojson to read coordinates directly. Example: geojson.one of
geojsonpolylinepolyline6 ignorestring- Routing restrictions to ignore, comma-separated: access, oneways, restrictions. Driving profile only. Example: oneways.
languagestring- Language of turn-by-turn instruction text, such as en, de or es. Defaults to en. Only used with steps set to true. Example: de.
overviewstring- Detail of the overview geometry: full, simplified (the default) or false for none. Example: full.one of
fullsimplifiedfalse radiusesstring- Maximum distance in meters each coordinate may move to snap to the road network, one value per coordinate separated by semicolons; leave a position empty to use the default. Values: 0 to 50, default 5; use 20 to 50 for noisy GPS. Example: 50;;100.
stepsboolean- Set true to return turn-by-turn steps and instructions. Defaults to false. Example: true.
tidyboolean- Set true to remove clusters and resample the trace before matching. Defaults to false. Example: true.
timestampsstring- Unix timestamps in seconds, one per coordinate, semicolon-separated and ascending. Strongly improves matching. Example: 1700000000;1700000005;1700000010.
waypoint_namesstring- Names for the waypoints, semicolon-separated, used in arrival instructions; the first is the origin. Up to 500 characters in total. Only used with steps set to true. Example: Home;Work.
waypointsstring- Zero-based indexes of the coordinates to treat as waypoints (start and end of legs), semicolon-separated. Must include 0 and the last index. Other coordinates only shape the path. Example: 0;2.
mapbox_matrix_getCalculate travel times and distances between many origins and destinations at once with the Mapbox Matrix API.Read-onlyGet Travel Time Matrix
Calculate travel times and distances between many origins and destinations at once with the Mapbox Matrix API. Returns durations (seconds) and, when requested, distances (meters) as arrays indexed [source][destination], plus the snapped sources and destinations; unreachable pairs are null. Use mapbox_matrix_get to compare or rank many trips, such as finding the nearest of several stores. Use mapbox_directions_get for the route geometry and steps of one trip.
Inputs
coordinatesstringrequired- The points, as 2 to 25 longitude,latitude pairs separated by semicolons (at most 10 for driving-traffic). Example: -122.42,37.78;-122.45,37.91;-122.48,37.73.
profilestringrequired- Routing profile: driving-traffic (car, with live and historic traffic), driving (car), walking or cycling. Sent as mapbox/<profile>. Example: driving.one of
driving-trafficdrivingwalkingcycling annotationsstring- Which matrices to return: duration (the default), distance, or duration,distance for both. Example: duration,distance.one of
durationdistanceduration,distancedistance,duration approachesstring- Side of the road to arrive from at each waypoint, semicolon-separated: unrestricted (default) or curb. Give one value per waypoint; leave a position empty to skip it. Example: ;curb.
bearingsstring- Direction of travel at each coordinate, semicolon-separated, each as angle,deviation in degrees clockwise from true north (deviation 45 or 90 is typical). Leave a position empty to skip it. Example: 60,45;;45,45.
depart_atstring- Departure time, in ISO 8601 format YYYY-MM-DDThh:mm:ssZ, YYYY-MM-DDThh:mm:ss±hh:mm or YYYY-MM-DDThh:mm (local time at the first coordinate). It cannot be in the past, and Mapbox enables it per account on request. Example: 2026-12-01T08:30.
destinationsstring- Zero-based indexes of the coordinates to use as destinations, semicolon-separated, or all (the default). Example: 1;2.
fallback_speednumber- Speed in km/h used to estimate a straight-line value when no route exists between two points, instead of returning null. Example: 30.
sourcesstring- Zero-based indexes of the coordinates to use as origins, semicolon-separated, or all (the default). Example: 0.
mapbox_optimized_trip_getFind the fastest order to visit 2 to 12 stops with the Mapbox Optimization API v1, a traveling-salesman solver.Read-onlyOptimize Trip
Find the fastest order to visit 2 to 12 stops with the Mapbox Optimization API v1, a traveling-salesman solver. Returns trips (distance, duration, geometry and legs of the optimized route) and waypoints, each with waypoint_index giving its position in the optimized order. Use mapbox_optimized_trip_get when the visiting order is free, for example a delivery round. Use mapbox_directions_get when the order is fixed.
Inputs
coordinatesstringrequired- The stops to visit, as 2 to 12 longitude,latitude pairs separated by semicolons. The first is the start and, by default, the end of the trip. Example: 13.388860,52.517037;13.397634,52.529407;13.428555,52.523219.
profilestringrequired- Routing profile: driving-traffic (car, with live and historic traffic), driving (car), walking or cycling. Sent as mapbox/<profile>. Example: driving.one of
driving-trafficdrivingwalkingcycling annotationsstring- Extra per-segment data to return, comma-separated: duration, distance, speed. Needs overview set to full. Example: distance,duration.
approachesstring- Side of the road to arrive from at each waypoint, semicolon-separated: unrestricted (default) or curb. Give one value per waypoint; leave a position empty to skip it. Needs steps set to true. Example: ;curb.
bearingsstring- Direction of travel at each coordinate, semicolon-separated, each as angle,deviation in degrees clockwise from true north (deviation 45 or 90 is typical). Leave a position empty to skip it. Needs radiuses. Example: 60,45;;45,45.
destinationstring- Where the trip ends: any (the default) or last. Example: last.one of
anylast distributionsstring- Pick-up and drop-off pairs, semicolon-separated, each as pickupIndex,dropoffIndex of the coordinates; each pick-up is visited before its drop-off. The first coordinate cannot be a drop-off. Example: 3,1.
geometriesstring- Format of returned route geometry: geojson (a GeoJSON LineString), polyline (precision 5, the default) or polyline6 (precision 6). Use geojson to read coordinates directly. Example: geojson.one of
geojsonpolylinepolyline6 languagestring- Language of turn-by-turn instruction text, such as en, de or es. Defaults to en. Only used with steps set to true. Example: de.
overviewstring- Detail of the overview geometry: full, simplified (the default) or false for none. Example: full.one of
fullsimplifiedfalse radiusesstring- Maximum distance in meters each coordinate may move to snap to the road network, one value per coordinate separated by semicolons; leave a position empty to use the default. Values: any number greater than 0 or unlimited. Example: 50;;100.
roundtripboolean- Set false for a one-way trip; then source must be first and destination last. Defaults to true (return to the start). Example: false.
sourcestring- Where the trip starts: any (the default) or first. Example: first.one of
anyfirst stepsboolean- Set true to return turn-by-turn steps and instructions. Defaults to false. Example: true.
mapbox_search_categories_listList every point-of-interest category the Mapbox Search Box API supports.Read-onlyList Categories
List every point-of-interest category the Mapbox Search Box API supports. Returns listItems, each with canonical_id, name, icon and version, in the requested language. Use mapbox_search_categories_list to find the category_id for mapbox_search_category or the IDs for poi_category filters.
Inputs
languagestring- ISO 639-1 language code for the returned names. Defaults to en. Example: fr.
mapbox_search_categoryList points of interest in one category, such as coffee, gas_station or hotel, near a location with the Mapbox Search Box API.Read-onlySearch by Category
List points of interest in one category, such as coffee, gas_station or hotel, near a location with the Mapbox Search Box API. Returns a GeoJSON FeatureCollection of up to 25 places, each with coordinates, name, full_address, poi_category, distance and metadata. Use mapbox_search_category to browse a category around a point or inside a bbox. Use mapbox_search_forward to search by name. Get valid category IDs from mapbox_search_categories_list.
Inputs
category_idstringrequired- Canonical ID of the category to search, from mapbox_search_categories_list. Example: coffee.
bboxstring- Limit results to a bounding box, as four comma-separated numbers in minLon,minLat,maxLon,maxLat order. The box cannot cross the 180th meridian. Example: -74.27,40.49,-73.68,40.92.
countrystring- Limit results to one or more countries, as comma-separated ISO 3166 alpha-2 codes. Example: us,ca.
eta_typestring- Set to navigation to add an estimated travel time (eta, in minutes) to each result. Also needs navigation_profile and origin or proximity. Each ETA is billed as a Matrix API element. Example: navigation.one of
navigation languagestring- ISO 639-1 language code for the returned names. Defaults to en. Example: fr.
limitinteger- Maximum number of results, from 1 to 25. Example: 5.
navigation_profilestring- Travel mode for ETA calculation when eta_type is navigation. Example: driving.one of
drivingwalkingcycling nearstring- Bias results toward a place described in free text (a city or area name) or a longitude,latitude pair. When Mapbox resolves it, near overrides proximity. Names of single landmarks or points of interest are ignored. Example: Brooklyn, NY.
originstring- Starting point for distance and ETA calculation, as longitude,latitude. Example: -73.99,40.73.
poi_category_exclusionsstring- Leave out points of interest in these canonical category IDs, comma-separated. Get IDs from mapbox_search_categories_list. Example: fast_food.
proximitystring- Bias results toward a location, as longitude,latitude, or the string ip to bias by the caller's IP address. Defaults to ip. Example: -73.99,40.73.
mapbox_search_forwardSearch for addresses, places and points of interest by text with the Mapbox Search Box API, in one request.Read-onlySearch Places
Search for addresses, places and points of interest by text with the Mapbox Search Box API, in one request. Returns a GeoJSON FeatureCollection; each feature has coordinates, name, full_address, feature_type, poi_category, context and metadata such as phone and website. Use mapbox_search_forward to find businesses or places by name with coordinates in one call. Use mapbox_search_category to list every place of one category near a point, and mapbox_geocode_forward for street addresses only.
Inputs
qstringrequired- What to search for, such as an address, a place, a business name or a type of place, up to 256 characters. Example: Blue Bottle Coffee.
auto_completeboolean- Set true to include partial and fuzzy matches. Example: true.
bboxstring- Limit results to a bounding box, as four comma-separated numbers in minLon,minLat,maxLon,maxLat order. The box cannot cross the 180th meridian. Example: -74.27,40.49,-73.68,40.92.
countrystring- Limit results to one or more countries, as comma-separated ISO 3166 alpha-2 codes. Example: us,ca.
eta_typestring- Set to navigation to add an estimated travel time (eta, in minutes) to each result. Also needs navigation_profile and origin or proximity. Each ETA is billed as a Matrix API element. Example: navigation.one of
navigation languagestring- ISO 639-1 language code for the returned names. Defaults to en. Example: fr.
limitinteger- Maximum number of results, from 1 to 10. Example: 5.
minimum_ratingnumber- Return only places with an average rating at least this high, from 0.0 to 5.0, where ratings are known. Example: 4.
navigation_profilestring- Travel mode for ETA calculation when eta_type is navigation. Example: driving.one of
drivingwalkingcycling nearstring- Bias results toward a place described in free text (a city or area name) or a longitude,latitude pair. When Mapbox resolves it, near overrides proximity. Names of single landmarks or points of interest are ignored. Example: Brooklyn, NY.
open_nowboolean- Set true to return only points of interest open now, where hours are known. Example: true.
originstring- Starting point for distance and ETA calculation, as longitude,latitude. Example: -73.99,40.73.
poi_categorystring- Return only points of interest in these canonical category IDs, comma-separated. Get IDs from mapbox_search_categories_list. Example: coffee,restaurant.
poi_category_exclusionsstring- Leave out points of interest in these canonical category IDs, comma-separated. Get IDs from mapbox_search_categories_list. Example: fast_food.
proximitystring- Bias results toward a location, as longitude,latitude, or the string ip to bias by the caller's IP address. Defaults to ip. Example: -73.99,40.73.
typesstring- Return only these feature types, comma-separated. Options: country, region, postcode, district, place, city, locality, neighborhood, block, street, address, poi and category. Example: poi,address.
mapbox_search_retrieveGet the full details of one suggestion returned by mapbox_search_suggest.Read-onlyRetrieve Suggested Place
Get the full details of one suggestion returned by mapbox_search_suggest. Returns a GeoJSON FeatureCollection with the feature's coordinates, name, full_address, context, poi_category, maki icon and metadata such as phone, website and opening hours. Use mapbox_search_retrieve after mapbox_search_suggest, with the same session_token, to end the search session. Requires a mapbox_id from mapbox_search_suggest.
Inputs
mapbox_idstringrequired- The mapbox_id of the suggestion to retrieve, from a mapbox_search_suggest result. Example: dXJuOm1ieHBvaTo0ZTg2ZWFkNS1jOWMwLTQ3OWEtOTA5Mi1kMDVlNDQ3NDdlODk.
session_tokenstringrequired- Your own ID that groups one interactive search for billing, ideally a UUIDv4 you generate. Use the same value for the mapbox_search_suggest calls and the mapbox_search_retrieve call of one search, and a new value for each new search. It must match the session_token of the preceding suggest calls. Example: 0f5bd5a3-3b6e-4c3e-9f2a-5b6c7d8e9f01.
attribute_setsstring- Extra metadata to add, comma-separated: photos, visit (hours, rating, price level) and venue. The basic set is always included. Example: photos,visit.
languagestring- ISO 639-1 language code for the returned names. Defaults to en. Example: fr.
proximitystring- A longitude,latitude to measure the returned distance from. Example: -83.748708,42.265837.
mapbox_search_reverseFind the addresses and points of interest at or around a longitude and latitude with the Mapbox Search Box API.Read-onlyReverse Search
Find the addresses and points of interest at or around a longitude and latitude with the Mapbox Search Box API. Returns a GeoJSON FeatureCollection of nearby features, each with coordinates, name, full_address, feature_type and context. Use mapbox_search_reverse to learn what businesses or places are at a point. Use mapbox_geocode_reverse to get only the address hierarchy.
Inputs
latitudenumberrequired- Latitude of the location to look up, in decimal degrees between -90 and 90. Example: 40.733.
longitudenumberrequired- Longitude of the location to look up, in decimal degrees between -180 and 180. Example: -73.989.
countrystring- Limit results to one or more countries, as comma-separated ISO 3166 alpha-2 codes. Example: us,ca.
languagestring- ISO 639-1 language code for the returned names. Defaults to en. Example: fr.
limitinteger- Maximum number of results, from 1 to 10. Example: 5.
typesstring- Return only these feature types, comma-separated. Options: country, region, prefecture, postcode, district, place, city, locality, oaza, block, street, address, poi and category. Example: poi,address.
mapbox_search_suggestGet type-ahead suggestions for addresses, places, points of interest, brands and categories from the Mapbox Search Box API.Read-onlySuggest Places
Get type-ahead suggestions for addresses, places, points of interest, brands and categories from the Mapbox Search Box API. Returns suggestions, each with name, mapbox_id, feature_type, full_address or place_formatted, poi_category and distance, but no coordinates. Use mapbox_search_suggest for interactive autocomplete, then pass the chosen mapbox_id with the same session_token to mapbox_search_retrieve for coordinates. Use mapbox_search_forward for a one-off search that returns coordinates directly.
Inputs
qstringrequired- The partial or complete text the user typed, up to 256 characters. Example: Michigan Stadium.
session_tokenstringrequired- Your own ID that groups one interactive search for billing, ideally a UUIDv4 you generate. Use the same value for the mapbox_search_suggest calls and the mapbox_search_retrieve call of one search, and a new value for each new search. Example: 0f5bd5a3-3b6e-4c3e-9f2a-5b6c7d8e9f01.
bboxstring- Limit results to a bounding box, as four comma-separated numbers in minLon,minLat,maxLon,maxLat order. The box cannot cross the 180th meridian. Example: -74.27,40.49,-73.68,40.92.
countrystring- Limit results to one or more countries, as comma-separated ISO 3166 alpha-2 codes. Example: us,ca.
eta_typestring- Set to navigation to add an estimated travel time (eta, in minutes) to each result. Also needs navigation_profile and origin or proximity. Each ETA is billed as a Matrix API element. Example: navigation.one of
navigation languagestring- ISO 639-1 language code for the returned names. Defaults to en. Example: fr.
limitinteger- Maximum number of results, from 1 to 10. Example: 5.
navigation_profilestring- Travel mode for ETA calculation when eta_type is navigation. Example: driving.one of
drivingwalkingcycling nearstring- Bias results toward a place described in free text (a city or area name) or a longitude,latitude pair. When Mapbox resolves it, near overrides proximity. Names of single landmarks or points of interest are ignored. Example: Brooklyn, NY.
originstring- Starting point for distance and ETA calculation, as longitude,latitude. Example: -73.99,40.73.
poi_categorystring- Return only points of interest in these canonical category IDs, comma-separated. Get IDs from mapbox_search_categories_list. Example: coffee,restaurant.
poi_category_exclusionsstring- Leave out points of interest in these canonical category IDs, comma-separated. Get IDs from mapbox_search_categories_list. Example: fast_food.
proximitystring- Bias results toward a location, as longitude,latitude, or the string ip to bias by the caller's IP address. Defaults to ip. Example: -73.99,40.73.
typesstring- Return only these feature types, comma-separated. Options: country, region, postcode, district, place, city, locality, neighborhood, block, street, address, poi and category. Example: poi,address.
mapbox_tilequery_getGet the features of one or more Mapbox vector or rasterarray tilesets at or near a point with the Tilequery API.Read-onlyQuery Tileset Features
Get the features of one or more Mapbox vector or rasterarray tilesets at or near a point with the Tilequery API. Returns a GeoJSON FeatureCollection, closest first; each feature has its properties, the closest point as geometry and tilequery metadata (distance, geometry type, layer). Use mapbox_tilequery_get to read map data at a location, such as the building, land use or elevation contour there, or features from your own tileset. Use mapbox_search_reverse for addresses and businesses.
Inputs
latitudenumberrequired- Latitude of the point to query, in decimal degrees between -90 and 90. Example: 40.733.
longitudenumberrequired- Longitude of the point to query, in decimal degrees between -180 and 180. Example: -73.989.
tileset_idstringrequired- ID of the tileset to query, or up to 25 comma-separated IDs. Mapbox tilesets include mapbox.mapbox-streets-v8 and mapbox.mapbox-terrain-v2; your own tilesets are username.tileset. Example: mapbox.mapbox-streets-v8.
bandsstring- For rasterarray tilesets, the bands to query, comma-separated. Example: 1708304400.
dedupeboolean- Set false to keep duplicate features. Defaults to true. Example: false.
geometrystring- Return only one geometry type: polygon, linestring or point. Example: point.one of
polygonlinestringpoint layersstring- Layers to query, comma-separated, instead of all layers. Required in practice for rasterarray tilesets. Example: poi_label,building.
limitinteger- Maximum number of features, from 1 to 50, closest first. Defaults to 5. Example: 10.
radiusnumber- Search distance in meters. Defaults to 0, a point-in-polygon query that returns only polygons containing the point; set a radius to find points and lines. Example: 30.
No tools match.