---
title: "Calculate a time distance matrix for use in an optimizer."
method: POST
path: "/matrix/v1"
tags: ["Routing"]
---

# Calculate a time distance matrix for use in an optimizer.

`POST /matrix/v1`

The time distance matrix API lets you compare travel times between a set of possible start and end points.
See https://docs.stadiamaps.com/limits/ for documentation of our latest limits.

## Request body

- MatrixRequest
  - `id` string — An identifier to disambiguate requests (echoed by the server).
  - `sources` MatrixWaypoint[], required — The list of starting locations
    - `lat` number, double, required — The latitude of a point in the shape.
    - `lon` number, double, required — The longitude of a point in the shape.
    - `search_cutoff` integer — The cutoff (in meters) at which we will assume the input is too far away from civilisation to be worth correlating to the nearest graph elements. The default is 35 km.
    - `date_time` string — Optional departure time for this specific waypoint in `YYYY-MM-DDTHH:MM` format. On matrix requests, per-waypoint date_time drives time-dependent routing behavior (e.g., accounting for traffic conditions at different times for different origins). Cannot be combined with a root-level `date_time`.
  - `targets` MatrixWaypoint[], required — The list of ending locations
    - `lat` number, double, required — The latitude of a point in the shape.
    - `lon` number, double, required — The longitude of a point in the shape.
    - `search_cutoff` integer — The cutoff (in meters) at which we will assume the input is too far away from civilisation to be worth correlating to the nearest graph elements. The default is 35 km.
    - `date_time` string — Optional departure time for this specific waypoint in `YYYY-MM-DDTHH:MM` format. On matrix requests, per-waypoint date_time drives time-dependent routing behavior (e.g., accounting for traffic conditions at different times for different origins). Cannot be combined with a root-level `date_time`.
  - `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.
  - `matrix_locations` integer — Only applicable to one-to-many or many-to-one requests. This defaults to all locations. When specified explicitly, this option allows a partial result to be returned. This is basically equivalent to "find the closest/best locations out of the full set." This can have a dramatic improvement for large requests.
  - `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.

## Response `200`

A matrix of times and distances between the start and end points.

- MatrixResponse
  - `id` string — An identifier to disambiguate requests (echoed by the server).
  - `sources` Coordinate[], required — The list of starting locations determined by snapping to the nearest appropriate point on the road network for the routing profile. All locations appear in the same order as the input.
    - `lat` number, double, required — The latitude of a point in the shape.
    - `lon` number, double, required — The longitude of a point in the shape.
  - `targets` Coordinate[], required — The list of ending locations determined by snapping to the nearest appropriate point on the road network for the routing profile. All locations appear in the same order as the input.
    - `lat` number, double, required — The latitude of a point in the shape.
    - `lon` number, double, required — The longitude of a point in the shape.
  - `sources_to_targets` array[], required — The matrix of starting and ending locations, along with the computed distance and travel time. The array is row-ordered. This means that the time and distance from the first location to all others forms the first row of the array, followed by the time and distance from the second source location to all target locations, etc.
    - MatrixDistance[]
      - `distance` number, double, nullable, required — The distance (in `units`) between the location in `sources` at `from_index` and the location in `targets` at `to_index`. This value may be 0 in the case that the source and destination are the same, and `null` if no route was found between the locations.
      - `time` integer, nullable, required — The travel time (in seconds) between the location in `sources` at `from_index` and the location in `targets` at `to_index`. This value may be 0 in the case that the source and destination are the same, and `null` if no route was found between the locations.
      - `from_index` integer, required — The index of the start location in the `sources` array.
      - `to_index` integer, required — The index of the end location in the `targets` array.
  - `warnings` Warning[]
    - `text` string
    - `code` integer
  - `units` 'miles' | 'kilometers', required

## Other responses

- `400` — Bad request; more details will be included. NOTE: failure to find suitable edges near a location will result in a 400.

---

[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/revisions/99e0701a73aa/schema)
