Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/stadia-maps-routes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: 'Confidently create beautiful maps for all your users with our tools. Choose your style from our library or build your own. With a rich palette of choices to fit any context and support for dozens of languages and scripts, you can deliver a quality experience for your customers no matter what part of the globe they call home. '
version: 7.1.0
title: Stadia Maps Routes API
contact:
name: Stadia Maps Support
url: https://www.stadiamaps.com
email: support@stadiamaps.com
servers:
- url: https://api.stadiamaps.com
- url: https://api-eu.stadiamaps.com
tags:
- name: Routes
paths:
/optimized_route/v1:
post:
tags:
- Routes
operationId: optimized-route
summary: Calculate an optimized route between a known start and end point.
description: The optimized route API is a mix of the matrix and normal route API. For an optimized route, the start and end point are fixed, but the intermediate points will be re-ordered to form an optimal route visiting all nodes once.
security:
- ApiKeyAuth: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/optimizedRouteRequest'
responses:
'200':
description: The optimized route, which looks more or less like a normal route response. The only significant difference is that the `locations` may be re-ordered and annotated with an `original_index`.
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/routeResponse'
- $ref: '#/components/schemas/osrmRouteResponse'
'400':
description: Bad request; more details will be included
'500':
description: An internal parse error occurred; more details will be included
components:
schemas:
autoCostingOptions:
allOf:
- $ref: '#/components/schemas/baseCostingOptions'
- type: object
properties:
height:
type: number
format: double
description: The height of the automobile (in meters).
default: 1.9
width:
type: number
format: double
description: The width of the automobile (in meters).
default: 1.6
toll_booth_cost:
type: integer
description: The estimated cost (in seconds) when a toll booth is encountered.
default: 15
toll_booth_penalty:
type: integer
description: A penalty (in seconds) applied to the route cost when a toll booth is encountered. This penalty can be used to reduce the likelihood of suggesting a route with toll booths unless absolutely necessary.
default: 0
ferry_cost:
type: integer
description: The estimated cost (in seconds) when a ferry is encountered.
default: 300
use_highways:
type: number
format: double
description: A measure of willingness to take highways. Values near 0 attempt to avoid highways, and values near 1 will favour them. Note that as some routes may be impossible without highways, 0 does not guarantee avoidance of them.
default: 0.5
minimum: 0
maximum: 1
use_tolls:
type: number
format: double
description: A measure of willingness to take toll roads. Values near 0 attempt to avoid tolls, and values near 1 will favour them. Note that as some routes may be impossible without tolls, 0 does not guarantee avoidance of them.
default: 0.5
minimum: 0
maximum: 1
use_tracks:
$ref: '#/components/schemas/useTracksCostingOption'
top_speed:
type: integer
description: The top speed (in kph) that the vehicle is capable of travelling.
default: 140
minimum: 10
maximum: 252
shortest:
type: boolean
description: If true changes the cost metric to be quasi-shortest (pure distance-based) costing. This will disable ALL other costing factors.
default: false
ignore_closures:
type: boolean
description: If true, ignores all known closures. This option cannot be set if `location.search_filter.exclude_closures` is also specified.
default: false
include_hov2:
type: boolean
description: If true, indicates the desire to include HOV roads with a 2-occupant requirement in the route when advantageous.
default: false
include_hov3:
type: boolean
description: If true, indicates the desire to include HOV roads with a 3-occupant requirement in the route when advantageous.
default: false
include_hot:
type: boolean
description: If true, indicates the desire to include toll roads which require the driver to pay a toll if the occupant requirement isn't met
default: false
alley_factor:
type: number
format: double
description: A factor that multiplies the cost when alleys are encountered.
default: 1
simpleRoutingWaypoint:
allOf:
- $ref: '#/components/schemas/coordinate'
- type: object
properties:
type:
type: string
enum:
- break
- through
- via
- break_through
description: A `break` represents the start or end of a leg, and allows reversals. A `through` location is an intermediate waypoint that must be visited between `break`s, but at which reversals are not allowed. A `via` is similar to a `through` except that reversals are allowed. A `break_through` is similar to a `break` in that it can be the start/end of a leg, but does not allow reversals.
default: break
directionsOptions:
type: object
properties:
units:
$ref: '#/components/schemas/distanceUnit'
language:
$ref: '#/components/schemas/valhallaLanguages'
directions_type:
type: string
enum:
- none
- maneuvers
- instructions
default: instructions
description: The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.
osrmAdmin:
type: object
properties:
iso_3166_1:
type: string
description: The ISO 3166-1 two-character code for the admin region.
iso_3166_1_alpha3:
type: string
description: The ISO 3166-1 three-character code for the admin region.
useFerryCostingOption:
type: number
format: double
description: A measure of willingness to take ferries. Values near 0 attempt to avoid ferries, and values near 1 will favour them. Note that as some routes may be impossible without ferries, 0 does not guarantee avoidance of them.
default: 0.5
minimum: 0
maximum: 1
routeManeuver:
type: object
properties:
type:
type: integer
description: 'The type of route maneuver.
| Code | Type |
|------|-------------------------------------|
| 0 | None |
| 1 | Start |
| 2 | Start right |
| 3 | Start left |
| 4 | Destination |
| 5 | Destination right |
| 6 | Destination left |
| 7 | Becomes |
| 8 | Continue |
| 9 | Slight right |
| 10 | Right |
| 11 | Sharp right |
| 12 | U-turn right |
| 13 | U-turn left |
| 14 | Sharp left |
| 15 | Left |
| 16 | Slight left |
| 17 | Ramp straight |
| 18 | Ramp right |
| 19 | Ramp left |
| 20 | Exit right |
| 21 | Exit left |
| 22 | Stay straight |
| 23 | Stay right |
| 24 | Stay left |
| 25 | Merge |
| 26 | Enter roundabout |
| 27 | Exit roundabout |
| 28 | Enter ferry |
| 29 | Exit ferry |
| 30 | Transit |
| 31 | Transit transfer |
| 32 | Transit remain on |
| 33 | Transit connection start |
| 34 | Transit connection transfer |
| 35 | Transit connection destination |
| 36 | Post-transit connection destination |
| 37 | Merge right |
| 38 | Merge left |
'
instruction:
type: string
description: The written maneuver instruction.
verbal_transition_alert_instruction:
type: string
description: Text suitable for use as a verbal navigation alert.
verbal_pre_transition_instruction:
type: string
description: Text suitable for use as a verbal navigation alert immediately prior to the maneuver transition.
verbal_post_transition_instruction:
type: string
description: Text suitable for use as a verbal navigation alert immediately after to the maneuver transition.
street_names:
type: array
description: A list of street names that are consistent along the entire maneuver.
items:
type: string
example: A1
begin_street_names:
type: array
description: A list of street names at the beginning of the maneuver, if they are different from the names at the end.
items:
type: string
example: A1
time:
type: number
format: double
description: The estimated time to complete the entire maneuver, in seconds.
length:
type: number
format: double
description: The length of the maneuver, in `units`.
begin_shape_index:
type: integer
description: The index into the list of shape points for the start of the maneuver.
end_shape_index:
type: integer
description: The index into the list of shape points for the end of the maneuver.
toll:
type: boolean
description: True any portion of the maneuver is subject to a toll.
default: false
rough:
type: boolean
description: True any portion of the maneuver is unpaved or has portions of rough pavement.
default: false
gate:
type: boolean
description: True if a gate is encountered in the course of this maneuver.
default: false
ferry:
type: boolean
description: True if a ferry is encountered in the course of this maneuver.
default: false
sign:
$ref: '#/components/schemas/maneuverSign'
roundabout_exit_count:
type: integer
description: The exit number of the roundabout to take after entering.
depart_instruction:
type: integer
description: The written departure time instruction (typically used in a transit maneuver).
example: 'Depart: 8:04 AM from Seoul Station'
verbal_depart_instruction:
type: integer
description: Text suitable for use as a verbal departure time instruction (typically used in a transit maneuver).
example: Depart at 8:04 AM from Seoul Station
arrive_instruction:
type: integer
description: The written arrival time instruction (typically used in a transit maneuver).
example: 'Arrive: 8:06 AM at City Hall'
verbal_arrive_instruction:
type: integer
description: Text suitable for use as a verbal departure time instruction (typically used in a transit maneuver).
example: Arrive at 8:06 AM at City Hall
transit_info:
$ref: '#/components/schemas/transitInfo'
verbal_multi_cue:
type: boolean
description: True if the `verbal_pre_transition_instruction` has been appended with the verbal instruction of the next maneuver.
default: false
travel_mode:
$ref: '#/components/schemas/travelMode'
travel_type:
type: string
description: The type of travel over the maneuver. This can be thought of as a specialization of the travel mode. For example, vehicular travel may be via car, motorcycle, etc.; and travel via bicycle may be via a road bike, mountain bike, etc.
enum:
- car
- motorcycle
- bus
- tractor_trailer
- motor_scooter
- foot
- wheelchair
- segway
- road
- cross
- hybrid
- mountain
- tram
- metro
- rail
- ferry
- cable_car
- gondola
- funicular
- golf_cart
- low_speed_vehicle
bss_maneuver_type:
type: string
description: Describes a bike share action when using bikeshare routing.
enum:
- NoneAction
- RentBikeAtBikeShare
- ReturnBikeAtBikeShare
required:
- type
- instruction
- time
- length
- cost
- begin_shape_index
- end_shape_index
- travel_mode
- travel_type
routeSummary:
type: object
properties:
time:
type: number
format: double
description: The estimated travel time, in seconds
length:
type: number
format: double
description: The estimated travel distance, in `units` (km or mi)
min_lat:
type: number
format: double
description: The minimum latitude of the bounding box containing the route.
max_lat:
type: number
format: double
description: The maximum latitude of the bounding box containing the route.
min_lon:
type: number
format: double
description: The minimum longitude of the bounding box containing the route.
max_lon:
type: number
format: double
description: The maximum longitude of the bounding box containing the route.
required:
- time
- length
- min_lat
- min_lon
- max_lat
- max_lon
maneuverSignElement:
type: object
properties:
text:
type: string
description: The interchange sign text (varies based on the context; see the `maneuverSign` schema).
is_route_number:
type: boolean
description: True if the sign is a route number.
consecutive_count:
type: integer
description: The frequency of this sign element within a set a consecutive signs.
required:
- text
valhallaLanguages:
type: string
enum:
- bg-BG
- ca-ES
- cs-CZ
- da-DK
- de-DE
- el-GR
- en-GB
- en-US-x-pirate
- en-US
- es-ES
- et-EE
- fi-FI
- fr-FR
- hi-IN
- hu-HU
- it-IT
- ja-JP
- nb-NO
- nl-NL
- pl-PL
- pt-BR
- pt-PT
- ro-RO
- ru-RU
- sk-SK
- sl-SI
- sv-SE
- tr-TR
- uk-UA
default: en-US
osrmViaWaypoint:
type: object
properties:
distance_from_start:
type: number
format: double
description: The distance from the start of the leg, in meters.
geometry_index:
type: integer
description: The index of the waypoint's location in the route geometry.
waypoint_index:
type: integer
description: The index of the associated waypoint.
required:
- distance_from_start
- geometry_index
- waypoint_index
requestId:
type: string
description: An identifier to disambiguate requests (echoed by the server).
example: kesklinn
useTracksCostingOption:
type: number
format: double
description: A measure of willingness to take track roads. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without track roads, 0 does not guarantee avoidance of them. The default value is 0 for automobiles, busses, and trucks; and 0.5 for all other costing modes.
minimum: 0
maximum: 1
osrmRouteStep:
type: object
description: A maneuver such as a turn or merge, followed by travel along a single road or path.
required:
- distance
- duration
- geometry
- mode
- maneuver
properties:
distance:
type: number
format: double
description: The distance traveled by the route, in meters.
duration:
type: number
format: double
description: The estimated travel time, in number of seconds.
geometry:
type: string
description: An encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) with 6 digits of decimal precision.
weight:
type: number
format: double
name:
type: string
description: 'The name of the segment (ex: road) being traversed'
ref:
type: string
description: A reference number of code for the segment being traversed.
pronunciation:
type: string
description: Pronunciation of the name (if available). The format of this varies by implementation/vendor.
destinations:
type: string
exits:
type: string
mode:
type: string
description: The mode of travel.
maneuver:
$ref: '#/components/schemas/osrmStepManeuver'
intersections:
type: array
items:
$ref: '#/components/schemas/osrmIntersection'
rotary_name:
type: string
description: The name of the traffic circle.
rotary_pronunciation:
type: string
description: Pronunciation of the rotary name (if available). The format of this varies by implementation/vendor.
driving_side:
type: string
enum:
- left
- right
description: The side of the road on which driving is legal for this step.
voiceInstructions:
type: array
items:
$ref: '#/components/schemas/osrmVoiceInstruction'
description: A list of announcements which should be spoken at various points along the maneuver.
bannerInstructions:
type: array
items:
$ref: '#/components/schemas/osrmBannerInstruction'
description: A list of announcements which should be displayed prominently on screen at various points along the maneuver.
speedLimitSign:
type: string
enum:
- mutcd
- vienna
description: The style of speed limit signs used along the step.
speedLimitUnit:
type: string
description: The unit of measure that is used locally along the step. This may be different from the unit used in maxspeed annotations, and is provided so that apps can localize their display.
distanceUnit:
type: string
enum:
- km
- mi
default: km
osrmBannerInstruction:
type: object
required:
- distanceAlongGeometry
- primary
properties:
distanceAlongGeometry:
type: number
format: double
description: How far (in meters) from the upcoming maneuver the instruction should start being displayed.
primary:
$ref: '#/components/schemas/osrmBannerContent'
secondary:
$ref: '#/components/schemas/osrmBannerContent'
osrmBannerComponent:
type: object
properties:
text:
type: string
type:
type: string
enum:
- text
- icon
- delimiter
- exit-number
- exit
- lane
osrmCoordinate:
type: array
items:
type: number
format: double
minItems: 2
maxItems: 2
description: A (longitude, latitude) coordinate pair.
osrmRouteResponse:
allOf:
- $ref: '#/components/schemas/osrmBaseApiResponse'
- type: object
properties:
waypoints:
type: array
items:
$ref: '#/components/schemas/osrmWaypoint'
routes:
type: array
items:
$ref: '#/components/schemas/osrmRoute'
coordinate:
type: object
properties:
lat:
type: number
format: double
description: The latitude of a point in the shape.
example: 59.436884
minimum: -90
maximum: 90
lon:
type: number
format: double
description: The longitude of a point in the shape.
example: 24.742595
minimum: -180
maximum: 180
required:
- lat
- lon
routingResponseWaypoint:
allOf:
- $ref: '#/components/schemas/simpleRoutingWaypoint'
- type: object
properties:
original_index:
type: integer
description: The original index of the location (locations may be reordered for optimized routes)
minimum: 0
osrmIntersection:
type: object
description: Detailed information about intersections that the route traverses. For every step, the first intersection is at the location of the maneuver. Additional intersections will be provided for every road or path traversed until the next step.
required:
- location
- bearings
- entry
properties:
location:
$ref: '#/components/schemas/osrmCoordinate'
bearings:
type: array
items:
type: integer
description: A list of bearing values that are available for travel through the intersection.
classes:
type: array
items:
type: string
enum:
- toll
- ferry
- restricted
- motorway
- tunnel
description: The classes of roads exiting the intersection.
entry:
type: array
items:
type: boolean
description: A list of entry flags, which map 1:1 to the bearings. A value of true indicates that the respective road could be entered on a valid route. False indicates that the turn onto the respective road would violate a restriction.
in:
type: integer
description: An index into bearings/entry array. Used to calculate the bearing just before the turn. Namely, the clockwise angle from true north to the direction of travel immediately before the maneuver/passing the intersection. Bearings are given relative to the intersection. To get the bearing in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for depart maneuvers.
out:
type: integer
description: An index into bearings/entry array. Used to calculate the bearing just after the turn. Namely, the clockwise angle from true north to the direction of travel immediately after the maneuver/passing the intersection. This is not supplied for arrive maneuvers.
lanes:
type: array
items:
$ref: '#/components/schemas/osrmLane'
description: Available turn lanes at the intersection. May be omitted if no lane information is available for the intersection.
admin_index:
type: integer
description: The index into the admin boundaries list on the route leg.
duration:
type: number
format: double
description: The estimated duration, in seconds, to traverse the intersection.
turn_duration:
type: number
format: double
description: The estimated duration, in seconds, to complete the turn.
turn_weight:
type: number
format: double
geometry_index:
type: integer
description: The index of the intersection in the leg geometry.
weight:
type: number
format: double
annotationFilters:
type: object
properties:
action:
type: string
enum:
- include
- exclude
attributes:
type: array
items:
type: string
enum:
- shape_attributes.speed
- shape_attributes.speed_limit
- shape_attributes.time
- shape_attributes.length
description: A set of granular attributes to include between every pair of coordinates along the route. This can significantly increase the response size.
truckCostingOptions:
allOf:
- $ref: '#/components/schemas/autoCostingOptions'
- type: object
properties:
height:
type: number
format: double
description: The height of the truck (in meters).
default: 4.11
width:
type: number
format: double
description: The width of the truck (in meters).
default: 2.6
length:
type: number
format: double
description: The length of the truck (in meters).
default: 21.64
weight:
type: number
format: double
description: The weight of the truck (in tonnes).
default: 21.77
axle_load:
type: number
format: double
description: The axle load of the truck (in tonnes).
default: 9.07
hazmat:
type: boolean
description: Whether or not the truck is carrying hazardous materials.
default: false
routeResponse:
type: object
required:
- trip
properties:
id:
$ref: '#/components/schemas/requestId'
trip:
$ref: '#/components/schemas/routeTrip'
alternates:
type: array
items:
type: object
properties:
trip:
$ref: '#/components/schemas/routeTrip'
example:
trip:
locations:
- type: break
lat: 60.534715
lon: -149.543469
original_index: 0
- type: break
lat: 60.53499
lon: -149.54858
original_index: 1
legs:
- maneuvers:
- type: 1
instruction: Drive west on AK 1/Seward Highway.
verbal_pre_transition_instruction: Drive west on Alaska 1, Seward Highway. Then You will arrive at your destination.
verbal_post_transition_instruction: Continue for 900 feet.
street_names:
- AK 1
- Seward Highway
time: 11.487
length: 0.176
cost: 15.508
begin_shape_index: 0
end_shape_index: 9
verbal_multi_cue: true
travel_mode: drive
travel_type: car
- type: 4
instruction: You have arrived at your destination.
verbal_transition_alert_instruction: You will arrive at your destination.
verbal_pre_transition_instruction: You have arrived at your destination.
time: 0
length: 0
cost: 0
begin_shape_index: 9
end_shape_index: 9
travel_mode: drive
travel_type: car
summary:
has_time_restrictions: false
min_lat: 60.534715
min_lon: -149.54858
max_lat: 60.535008
max_lon: -149.543469
time: 11.487
length: 0.176
cost: 15.508
shape: wzvmrBxalf|GcCrX}A|Nu@jI}@pMkBtZ{@x^_Afj@Inn@`@veB
summary:
has_time_restrictions: false
min_lat: 60.534715
min_lon: -149.54858
max_lat: 60.535008
max_lon: -149.543469
time: 11.487
length: 0.176
cost: 15.508
status_message: Found route between points
status: 0
units: miles
language: en-US
bicycleCostingOptions:
allOf:
- $ref: '#/components/schemas/baseCostingOptions'
- type: object
properties:
bicycle_type:
type: string
enum:
- Road
- Hybrid
- Cross
- Mountain
default: Hybrid
description: 'The type of bicycle:
* Road: has narrow tires and is generally lightweight and designed for speed on paved surfaces * Hybrid or City: designed for city riding or casual riding on roads and paths with good surfaces * Cross: similar to a road bike, but has wider tires so it can handle rougher surfaces * Mountain: able to handle most surfaces, but generally heavier and slower on paved surfaces'
cycling_speed:
type: integer
description: "The average comfortable travel speed (in kph) along smooth, flat roads. The costing will vary the speed based on the surface, bicycle type, elevation change, etc. This value should be the average sustainable cruising speed the cyclist can maintain over the entire route.\nThe default speeds are as follows based on bicycle type:\n * Road - 25kph\n * Cross - 20kph\n * Hybrid - 18kph\n * Mountain - 16kph"
use_roads:
type: number
format: double
description: A measure of willingness to use roads alongside other vehicles. Values near 0 attempt to avoid roads and stay on cycleways, and values near 1 indicate the cyclist is more comfortable on roads.
default: 0.5
minimum: 0
maximum: 1
use_hills:
$ref: '#/components/schemas/useHillsCostingOption'
avoid_bad_surfaces:
type: number
format: double
description: A measure of how much the cyclist wants to avoid roads with poor surfaces relative to the type of bicycle being ridden. When 0, there is no penalization of roads with poorer surfaces, and only bicycle speed is taken into account. As the value approaches 1, roads with poor surfaces relative to the bicycle type receive a heaver penalty, so they will only be taken if they significantly reduce travel time. When the value is 1, all bad surfaces are completely avoided from the route, including the start and end points.
default: 0.25
minimum: 0
maximum: 1
bss_return_cost:
type: integer
description: The estimated cost (in seconds) to return a bicycle in `bikeshare` mode.
default: 120
bss_return_penalty:
type:
# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stadia-maps/refs/heads/main/openapi/stadia-maps-routes-api-openapi.yml