---
title: "Match a recorded route to the road network."
method: POST
path: "/map_match/v1"
tags: ["Routing"]
---

# Match a recorded route to the road network.

`POST /map_match/v1`

The map matching API transforms a recorded route into navigation instructions like you would get from the `route` endpoint. The input can be in the form of either an encoded polyline, or (optionally) timestamped coordinates.

## Request body

- MapMatchRequest
  - `id` string — An identifier to disambiguate requests (echoed by the server).
  - `shape` MapMatchWaypoint[] — REQUIRED if `encoded_polyline` is not present. Note that `break` type locations are only supported when `shape_match` is set to `map_match`.
    - `lat` number, double, required — The latitude of a point in the shape.
    - `lon` number, double, required — The longitude of a point in the shape.
    - `type` 'break' | 'through' | 'via' | 'break_through' — 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. Defaults to `break`.
    - `time` integer — The timestamp of the waypoint, in seconds. This can inform the map matching algorithm about when the point was measured. A UNIX timestamp, or any increasing integer sequence measuring seconds from some reference point can be used.
  - `encoded_polyline` string — REQUIRED if `shape` is not present. An encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm). Note that the polyline must be encoded with 6 digits of precision rather than the default 5!
  - `costing` 'auto' | 'auto_traffic' | 'auto_traffic_premium' | 'bus' | 'bus_traffic' | 'bus_traffic_premium' | 'taxi' | 'taxi_traffic' | 'taxi_traffic_premium' | 'truck' | 'truck_traffic' | 'truck_traffic_premium' | 'bicycle' | 'bikeshare' | 'motor_scooter' | 'motorcycle' | 'pedestrian' | 'low_speed_vehicle', required
  - `costing_options` CostingOptions
    - `auto` AutoCostingOptions
      - `maneuver_penalty` integer — A penalty (in seconds) applied when transitioning between roads (determined by name).
      - `gate_cost` integer — The estimated cost (in seconds) when a gate is encountered.
      - `gate_penalty` integer — A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.
      - `country_crossing_cost` integer — The estimated cost (in seconds) when encountering an international border.
      - `country_crossing_penalty` integer — A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.
      - `service_penalty` integer — A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.
      - `service_factor` number, double — A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.
      - `use_living_streets` number, double — A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.
      - `use_ferry` number, double — 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.
      - `ignore_restrictions` boolean — If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.
      - `ignore_non_vehicular_restrictions` boolean — If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.
      - `ignore_oneways` boolean — If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.
      - `private_access_penalty` number, double — A penalty (in seconds) for accessing private roads.
      - `alley_penalty` number, double — A penalty (in seconds) for using alleys.
      - `rail_ferry_cost` integer — The estimated cost (in seconds) when a rail ferry is encountered. Only applies to costing models that support rail ferries (auto, truck, motorcycle).
      - `use_rail_ferry` number, double — A measure of willingness to take rail ferries. Values near 0 attempt to avoid rail ferries, and values near 1 will favor them. Note that as some routes may be impossible without rail ferries, 0 does not guarantee avoidance of them. Only applies to auto, truck, and motorcycle costing.
      - `ignore_access` boolean — If set to true, ignores access restrictions for the route.
      - `ferry_cost` integer — The estimated cost (in seconds) when a ferry is encountered.
      - `height` number, double — The height of the automobile (in meters).
      - `width` number, double — The width of the automobile (in meters).
      - `toll_booth_cost` integer — The estimated cost (in seconds) when a toll booth is encountered.
      - `toll_booth_penalty` integer — 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.
      - `exclude_cash_only_tolls` boolean — If true, avoids routes with cash-only tolls.
      - `exclude_unpaved` boolean — Indicates whether or not the path may include unpaved roads. If true, the route is allowed to start and end with unpaved roads, but is not allowed to have them in the middle of the route path. Otherwise they are allowed.
      - `use_highways` number, double — 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.
      - `use_tolls` number, double — 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.
      - `use_tracks` number, double — 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.
      - `top_speed` integer — The top speed (in kph) that the vehicle is capable of travelling.
      - `shortest` boolean — If true changes the cost metric to be quasi-shortest (pure distance-based) costing. This will disable ALL other costing factors.
      - `ignore_closures` boolean — If true, ignores all known closures. This option cannot be set if `location.search_filter.exclude_closures` is also specified.
      - `include_hov2` boolean — If true, indicates the desire to include HOV roads with a 2-occupant requirement in the route when advantageous.
      - `include_hov3` boolean — If true, indicates the desire to include HOV roads with a 3-occupant requirement in the route when advantageous.
      - `include_hot` boolean — If true, indicates the desire to include toll roads which require the driver to pay a toll if the occupant requirement isn't met
      - `alley_factor` number, double — A factor that multiplies the cost when alleys are encountered.
      - `use_distance` number, double — A measure of preference for time vs. distance. Values near 0 (default) optimize for time, while values near 1 optimize for shortest distance.
      - `closure_factor` number, double — A factor that penalizes the cost of traversing closed edges. The value is a multiplier on the cost of a closed edge; higher values make closed edges less likely to be used.
    - `bus` AutoCostingOptions
      - `maneuver_penalty` integer — A penalty (in seconds) applied when transitioning between roads (determined by name).
      - `gate_cost` integer — The estimated cost (in seconds) when a gate is encountered.
      - `gate_penalty` integer — A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.
      - `country_crossing_cost` integer — The estimated cost (in seconds) when encountering an international border.
      - `country_crossing_penalty` integer — A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.
      - `service_penalty` integer — A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.
      - `service_factor` number, double — A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.
      - `use_living_streets` number, double — A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.
      - `use_ferry` number, double — 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.
      - `ignore_restrictions` boolean — If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.
      - `ignore_non_vehicular_restrictions` boolean — If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.
      - `ignore_oneways` boolean — If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.
      - `private_access_penalty` number, double — A penalty (in seconds) for accessing private roads.
      - `alley_penalty` number, double — A penalty (in seconds) for using alleys.
      - `rail_ferry_cost` integer — The estimated cost (in seconds) when a rail ferry is encountered. Only applies to costing models that support rail ferries (auto, truck, motorcycle).
      - `use_rail_ferry` number, double — A measure of willingness to take rail ferries. Values near 0 attempt to avoid rail ferries, and values near 1 will favor them. Note that as some routes may be impossible without rail ferries, 0 does not guarantee avoidance of them. Only applies to auto, truck, and motorcycle costing.
      - `ignore_access` boolean — If set to true, ignores access restrictions for the route.
      - `ferry_cost` integer — The estimated cost (in seconds) when a ferry is encountered.
      - `height` number, double — The height of the automobile (in meters).
      - `width` number, double — The width of the automobile (in meters).
      - `toll_booth_cost` integer — The estimated cost (in seconds) when a toll booth is encountered.
      - `toll_booth_penalty` integer — 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.
      - `exclude_cash_only_tolls` boolean — If true, avoids routes with cash-only tolls.
      - `exclude_unpaved` boolean — Indicates whether or not the path may include unpaved roads. If true, the route is allowed to start and end with unpaved roads, but is not allowed to have them in the middle of the route path. Otherwise they are allowed.
      - `use_highways` number, double — 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.
      - `use_tolls` number, double — 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.
      - `use_tracks` number, double — 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.
      - `top_speed` integer — The top speed (in kph) that the vehicle is capable of travelling.
      - `shortest` boolean — If true changes the cost metric to be quasi-shortest (pure distance-based) costing. This will disable ALL other costing factors.
      - `ignore_closures` boolean — If true, ignores all known closures. This option cannot be set if `location.search_filter.exclude_closures` is also specified.
      - `include_hov2` boolean — If true, indicates the desire to include HOV roads with a 2-occupant requirement in the route when advantageous.
      - `include_hov3` boolean — If true, indicates the desire to include HOV roads with a 3-occupant requirement in the route when advantageous.
      - `include_hot` boolean — If true, indicates the desire to include toll roads which require the driver to pay a toll if the occupant requirement isn't met
      - `alley_factor` number, double — A factor that multiplies the cost when alleys are encountered.
      - `use_distance` number, double — A measure of preference for time vs. distance. Values near 0 (default) optimize for time, while values near 1 optimize for shortest distance.
      - `closure_factor` number, double — A factor that penalizes the cost of traversing closed edges. The value is a multiplier on the cost of a closed edge; higher values make closed edges less likely to be used.
    - `taxi` AutoCostingOptions
      - `maneuver_penalty` integer — A penalty (in seconds) applied when transitioning between roads (determined by name).
      - `gate_cost` integer — The estimated cost (in seconds) when a gate is encountered.
      - `gate_penalty` integer — A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.
      - `country_crossing_cost` integer — The estimated cost (in seconds) when encountering an international border.
      - `country_crossing_penalty` integer — A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.
      - `service_penalty` integer — A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.
      - `service_factor` number, double — A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.
      - `use_living_streets` number, double — A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.
      - `use_ferry` number, double — 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.
      - `ignore_restrictions` boolean — If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.
      - `ignore_non_vehicular_restrictions` boolean — If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.
      - `ignore_oneways` boolean — If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.
      - `private_access_penalty` number, double — A penalty (in seconds) for accessing private roads.
      - `alley_penalty` number, double — A penalty (in seconds) for using alleys.
      - `rail_ferry_cost` integer — The estimated cost (in seconds) when a rail ferry is encountered. Only applies to costing models that support rail ferries (auto, truck, motorcycle).
      - `use_rail_ferry` number, double — A measure of willingness to take rail ferries. Values near 0 attempt to avoid rail ferries, and values near 1 will favor them. Note that as some routes may be impossible without rail ferries, 0 does not guarantee avoidance of them. Only applies to auto, truck, and motorcycle costing.
      - `ignore_access` boolean — If set to true, ignores access restrictions for the route.
      - `ferry_cost` integer — The estimated cost (in seconds) when a ferry is encountered.
      - `height` number, double — The height of the automobile (in meters).
      - `width` number, double — The width of the automobile (in meters).
      - `toll_booth_cost` integer — The estimated cost (in seconds) when a toll booth is encountered.
      - `toll_booth_penalty` integer — 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.
      - `exclude_cash_only_tolls` boolean — If true, avoids routes with cash-only tolls.
      - `exclude_unpaved` boolean — Indicates whether or not the path may include unpaved roads. If true, the route is allowed to start and end with unpaved roads, but is not allowed to have them in the middle of the route path. Otherwise they are allowed.
      - `use_highways` number, double — 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.
      - `use_tolls` number, double — 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.
      - `use_tracks` number, double — 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.
      - `top_speed` integer — The top speed (in kph) that the vehicle is capable of travelling.
      - `shortest` boolean — If true changes the cost metric to be quasi-shortest (pure distance-based) costing. This will disable ALL other costing factors.
      - `ignore_closures` boolean — If true, ignores all known closures. This option cannot be set if `location.search_filter.exclude_closures` is also specified.
      - `include_hov2` boolean — If true, indicates the desire to include HOV roads with a 2-occupant requirement in the route when advantageous.
      - `include_hov3` boolean — If true, indicates the desire to include HOV roads with a 3-occupant requirement in the route when advantageous.
      - `include_hot` boolean — If true, indicates the desire to include toll roads which require the driver to pay a toll if the occupant requirement isn't met
      - `alley_factor` number, double — A factor that multiplies the cost when alleys are encountered.
      - `use_distance` number, double — A measure of preference for time vs. distance. Values near 0 (default) optimize for time, while values near 1 optimize for shortest distance.
      - `closure_factor` number, double — A factor that penalizes the cost of traversing closed edges. The value is a multiplier on the cost of a closed edge; higher values make closed edges less likely to be used.
    - `truck` TruckCostingOptions
      - `maneuver_penalty` integer — A penalty (in seconds) applied when transitioning between roads (determined by name).
      - `gate_cost` integer — The estimated cost (in seconds) when a gate is encountered.
      - `gate_penalty` integer — A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.
      - `country_crossing_cost` integer — The estimated cost (in seconds) when encountering an international border.
      - `country_crossing_penalty` integer — A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.
      - `service_penalty` integer — A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.
      - `service_factor` number, double — A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.
      - `use_living_streets` number, double — A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.
      - `use_ferry` number, double — 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.
      - `ignore_restrictions` boolean — If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.
      - `ignore_non_vehicular_restrictions` boolean — If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.
      - `ignore_oneways` boolean — If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.
      - `private_access_penalty` number, double — A penalty (in seconds) for accessing private roads.
      - `alley_penalty` number, double — A penalty (in seconds) for using alleys.
      - `rail_ferry_cost` integer — The estimated cost (in seconds) when a rail ferry is encountered. Only applies to costing models that support rail ferries (auto, truck, motorcycle).
      - `use_rail_ferry` number, double — A measure of willingness to take rail ferries. Values near 0 attempt to avoid rail ferries, and values near 1 will favor them. Note that as some routes may be impossible without rail ferries, 0 does not guarantee avoidance of them. Only applies to auto, truck, and motorcycle costing.
      - `ignore_access` boolean — If set to true, ignores access restrictions for the route.
      - `ferry_cost` integer — The estimated cost (in seconds) when a ferry is encountered.
      - `height` number, double — The height of the truck (in meters).
      - `width` number, double — The width of the truck (in meters).
      - `toll_booth_cost` integer — The estimated cost (in seconds) when a toll booth is encountered.
      - `toll_booth_penalty` integer — 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.
      - `exclude_cash_only_tolls` boolean — If true, avoids routes with cash-only tolls.
      - `exclude_unpaved` boolean — Indicates whether or not the path may include unpaved roads. If true, the route is allowed to start and end with unpaved roads, but is not allowed to have them in the middle of the route path. Otherwise they are allowed.
      - `use_highways` number, double — 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.
      - `use_tolls` number, double — 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.
      - `use_tracks` number, double — 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.
      - `top_speed` integer — The top speed (in kph) that the vehicle is capable of travelling.
      - `shortest` boolean — If true changes the cost metric to be quasi-shortest (pure distance-based) costing. This will disable ALL other costing factors.
      - `ignore_closures` boolean — If true, ignores all known closures. This option cannot be set if `location.search_filter.exclude_closures` is also specified.
      - `include_hov2` boolean — If true, indicates the desire to include HOV roads with a 2-occupant requirement in the route when advantageous.
      - `include_hov3` boolean — If true, indicates the desire to include HOV roads with a 3-occupant requirement in the route when advantageous.
      - `include_hot` boolean — If true, indicates the desire to include toll roads which require the driver to pay a toll if the occupant requirement isn't met
      - `alley_factor` number, double — A factor that multiplies the cost when alleys are encountered.
      - `use_distance` number, double — A measure of preference for time vs. distance. Values near 0 (default) optimize for time, while values near 1 optimize for shortest distance.
      - `closure_factor` number, double — A factor that penalizes the cost of traversing closed edges. The value is a multiplier on the cost of a closed edge; higher values make closed edges less likely to be used.
      - `length` number, double — The length of the truck (in meters).
      - `weight` number, double — The weight of the truck (in tonnes).
      - `axle_load` number, double — The axle load of the truck (in tonnes).
      - `hazmat` boolean — Whether or not the truck is carrying hazardous materials.
      - `axle_count` integer — The number of axles on the truck.
      - `low_class_penalty` number, double — A penalty (in seconds) for using residential or service roads.
      - `use_truck_route` number, double — A measure of preference for using designated truck routes. Values near 0 (default) have no preference, while values near 1 strongly prefer truck routes.
      - `hgv_no_access_penalty` number, double — A penalty (in seconds) applied to roads which do not allow HGVs. This adds a penalty rather than outright blocking, allowing the router to still use these roads if no better alternative exists. The default penalty is sufficiently high.
    - `bicycle` BicycleCostingOptions
      - `maneuver_penalty` integer — A penalty (in seconds) applied when transitioning between roads (determined by name).
      - `gate_cost` integer — The estimated cost (in seconds) when a gate is encountered.
      - `gate_penalty` integer — A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.
      - `country_crossing_cost` integer — The estimated cost (in seconds) when encountering an international border.
      - `country_crossing_penalty` integer — A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.
      - `service_penalty` integer — A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.
      - `service_factor` number, double — A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.
      - `use_living_streets` number, double — A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.
      - `use_ferry` number, double — 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.
      - `ignore_restrictions` boolean — If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.
      - `ignore_non_vehicular_restrictions` boolean — If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.
      - `ignore_oneways` boolean — If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.
      - `private_access_penalty` number, double — A penalty (in seconds) for accessing private roads.
      - `alley_penalty` number, double — A penalty (in seconds) for using alleys.
      - `rail_ferry_cost` integer — The estimated cost (in seconds) when a rail ferry is encountered. Only applies to costing models that support rail ferries (auto, truck, motorcycle).
      - `use_rail_ferry` number, double — A measure of willingness to take rail ferries. Values near 0 attempt to avoid rail ferries, and values near 1 will favor them. Note that as some routes may be impossible without rail ferries, 0 does not guarantee avoidance of them. Only applies to auto, truck, and motorcycle costing.
      - `ignore_access` boolean — If set to true, ignores access restrictions for the route.
      - `ferry_cost` integer — The estimated cost (in seconds) when a ferry is encountered.
      - `bicycle_type` 'Road' | 'Hybrid' | 'Cross' | 'Mountain' — 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` integer — 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. The default speeds are as follows based on bicycle type: * Road - 25kph * Cross - 20kph * Hybrid - 18kph * Mountain - 16kph
      - `use_roads` number, double — 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.
      - `use_hills` number, double — A measure of willingness to take tackle hills. Values near 0 attempt to avoid hills and steeper grades even if it means a longer route, and values near 1 indicates that the user does not fear them. Note that as some routes may be impossible without hills, 0 does not guarantee avoidance of them.
      - `avoid_bad_surfaces` number, double — 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.
      - `bss_return_cost` integer — The estimated cost (in seconds) to return a bicycle in `bikeshare` mode.
      - `bss_return_penalty` integer — A penalty (in seconds) to return a bicycle in `bikeshare` mode.
    - `motor_scooter` MotorScooterCostingOptions
      - `maneuver_penalty` integer — A penalty (in seconds) applied when transitioning between roads (determined by name).
      - `gate_cost` integer — The estimated cost (in seconds) when a gate is encountered.
      - `gate_penalty` integer — A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.
      - `country_crossing_cost` integer — The estimated cost (in seconds) when encountering an international border.
      - `country_crossing_penalty` integer — A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.
      - `service_penalty` integer — A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.
      - `service_factor` number, double — A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.
      - `use_living_streets` number, double — A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.
      - `use_ferry` number, double — 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.
      - `ignore_restrictions` boolean — If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.
      - `ignore_non_vehicular_restrictions` boolean — If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.
      - `ignore_oneways` boolean — If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.
      - `private_access_penalty` number, double — A penalty (in seconds) for accessing private roads.
      - `alley_penalty` number, double — A penalty (in seconds) for using alleys.
      - `rail_ferry_cost` integer — The estimated cost (in seconds) when a rail ferry is encountered. Only applies to costing models that support rail ferries (auto, truck, motorcycle).
      - `use_rail_ferry` number, double — A measure of willingness to take rail ferries. Values near 0 attempt to avoid rail ferries, and values near 1 will favor them. Note that as some routes may be impossible without rail ferries, 0 does not guarantee avoidance of them. Only applies to auto, truck, and motorcycle costing.
      - `ignore_access` boolean — If set to true, ignores access restrictions for the route.
      - `ferry_cost` integer — The estimated cost (in seconds) when a ferry is encountered.
      - `height` number, double — The height of the automobile (in meters).
      - `width` number, double — The width of the automobile (in meters).
      - `toll_booth_cost` integer — The estimated cost (in seconds) when a toll booth is encountered.
      - `toll_booth_penalty` integer — 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.
      - `exclude_cash_only_tolls` boolean — If true, avoids routes with cash-only tolls.
      - `exclude_unpaved` boolean — Indicates whether or not the path may include unpaved roads. If true, the route is allowed to start and end with unpaved roads, but is not allowed to have them in the middle of the route path. Otherwise they are allowed.
      - `use_highways` number, double — 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.
      - `use_tolls` number, double — 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.
      - `use_tracks` number, double — 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.
      - `top_speed` integer — The top speed (in kph) that the vehicle is capable of travelling.
      - `shortest` boolean — If true changes the cost metric to be quasi-shortest (pure distance-based) costing. This will disable ALL other costing factors.
      - `ignore_closures` boolean — If true, ignores all known closures. This option cannot be set if `location.search_filter.exclude_closures` is also specified.
      - `include_hov2` boolean — If true, indicates the desire to include HOV roads with a 2-occupant requirement in the route when advantageous.
      - `include_hov3` boolean — If true, indicates the desire to include HOV roads with a 3-occupant requirement in the route when advantageous.
      - `include_hot` boolean — If true, indicates the desire to include toll roads which require the driver to pay a toll if the occupant requirement isn't met
      - `alley_factor` number, double — A factor that multiplies the cost when alleys are encountered.
      - `use_distance` number, double — A measure of preference for time vs. distance. Values near 0 (default) optimize for time, while values near 1 optimize for shortest distance.
      - `closure_factor` number, double — A factor that penalizes the cost of traversing closed edges. The value is a multiplier on the cost of a closed edge; higher values make closed edges less likely to be used.
      - `use_primary` number, double — A measure of willingness to use primary roads. Values near 0 attempt to avoid primary roads and stay on roads with lower speeds, and values near 1 indicate the rider is more comfortable on these roads.
      - `use_hills` number, double — A measure of willingness to take tackle hills. Values near 0 attempt to avoid hills and steeper grades even if it means a longer route, and values near 1 indicates that the rider does not fear them. Note that as some routes may be impossible without hills, 0 does not guarantee avoidance of them.
    - `motorcycle` MotorcycleCostingOptions
      - `maneuver_penalty` integer — A penalty (in seconds) applied when transitioning between roads (determined by name).
      - `gate_cost` integer — The estimated cost (in seconds) when a gate is encountered.
      - `gate_penalty` integer — A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.
      - `country_crossing_cost` integer — The estimated cost (in seconds) when encountering an international border.
      - `country_crossing_penalty` integer — A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.
      - `service_penalty` integer — A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.
      - `service_factor` number, double — A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.
      - `use_living_streets` number, double — A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.
      - `use_ferry` number, double — 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.
      - `ignore_restrictions` boolean — If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.
      - `ignore_non_vehicular_restrictions` boolean — If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.
      - `ignore_oneways` boolean — If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.
      - `private_access_penalty` number, double — A penalty (in seconds) for accessing private roads.
      - `alley_penalty` number, double — A penalty (in seconds) for using alleys.
      - `rail_ferry_cost` integer — The estimated cost (in seconds) when a rail ferry is encountered. Only applies to costing models that support rail ferries (auto, truck, motorcycle).
      - `use_rail_ferry` number, double — A measure of willingness to take rail ferries. Values near 0 attempt to avoid rail ferries, and values near 1 will favor them. Note that as some routes may be impossible without rail ferries, 0 does not guarantee avoidance of them. Only applies to auto, truck, and motorcycle costing.
      - `ignore_access` boolean — If set to true, ignores access restrictions for the route.
      - `ferry_cost` integer — The estimated cost (in seconds) when a ferry is encountered.
      - `height` number, double — The height of the automobile (in meters).
      - `width` number, double — The width of the automobile (in meters).
      - `toll_booth_cost` integer — The estimated cost (in seconds) when a toll booth is encountered.
      - `toll_booth_penalty` integer — 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.
      - `exclude_cash_only_tolls` boolean — If true, avoids routes with cash-only tolls.
      - `exclude_unpaved` boolean — Indicates whether or not the path may include unpaved roads. If true, the route is allowed to start and end with unpaved roads, but is not allowed to have them in the middle of the route path. Otherwise they are allowed.
      - `use_highways` number, double — A measure of willingness to use highways. Values near 0 attempt to avoid highways and stay on roads with lower speeds, and values near 1 indicate the rider is more comfortable on these roads.
      - `use_tolls` number, double — 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.
      - `use_tracks` number, double — 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.
      - `top_speed` integer — The top speed (in kph) that the vehicle is capable of travelling.
      - `shortest` boolean — If true changes the cost metric to be quasi-shortest (pure distance-based) costing. This will disable ALL other costing factors.
      - `ignore_closures` boolean — If true, ignores all known closures. This option cannot be set if `location.search_filter.exclude_closures` is also specified.
      - `include_hov2` boolean — If true, indicates the desire to include HOV roads with a 2-occupant requirement in the route when advantageous.
      - `include_hov3` boolean — If true, indicates the desire to include HOV roads with a 3-occupant requirement in the route when advantageous.
      - `include_hot` boolean — If true, indicates the desire to include toll roads which require the driver to pay a toll if the occupant requirement isn't met
      - `alley_factor` number, double — A factor that multiplies the cost when alleys are encountered.
      - `use_distance` number, double — A measure of preference for time vs. distance. Values near 0 (default) optimize for time, while values near 1 optimize for shortest distance.
      - `closure_factor` number, double — A factor that penalizes the cost of traversing closed edges. The value is a multiplier on the cost of a closed edge; higher values make closed edges less likely to be used.
      - `use_trails` number, double — A measure of the rider's sense of adventure. Values near 0 attempt to avoid highways and stay on roads with potentially unsuitable terrain (trails, tracks, unclassified, or bad surfaces), and values near 1 will tend to avoid major roads and route on secondary roads.
    - `pedestrian` PedestrianCostingOptions
      - `walking_speed` number, double — Walking speed in kph.
      - `walkway_factor` number, double — A factor that multiplies the cost when walkways are encountered.
      - `sidewalk_factor` number, double — A factor that multiplies the cost when sidewalks are encountered.
      - `alley_factor` number, double — A factor that multiplies the cost when alleys are encountered.
      - `driveway_factor` number, double — A factor that multiplies the cost when driveways are encountered.
      - `step_penalty` integer — A penalty (in seconds) added to each transition onto a path with steps or stairs.
      - `use_ferry` number, double — 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.
      - `use_living_streets` number, double — A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.
      - `use_tracks` number, double — 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.
      - `use_hills` number, double — A measure of willingness to take tackle hills. Values near 0 attempt to avoid hills and steeper grades even if it means a longer route, and values near 1 indicates that the user does not fear them. Note that as some routes may be impossible without hills, 0 does not guarantee avoidance of them.
      - `use_lit` number, double — A measure of preference for streets that are lit. 0 indicates indifference toward lit streets, and 1 indicates that unlit streets should be avoided. Note that even with values near 1, there is no guarantee that the returned route will include lit segments.
      - `service_penalty` integer — A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.
      - `service_factor` number, double — A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.
      - `max_hiking_difficulty` integer — The maximum difficulty of hiking trails allowed. This corresponds to the OSM `sac_scale`.
      - `bss_rent_cost` integer — The estimated cost (in seconds) to rent a bicycle from a sharing station in `bikeshare` mode.
      - `bss_rent_penalty` integer — A penalty (in seconds) to rent a bicycle in `bikeshare` mode.
      - `type` 'foot' | 'blind' | 'wheelchair' — If set to blind, enables additional route instructions which are helpful for blind users. These include announcing street crossings, stairs, bridges, tunnels, gates, and bollards passed on the route. If set to wheelchair, the walking speed and step penalty are adjusted for wheelchair users.
      - `max_distance` integer — Maximum total walking distance (in meters). Defaults to 100,000 for foot, 10,000 for wheelchair.
      - `max_grade` integer — Maximum grade (steepness) as a percentage. Defaults to 90 for foot, 12 for wheelchair.
      - `mode_factor` number, double — A factor that modifies the cost when transitioning between travel modes. Setting this value higher than 1 will avoid walking, while setting it lower than 1 will prefer walking.
      - `elevator_penalty` integer — A penalty (in seconds) for using an elevator.
    - `low_speed_vehicle` LowSpeedVehicleCostingOptions
      - `maneuver_penalty` integer — A penalty (in seconds) applied when transitioning between roads (determined by name).
      - `gate_cost` integer — The estimated cost (in seconds) when a gate is encountered.
      - `gate_penalty` integer — A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.
      - `country_crossing_cost` integer — The estimated cost (in seconds) when encountering an international border.
      - `country_crossing_penalty` integer — A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.
      - `service_penalty` integer — A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.
      - `service_factor` number, double — A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.
      - `use_living_streets` number, double — A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.
      - `use_ferry` number, double — 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.
      - `ignore_restrictions` boolean — If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.
      - `ignore_non_vehicular_restrictions` boolean — If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.
      - `ignore_oneways` boolean — If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.
      - `private_access_penalty` number, double — A penalty (in seconds) for accessing private roads.
      - `alley_penalty` number, double — A penalty (in seconds) for using alleys.
      - `rail_ferry_cost` integer — The estimated cost (in seconds) when a rail ferry is encountered. Only applies to costing models that support rail ferries (auto, truck, motorcycle).
      - `use_rail_ferry` number, double — A measure of willingness to take rail ferries. Values near 0 attempt to avoid rail ferries, and values near 1 will favor them. Note that as some routes may be impossible without rail ferries, 0 does not guarantee avoidance of them. Only applies to auto, truck, and motorcycle costing.
      - `ignore_access` boolean — If set to true, ignores access restrictions for the route.
      - `ferry_cost` integer — The estimated cost (in seconds) when a ferry is encountered.
      - `vehicle_type` 'low_speed_vehicle' | 'golf_cart' — The type of vehicle: * low_speed_vehicle (BETA): a low-speed vehicle which falls under a different regulatory and licensing regime than automobiles (ex: LSV in the US and Canada, Quadricycles in the EU, etc.) * golf_cart: a street legal golf cart that is under a similar regulator regime as the generic LSV laws, but may need to follow special paths when available or abide by restrictions specific to golf carts.
      - `top_speed` integer — The top speed (in kph) that the vehicle is capable of travelling. This impacts travel time calculations as well as which roads are preferred. A very low speed vehicle will tend to prefer lower speed roads even in the presence of other legal routes.
      - `max_allowed_speed_limit` integer — The maximum speed limit for highways on which it is legal for the vehicle to travel. Defaults to 57 (kph; around 35 mph). Acceptable values range from 20 to 80. Highways with *tagged* speed limits higher than this value will not be routed over (some caveats apply; this feature is still BETA).
  - `date_time` TimeConstraintV1 — Specifies the time context for time-dependent routing (e.g., to account for traffic patterns or time-based access restrictions). Defaults to depart_now for traffic-influenced routing profiles like `auto_traffic`.
    - `type` 'depart_now' | 'depart_at' | 'arrive_at', required — The type of time constraint: `depart_now` = depart now (current time), `depart_at` = depart at the specified time, `arrive_at` = arrive by the specified time.
    - `value` string — The date and time in `YYYY-MM-DDTHH:MM` format (seconds are accepted, but will be ignored). The date and time are local (civil) time as observed at the location. Required when type is depart_at or arrive_at. Must not be provided for depart_now.
  - `shape_match` 'edge_walk' | 'map_snap' | 'walk_or_snap' — Three snapping modes provide some control over how the map matching occurs. `edge_walk` is fast, but requires extremely precise data that matches the route graph almost perfectly. `map_snap` can handle significantly noisier data, but is very expensive. `walk_or_snap`, the default, tries to use edge walking first and falls back to map matching if edge walking fails. In general, you should not need to change this parameter unless you want to trace a multi-leg route with multiple `break` locations in the `shape`.
  - `units` 'km' | 'mi'
  - `language` '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'
  - `directions_type` 'none' | 'maneuvers' | 'instructions' — The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.
  - `format` 'json' | 'osrm' — The output response format. The default JSON format is extremely compact and ideal for web or data-constrained use cases where you want to fetch additional attributes on demand in small chunks. The OSRM format is much richer and is configurable with significantly more info for turn-by-turn navigation use cases.
  - `banner_instructions` boolean — Optionally includes helpful banners with timing information for turn-by-turn navigation. This is only available in the OSRM format.
  - `voice_instructions` boolean — Optionally includes voice instructions with timing information for turn-by-turn navigation. This is only available in the OSRM format.
  - `filters` AnnotationFilters
    - `action` 'include' | 'exclude'
    - `attributes` string[] — A set of granular attributes to include between every pair of coordinates along the route. This can significantly increase the response size.
  - `begin_time` integer — The timestamp at the start of the trace. Combined with `durations`, this provides a way to include timing information for an `encoded_polyline` trace.
  - `durations` integer — A list of durations (in seconds) between each successive pair of points in a polyline.
  - `use_timestamps` boolean — If true, the input timestamps or durations should be used when computing elapsed time for each edge along the matched path rather than the routing algorithm estimates.
  - `trace_options` MapMatchTraceOptions
    - `search_radius` integer — The search radius, in meters, when trying to match each trace point.
    - `gps_accuracy` number, double — The accuracy of the GPS, in meters.
    - `breakage_distance` number, double — The breaking distance, in meters, between trace points.
    - `interpolation_distance` number, double — The interpolation distance, in meters, beyond which trace points are merged together.
    - `turn_penalty_factor` integer — Penalizes turns from one road segment to next. For a pedestrian trace, you may see a back-and-forth motion along the streets of your path with the default settings. Try increasing the turn penalty factor to 500 to reduce jitter in the output. Note that if GPS accuracy is already good, increasing this above the default will usually negatively affect the quality of map matching.
  - `linear_references` boolean — If true, the response will include a `linear_references` value that contains an array of base64-encoded [OpenLR location references](https://www.openlr-association.com/fileadmin/user_upload/openlr-whitepaper_v1.5.pdf), one for each graph edge of the road network matched by the trace.
  - `elevation_interval` number, float — If greater than zero, attempts to include elevation along the route at regular intervals. The "native" internal resolution is 30m, so we recommend you use this when possible. This number is interpreted as either meters or feet depending on the unit parameter. Elevation for route sections containing a bridge or tunnel is interpolated linearly. This doesn't always match the true elevation of the bridge/tunnel, but it prevents sharp artifacts from the surrounding terrain. This functionality is unique to the routing endpoints and is not available via the elevation API. NOTE: This has no effect on the OSRM response format.

## Response `200`

The matched route(s), which looks more or less like a normal route response, optionally with a `linear_references` key.

- MapMatchRouteResponse
  - `id` string — An identifier to disambiguate requests (echoed by the server).
  - `trip` RouteTrip, required
    - `status` integer, required — The response status code
    - `status_message` string, required — The response status message
    - `units` 'miles' | 'kilometers', required
    - `language` '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', required
    - `locations` RoutingResponseWaypoint[], required
      - `lat` number, double, required — The latitude of a point in the shape.
      - `lon` number, double, required — The longitude of a point in the shape.
      - `type` 'break' | 'through' | 'via' | 'break_through' — 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. Defaults to `break`.
      - `original_index` integer — The original index of the location (locations may be reordered for optimized routes)
    - `legs` RouteLeg[], required
      - `maneuvers` RouteManeuver[]
        - `type` integer, required — 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` string, required — The written maneuver instruction.
        - `verbal_transition_alert_instruction` string — Text suitable for use as a verbal navigation alert.
        - `verbal_pre_transition_instruction` string — Text suitable for use as a verbal navigation alert immediately prior to the maneuver transition.
        - `verbal_post_transition_instruction` string — Text suitable for use as a verbal navigation alert immediately after to the maneuver transition.
        - `street_names` string[] — A list of street names that are consistent along the entire maneuver.
        - `begin_street_names` string[] — A list of street names at the beginning of the maneuver, if they are different from the names at the end.
        - `time` number, double, required — The estimated time to complete the entire maneuver, in seconds.
        - `length` number, double, required — The length of the maneuver, in `units`.
        - `begin_shape_index` integer, required — The index into the list of shape points for the start of the maneuver.
        - `end_shape_index` integer, required — The index into the list of shape points for the end of the maneuver.
        - `toll` boolean — True any portion of the maneuver is subject to a toll.
        - `rough` boolean — True any portion of the maneuver is unpaved or has portions of rough pavement.
        - `gate` boolean — True if a gate is encountered in the course of this maneuver.
        - `ferry` boolean — True if a ferry is encountered in the course of this maneuver.
        - `sign` ManeuverSign
          - `exit_number_elements` ManeuverSignElement[] — A list of exit number elements. This is typically just a single value.
            - `text` string, required — The interchange sign text (varies based on the context; see the `maneuverSign` schema).
            - `is_route_number` boolean — True if the sign is a route number.
            - `consecutive_count` integer — The frequency of this sign element within a set a consecutive signs.
          - `exit_branch_elements` ManeuverSignElement[] — A list of exit branch elements. The text is a subsequent road name or route number after the sign.
            - `text` string, required — The interchange sign text (varies based on the context; see the `maneuverSign` schema).
            - `is_route_number` boolean — True if the sign is a route number.
            - `consecutive_count` integer — The frequency of this sign element within a set a consecutive signs.
          - `exit_toward_elements` ManeuverSignElement[] — A list of exit name elements. The text is the interchange identifier (used more frequently outside the US).
            - `text` string, required — The interchange sign text (varies based on the context; see the `maneuverSign` schema).
            - `is_route_number` boolean — True if the sign is a route number.
            - `consecutive_count` integer — The frequency of this sign element within a set a consecutive signs.
          - `exit_name_elements` ManeuverSignElement[] — A list of exit name elements. The text is the location where the road ahead goes (typically a city, but occasionally a road name or route number).
            - `text` string, required — The interchange sign text (varies based on the context; see the `maneuverSign` schema).
            - `is_route_number` boolean — True if the sign is a route number.
            - `consecutive_count` integer — The frequency of this sign element within a set a consecutive signs.
        - `roundabout_exit_count` integer — The exit number of the roundabout to take after entering.
        - `depart_instruction` integer — The written departure time instruction (typically used in a transit maneuver).
        - `verbal_depart_instruction` integer — Text suitable for use as a verbal departure time instruction (typically used in a transit maneuver).
        - `arrive_instruction` integer — The written arrival time instruction (typically used in a transit maneuver).
        - `verbal_arrive_instruction` integer — Text suitable for use as a verbal departure time instruction (typically used in a transit maneuver).
        - `transit_info` TransitInfo — Public transit info (not currently supported).
        - `verbal_multi_cue` boolean — True if the `verbal_pre_transition_instruction` has been appended with the verbal instruction of the next maneuver.
        - `travel_mode` 'drive' | 'pedestrian' | 'bicycle' | 'transit', required
        - `travel_type` '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', required — 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.
        - `bss_maneuver_type` 'NoneAction' | 'RentBikeAtBikeShare' | 'ReturnBikeAtBikeShare' — Describes a bike share action when using bikeshare routing.
      - `shape` string, required — An encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) with 6 digits of decimal precision (NOTE: Most implementations default to 5!).
      - `summary` RouteSummary, required
        - `time` number, double, required — The estimated travel time, in seconds
        - `length` number, double, required — The estimated travel distance, in `units` (km or mi)
        - `min_lat` number, double, required — The minimum latitude of the bounding box containing the route.
        - `max_lat` number, double, required — The maximum latitude of the bounding box containing the route.
        - `min_lon` number, double, required — The minimum longitude of the bounding box containing the route.
        - `max_lon` number, double, required — The maximum longitude of the bounding box containing the route.
      - `elevation_interval` number, float — The sampling distance between elevation values along the route. This echoes the request parameter having the same name (converted to `units` if necessary).
      - `elevation` number[] — An array of elevation values sampled every `elevation_interval`. Units are either metric or imperial depending on the value of `units`.
    - `summary` RouteSummary, required
      - `time` number, double, required — The estimated travel time, in seconds
      - `length` number, double, required — The estimated travel distance, in `units` (km or mi)
      - `min_lat` number, double, required — The minimum latitude of the bounding box containing the route.
      - `max_lat` number, double, required — The maximum latitude of the bounding box containing the route.
      - `min_lon` number, double, required — The minimum longitude of the bounding box containing the route.
      - `max_lon` number, double, required — The maximum longitude of the bounding box containing the route.
  - `alternates` object[]
    - `trip` RouteTrip
      - `status` integer, required — The response status code
      - `status_message` string, required — The response status message
      - `units` 'miles' | 'kilometers', required
      - `language` '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', required
      - `locations` RoutingResponseWaypoint[], required
        - `lat` number, double, required — The latitude of a point in the shape.
        - `lon` number, double, required — The longitude of a point in the shape.
        - `type` 'break' | 'through' | 'via' | 'break_through' — 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. Defaults to `break`.
        - `original_index` integer — The original index of the location (locations may be reordered for optimized routes)
      - `legs` RouteLeg[], required
        - `maneuvers` RouteManeuver[]
          - `type` integer, required — 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` string, required — The written maneuver instruction.
          - `verbal_transition_alert_instruction` string — Text suitable for use as a verbal navigation alert.
          - `verbal_pre_transition_instruction` string — Text suitable for use as a verbal navigation alert immediately prior to the maneuver transition.
          - `verbal_post_transition_instruction` string — Text suitable for use as a verbal navigation alert immediately after to the maneuver transition.
          - `street_names` string[] — A list of street names that are consistent along the entire maneuver.
          - `begin_street_names` string[] — A list of street names at the beginning of the maneuver, if they are different from the names at the end.
          - `time` number, double, required — The estimated time to complete the entire maneuver, in seconds.
          - `length` number, double, required — The length of the maneuver, in `units`.
          - `begin_shape_index` integer, required — The index into the list of shape points for the start of the maneuver.
          - `end_shape_index` integer, required — The index into the list of shape points for the end of the maneuver.
          - `toll` boolean — True any portion of the maneuver is subject to a toll.
          - `rough` boolean — True any portion of the maneuver is unpaved or has portions of rough pavement.
          - `gate` boolean — True if a gate is encountered in the course of this maneuver.
          - `ferry` boolean — True if a ferry is encountered in the course of this maneuver.
          - `sign` ManeuverSign
            - `exit_number_elements` ManeuverSignElement[] — A list of exit number elements. This is typically just a single value.
              - …
            - `exit_branch_elements` ManeuverSignElement[] — A list of exit branch elements. The text is a subsequent road name or route number after the sign.
              - …
            - `exit_toward_elements` ManeuverSignElement[] — A list of exit name elements. The text is the interchange identifier (used more frequently outside the US).
              - …
            - `exit_name_elements` ManeuverSignElement[] — A list of exit name elements. The text is the location where the road ahead goes (typically a city, but occasionally a road name or route number).
              - …
          - `roundabout_exit_count` integer — The exit number of the roundabout to take after entering.
          - `depart_instruction` integer — The written departure time instruction (typically used in a transit maneuver).
          - `verbal_depart_instruction` integer — Text suitable for use as a verbal departure time instruction (typically used in a transit maneuver).
          - `arrive_instruction` integer — The written arrival time instruction (typically used in a transit maneuver).
          - `verbal_arrive_instruction` integer — Text suitable for use as a verbal departure time instruction (typically used in a transit maneuver).
          - `transit_info` TransitInfo — Public transit info (not currently supported).
          - `verbal_multi_cue` boolean — True if the `verbal_pre_transition_instruction` has been appended with the verbal instruction of the next maneuver.
          - `travel_mode` 'drive' | 'pedestrian' | 'bicycle' | 'transit', required
          - `travel_type` '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', required — 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.
          - `bss_maneuver_type` 'NoneAction' | 'RentBikeAtBikeShare' | 'ReturnBikeAtBikeShare' — Describes a bike share action when using bikeshare routing.
        - `shape` string, required — An encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) with 6 digits of decimal precision (NOTE: Most implementations default to 5!).
        - `summary` RouteSummary, required
          - `time` number, double, required — The estimated travel time, in seconds
          - `length` number, double, required — The estimated travel distance, in `units` (km or mi)
          - `min_lat` number, double, required — The minimum latitude of the bounding box containing the route.
          - `max_lat` number, double, required — The maximum latitude of the bounding box containing the route.
          - `min_lon` number, double, required — The minimum longitude of the bounding box containing the route.
          - `max_lon` number, double, required — The maximum longitude of the bounding box containing the route.
        - `elevation_interval` number, float — The sampling distance between elevation values along the route. This echoes the request parameter having the same name (converted to `units` if necessary).
        - `elevation` number[] — An array of elevation values sampled every `elevation_interval`. Units are either metric or imperial depending on the value of `units`.
      - `summary` RouteSummary, required
        - `time` number, double, required — The estimated travel time, in seconds
        - `length` number, double, required — The estimated travel distance, in `units` (km or mi)
        - `min_lat` number, double, required — The minimum latitude of the bounding box containing the route.
        - `max_lat` number, double, required — The maximum latitude of the bounding box containing the route.
        - `min_lon` number, double, required — The minimum longitude of the bounding box containing the route.
        - `max_lon` number, double, required — The maximum longitude of the bounding box containing the route.
  - `linear_references` string[]

## Other responses

- `400` — Bad request; more details will be included
- `500` — An internal parse error occurred; more details will be included

---

[API](https://skmtc.net/stadiamaps/apis/stadia-maps-geospatial-apis.md) · [All operations](https://skmtc.net/stadiamaps/apis/stadia-maps-geospatial-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stadiamaps/stadia-maps-geospatial-apis/versions/99e0701a73aa/schema)
