---
title: "Trace the attributes of roads visited on a route."
method: POST
path: "/trace_attributes/v1"
tags: ["Routing"]
---

# Trace the attributes of roads visited on a route.

`POST /trace_attributes/v1`

The trace attributes endpoint retrieves detailed information along a route, returning details for each section along the path, as well as any intersections encountered. In addition to tracing a recording route, this is great for providing just-in-time info to navigation applications, enabling them to conserve resources by omitting info like speed limits upfront that may be irrelevant if the user goes off-route.

## Request body

- TraceAttributesRequest
  - `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`.
  - `filters` TraceAttributeFilterOptions
    - `attributes` TraceAttributeKey[], required
    - `action` 'include' | 'exclude', required — Determines whether the list of attributes will be used as a whitelist or a blacklist.
  - `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.
  - `units` 'km' | 'mi'

## Response `200`

The edges along the traced route with detailed info.

- TraceAttributesResponse
  - `edges` TraceEdge[], nullable — The list of edges matched along the path.
    - `names` string[] — The name(s) of the road at this edge, if any.
    - `length` number, double — The length of this edge in `units`.
    - `speed` integer — The speed of this edge in `units`/hr, in terms of average/free-flow speed for routing purposes. This is affected by any number of factors such as the road service, vehicle type, etc. and not just the posted speed limits.
    - `road_class` 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'unclassified' | 'residential' | 'service_other' — Class of road (ranked in descending order)
    - `begin_heading` integer — The direction at the beginning of an edge. The units are degrees clockwise from north.
    - `end_heading` integer — The direction at the end of an edge. The units are degrees clockwise from north.
    - `begin_shape_index` integer — Index into the list of shape points for the start of the edge.
    - `end_shape_index` integer — Index into the list of shape points for the end of the edge.
    - `traversability` 'forward' | 'backward' | 'both' — The directions in which the edge is traversable.
    - `use` 'road' | 'ramp' | 'turn_channel' | 'track' | 'driveway' | 'alley' | 'parking_aisle' | 'emergency_access' | 'drive_through' | 'culdesac' | 'living_street' | 'service_road' | 'cycleway' | 'mountain_bike' | 'sidewalk' | 'footway' | 'steps' | 'path' | 'pedestrian' | 'pedestrian_crossing' | 'bridleway' | 'rest_area' | 'service_area' | 'other' | 'ferry' | 'rail-ferry' | 'rail' | 'bus' | 'egress_connection' | 'platform_connection' | 'transit_connection' — The use for the edge.
    - `toll` boolean — True if the edge has a toll.
    - `unpaved` boolean — True if the edge has rough payment.
    - `tunnel` boolean — True if the edge is a tunnel.
    - `bridge` boolean — True if the edge is a bridge.
    - `roundabout` boolean — True if the edge is a roundabout.
    - `internal_intersection` boolean — True if the edge is an internal intersection.
    - `drive_on_right` boolean — True if the edge is in an area where you must drive on the right side of the road.
    - `surface` 'paved_smooth' | 'paved' | 'paved_rough' | 'compacted' | 'dirt' | 'gravel' | 'path' | 'impassable' — The type of surface for the edge.
    - `sign` EdgeSign
      - `exit_number` string[]
      - `exit_branch` string[]
      - `exit_toward` string[]
      - `exit_name` string[]
    - `travel_mode` 'drive' | 'pedestrian' | 'bicycle' | 'transit'
    - `vehicle_type` 'car' | 'motorcycle' | 'bus' | 'tractor_trailer' | 'golf_cart' | 'low_speed_vehicle'
    - `pedestrian_type` 'foot' | 'wheelchair' | 'segway'
    - `bicycle_type` 'road' | 'cross' | 'hybrid' | 'mountain'
    - `transit_type` 'tram' | 'metro' | 'rail' | 'bus' | 'ferry' | 'cable_car' | 'gondola' | 'funicular'
    - `id` integer
    - `way_id` integer — The way identifier of the edge in OSM.
    - `weighted_grade` number, double — The weighted grade factor. The weighted grade is derived from elevation data. It is a measure used for hill avoidance in routing - sort of a relative energy use along an edge. But since an edge can possibly go up and down over several hills, it might not equate to what you would normally think of as grade.
    - `max_upward_grade` integer — The maximum upward slope. A value of 32768 indicates no elevation data is available for this edge.
    - `max_downward_grade` integer — The maximum downward slope. A value of 32768 indicates no elevation data is available for this edge.
    - `mean_elevation` integer — The mean elevation along the edge. Units are meters by default. If the `units` are specified as miles, then the mean elevation is returned in feet. A value of 32768 indicates no elevation data is available for this edge.
    - `lane_count` integer — The number of lanes for this edge.
    - `cycle_lane` 'none' | 'shared' | 'dedicated' | 'separated' — The type of cycle lane (if any) along this edge.
    - `bicycle_network` integer — The type of bicycle network, if any. This is an integer comprised of constants bitwise or'd together. For example, a route that's part of both a local and mountain network would have a value of 12. 1 - National 2 - Regional 4 - Local 8 - Mountain
    - `sac_scale` integer — The difficulty of the hiking trail according to the SAC scale. 0 - No Sac Scale 1 - Hiking 2 - Mountain hiking 3 - Demanding mountain hiking 4 - Alpine hiking 5 - Demanding alpine hiking 6 - Difficult alpine hiking
    - `sidewalk` 'left' | 'right' | 'both' | 'none'
    - `density` integer
    - `speed_limit` integer — The speed limit along the edge measured in `units`/hr. This may be either an integer or the string "unlimited" if speed limit data is available. If absent, there is no speed limit data available.
    - `truck_speed` integer — The truck speed of this edge in `units`/hr, in terms of average/free-flow speed for routing purposes. This is affected by any number of factors such as the road service, vehicle type, etc. and not just the posted speed limits.
    - `truck_route` boolean — True if the edge is part of a truck route/network.
    - `end_node` EndNode — The node at the end of this edge
      - `intersecting_edges` IntersectingEdge[] — A set of edges intersecting this node.
        - `begin_heading` integer — The direction at the beginning of an edge. The units are degrees clockwise from north.
        - `from_edge_name_consistency` boolean — True if this intersecting edge at the end node has consistent names with the path from the other edge.
        - `to_edge_name_consistency` boolean — True if this intersecting edge at the end node has consistent names with the path to the other edge.
        - `driveability` 'forward' | 'backward' | 'both' — The directions in which the edge is traversable.
        - `cyclability` 'forward' | 'backward' | 'both' — The directions in which the edge is traversable.
        - `walkability` 'forward' | 'backward' | 'both' — The directions in which the edge is traversable.
        - `use` 'road' | 'ramp' | 'turn_channel' | 'track' | 'driveway' | 'alley' | 'parking_aisle' | 'emergency_access' | 'drive_through' | 'culdesac' | 'living_street' | 'service_road' | 'cycleway' | 'mountain_bike' | 'sidewalk' | 'footway' | 'steps' | 'path' | 'pedestrian' | 'pedestrian_crossing' | 'bridleway' | 'rest_area' | 'service_area' | 'other' | 'ferry' | 'rail-ferry' | 'rail' | 'bus' | 'egress_connection' | 'platform_connection' | 'transit_connection' — The use for the edge.
        - `road_class` 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'unclassified' | 'residential' | 'service_other' — Class of road (ranked in descending order)
      - `elapsed_time` number, double — The elapsed time along the path to arrive at this node.
      - `admin_index` integer — The index into the `admins` list in which this node lies.
      - `type` 'street_intersection' | 'gate' | 'bollard' | 'toll_booth' | 'multi_use_transit_stop' | 'bike_share' | 'parking' | 'motor_way_junction' | 'border_control'
      - `fork` boolean — True if this node is a fork.
      - `time_zone` string — The canonical TZDB identifier for the node's time zone.
  - `admins` AdminRegion[] — The set of administrative regions matched along the path. Rather than repeating this information for every end node, the admins in this list are referenced by index.
    - `country_code` string — The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
    - `country_text` string — The country name
    - `state_code` string — The abbreviation code for the state (varies by country).
    - `state_text` string — The state name.
  - `matched_points` MatchedPoint[] — List of match results when using the map_snap shape match algorithm. There is a one-to-one correspondence with the input set of latitude, longitude coordinates and this list of match results.
    - `lat` number, double, required — The latitude of the matched point.
    - `lon` number, double, required — The longitude of the matched point.
    - `type` 'unmatched' | 'interpolated' | 'matched', required
    - `edge_index` integer — The index of the edge in the list of `edges`. This key will be missing if the point is unmatched.
    - `begin_route_discontinuity` boolean — If true, this match result is the begin location of a route discontinuity.
    - `end_route_discontinuity` boolean — If true, this match result is the end location of a route discontinuity.
    - `distance_along_edge` number, double — The distance along the associated edge for this matched point, expressed as a value between 0 and 1. For example, if the matched point is halfway along the edge, then the value will be 0.5. This key will be absent if the point is unmatched.
    - `distance_from_trace_point` number, double — The distance in meters from the trace point to the matched point. This key will be absent if the point is unmatched.
  - `osm_changeset` integer
  - `shape` string — The encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) of the matched path.
  - `confidence_score` number, double
  - `id` string — An identifier to disambiguate requests (echoed by the server).
  - `units` 'miles' | 'kilometers'
  - `alternate_paths` TraceAttributesBaseResponse[] — Alternate paths, if any, that were not classified as the best match.
    - `edges` TraceEdge[], nullable — The list of edges matched along the path.
      - `names` string[] — The name(s) of the road at this edge, if any.
      - `length` number, double — The length of this edge in `units`.
      - `speed` integer — The speed of this edge in `units`/hr, in terms of average/free-flow speed for routing purposes. This is affected by any number of factors such as the road service, vehicle type, etc. and not just the posted speed limits.
      - `road_class` 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'unclassified' | 'residential' | 'service_other' — Class of road (ranked in descending order)
      - `begin_heading` integer — The direction at the beginning of an edge. The units are degrees clockwise from north.
      - `end_heading` integer — The direction at the end of an edge. The units are degrees clockwise from north.
      - `begin_shape_index` integer — Index into the list of shape points for the start of the edge.
      - `end_shape_index` integer — Index into the list of shape points for the end of the edge.
      - `traversability` 'forward' | 'backward' | 'both' — The directions in which the edge is traversable.
      - `use` 'road' | 'ramp' | 'turn_channel' | 'track' | 'driveway' | 'alley' | 'parking_aisle' | 'emergency_access' | 'drive_through' | 'culdesac' | 'living_street' | 'service_road' | 'cycleway' | 'mountain_bike' | 'sidewalk' | 'footway' | 'steps' | 'path' | 'pedestrian' | 'pedestrian_crossing' | 'bridleway' | 'rest_area' | 'service_area' | 'other' | 'ferry' | 'rail-ferry' | 'rail' | 'bus' | 'egress_connection' | 'platform_connection' | 'transit_connection' — The use for the edge.
      - `toll` boolean — True if the edge has a toll.
      - `unpaved` boolean — True if the edge has rough payment.
      - `tunnel` boolean — True if the edge is a tunnel.
      - `bridge` boolean — True if the edge is a bridge.
      - `roundabout` boolean — True if the edge is a roundabout.
      - `internal_intersection` boolean — True if the edge is an internal intersection.
      - `drive_on_right` boolean — True if the edge is in an area where you must drive on the right side of the road.
      - `surface` 'paved_smooth' | 'paved' | 'paved_rough' | 'compacted' | 'dirt' | 'gravel' | 'path' | 'impassable' — The type of surface for the edge.
      - `sign` EdgeSign
        - `exit_number` string[]
        - `exit_branch` string[]
        - `exit_toward` string[]
        - `exit_name` string[]
      - `travel_mode` 'drive' | 'pedestrian' | 'bicycle' | 'transit'
      - `vehicle_type` 'car' | 'motorcycle' | 'bus' | 'tractor_trailer' | 'golf_cart' | 'low_speed_vehicle'
      - `pedestrian_type` 'foot' | 'wheelchair' | 'segway'
      - `bicycle_type` 'road' | 'cross' | 'hybrid' | 'mountain'
      - `transit_type` 'tram' | 'metro' | 'rail' | 'bus' | 'ferry' | 'cable_car' | 'gondola' | 'funicular'
      - `id` integer
      - `way_id` integer — The way identifier of the edge in OSM.
      - `weighted_grade` number, double — The weighted grade factor. The weighted grade is derived from elevation data. It is a measure used for hill avoidance in routing - sort of a relative energy use along an edge. But since an edge can possibly go up and down over several hills, it might not equate to what you would normally think of as grade.
      - `max_upward_grade` integer — The maximum upward slope. A value of 32768 indicates no elevation data is available for this edge.
      - `max_downward_grade` integer — The maximum downward slope. A value of 32768 indicates no elevation data is available for this edge.
      - `mean_elevation` integer — The mean elevation along the edge. Units are meters by default. If the `units` are specified as miles, then the mean elevation is returned in feet. A value of 32768 indicates no elevation data is available for this edge.
      - `lane_count` integer — The number of lanes for this edge.
      - `cycle_lane` 'none' | 'shared' | 'dedicated' | 'separated' — The type of cycle lane (if any) along this edge.
      - `bicycle_network` integer — The type of bicycle network, if any. This is an integer comprised of constants bitwise or'd together. For example, a route that's part of both a local and mountain network would have a value of 12. 1 - National 2 - Regional 4 - Local 8 - Mountain
      - `sac_scale` integer — The difficulty of the hiking trail according to the SAC scale. 0 - No Sac Scale 1 - Hiking 2 - Mountain hiking 3 - Demanding mountain hiking 4 - Alpine hiking 5 - Demanding alpine hiking 6 - Difficult alpine hiking
      - `sidewalk` 'left' | 'right' | 'both' | 'none'
      - `density` integer
      - `speed_limit` integer — The speed limit along the edge measured in `units`/hr. This may be either an integer or the string "unlimited" if speed limit data is available. If absent, there is no speed limit data available.
      - `truck_speed` integer — The truck speed of this edge in `units`/hr, in terms of average/free-flow speed for routing purposes. This is affected by any number of factors such as the road service, vehicle type, etc. and not just the posted speed limits.
      - `truck_route` boolean — True if the edge is part of a truck route/network.
      - `end_node` EndNode — The node at the end of this edge
        - `intersecting_edges` IntersectingEdge[] — A set of edges intersecting this node.
          - `begin_heading` integer — The direction at the beginning of an edge. The units are degrees clockwise from north.
          - `from_edge_name_consistency` boolean — True if this intersecting edge at the end node has consistent names with the path from the other edge.
          - `to_edge_name_consistency` boolean — True if this intersecting edge at the end node has consistent names with the path to the other edge.
          - `driveability` 'forward' | 'backward' | 'both' — The directions in which the edge is traversable.
          - `cyclability` 'forward' | 'backward' | 'both' — The directions in which the edge is traversable.
          - `walkability` 'forward' | 'backward' | 'both' — The directions in which the edge is traversable.
          - `use` 'road' | 'ramp' | 'turn_channel' | 'track' | 'driveway' | 'alley' | 'parking_aisle' | 'emergency_access' | 'drive_through' | 'culdesac' | 'living_street' | 'service_road' | 'cycleway' | 'mountain_bike' | 'sidewalk' | 'footway' | 'steps' | 'path' | 'pedestrian' | 'pedestrian_crossing' | 'bridleway' | 'rest_area' | 'service_area' | 'other' | 'ferry' | 'rail-ferry' | 'rail' | 'bus' | 'egress_connection' | 'platform_connection' | 'transit_connection' — The use for the edge.
          - `road_class` 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'unclassified' | 'residential' | 'service_other' — Class of road (ranked in descending order)
        - `elapsed_time` number, double — The elapsed time along the path to arrive at this node.
        - `admin_index` integer — The index into the `admins` list in which this node lies.
        - `type` 'street_intersection' | 'gate' | 'bollard' | 'toll_booth' | 'multi_use_transit_stop' | 'bike_share' | 'parking' | 'motor_way_junction' | 'border_control'
        - `fork` boolean — True if this node is a fork.
        - `time_zone` string — The canonical TZDB identifier for the node's time zone.
    - `admins` AdminRegion[] — The set of administrative regions matched along the path. Rather than repeating this information for every end node, the admins in this list are referenced by index.
      - `country_code` string — The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
      - `country_text` string — The country name
      - `state_code` string — The abbreviation code for the state (varies by country).
      - `state_text` string — The state name.
    - `matched_points` MatchedPoint[] — List of match results when using the map_snap shape match algorithm. There is a one-to-one correspondence with the input set of latitude, longitude coordinates and this list of match results.
      - `lat` number, double, required — The latitude of the matched point.
      - `lon` number, double, required — The longitude of the matched point.
      - `type` 'unmatched' | 'interpolated' | 'matched', required
      - `edge_index` integer — The index of the edge in the list of `edges`. This key will be missing if the point is unmatched.
      - `begin_route_discontinuity` boolean — If true, this match result is the begin location of a route discontinuity.
      - `end_route_discontinuity` boolean — If true, this match result is the end location of a route discontinuity.
      - `distance_along_edge` number, double — The distance along the associated edge for this matched point, expressed as a value between 0 and 1. For example, if the matched point is halfway along the edge, then the value will be 0.5. This key will be absent if the point is unmatched.
      - `distance_from_trace_point` number, double — The distance in meters from the trace point to the matched point. This key will be absent if the point is unmatched.
    - `osm_changeset` integer
    - `shape` string — The encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) of the matched path.
    - `confidence_score` number, double

## Other responses

- `400` — Bad request; 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)
