APIHub
Back to Explore

BC Route Planner REST API

The BC Route Planner REST API provides routing and distance calculations on British Columbia’s public road network, offering endpoints to retrieve directions, travel distance and time for a sequence of points, compute pairwise distance matrices, and generate an optimally ordered route, with configurable output formats, units, spatial reference systems, and routing criteria such as shortest or fastest.

Open Data
apiKeyHeader
HTTPS
CORS: Unknown
Description enriched
Visit official documentation

Latency

413ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
GET

/directions.{outputFormat}

Get the directions, path, distance and travel time between a series of geographic points

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start/end point.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/directions.{outputFormat}

Get the directions, path, distance and travel time between a series of geographic points

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start/end point.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
GET

/distance.{outputFormat}

Get distance and travel time between two geographic points

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/distance.{outputFormat}

Get distance and travel time between two geographic points

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
GET

/distance/betweenPairs.{outputFormat}

Get distance and travel time between each pair of geographic points

  • outputFormat (path, required) — Format of representation
  • fromPoints (query, required) — A comma-separated list of origin points. See fromPoints
  • toPoints (query, required) — A comma-separated list of destination points. See toPoints
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
  • maxPairs (query) — The maximum number of pairs to return for each toPoint. Pairs are ordered by distance/time from fromPoint. For example, given 1 fromPoint, and 10 toPoints, and maxPairs=1 , return the nearest toPoint to the fromPoint. Given 3 fromPoints and 10 toPoints, maxPairs=3 means return the 3 nearest toPoints to each fromPoint.
POST

/distance/betweenPairs.{outputFormat}

Get distance and travel time between each pair of geographic points

  • outputFormat (path, required) — Format of representation
  • fromPoints (query, required) — A comma-separated list of origin points. See fromPoints
  • toPoints (query, required) — A comma-separated list of destination points. See toPoints
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
  • maxPairs (query) — The maximum number of pairs to return for each toPoint. Pairs are ordered by distance/time from fromPoint. For example, given 1 fromPoint, and 10 toPoints, and maxPairs=1 , return the nearest toPoint to the fromPoint. Given 3 fromPoints and 10 toPoints, maxPairs=3 means return the 3 nearest toPoints to each fromPoint.
GET

/optimalDirections.{outputFormat}

Get the directions, optimal path, distance and travel time between a start point and a series of end points which are reordered to minimize total distance or time.

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/optimalDirections.{outputFormat}

Get the directions, optimal path, distance and travel time between a start point and one or more end points which are reordered to minimize total distance or time.

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
GET

/optimalRoute.{outputFormat}

Get the optimal path, distance and travel time between a start point and a series of end points which are reordered to minimize total distance or time.

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/optimalRoute.{outputFormat}

Get the path, distance and travel time between a start point and a series of end points which are reordered to minimize total distance or time.

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
GET

/route.{outputFormat}

Get the path, distance and travel time between a series of geographic points

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start/end point.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/route.{outputFormat}

Get the path, distance and travel time between a series of geographic points

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start/end point.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
GET

/truck/directions.{outputFormat}

Get the directions, path, distance and travel time between a series of geographic points for a commercial vehicle

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start/end point.Default is false.
  • truckRouteMultiplier (query) — The truck route multiplier value is used to multiply the cost of using roads that are not truck routes.
  • partition (query) — A comma-separated list of values to identify sections of the route that correspond to truck route sections and non-truck route sections, ferry sections and non-ferry sections, and locality names. The response includes a partitions attribute, which is an array of objects, each of which has an index (into the route coordinate array) and a value for each of the attributes requested in the partition parameter. Any or all of the following values can be used. Partition values: isTruckRoute – Distinguish between truck route sections and non-truck route sections isFerry – Distinguish between ferry sections and non-ferry sections locality – Include the locality name for the route partition
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/truck/directions.{outputFormat}

Get the directions, path, distance and travel time between a series of geographic points

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start/end point.Default is false.
  • truckRouteMultiplier (query) — The truck route multiplier value is used to multiply the cost of using roads that are not truck routes.
  • partition (query) — A comma-separated list of values to identify sections of the route that correspond to truck route sections and non-truck route sections, ferry sections and non-ferry sections, and locality names. The response includes a partitions attribute, which is an array of objects, each of which has an index (into the route coordinate array) and a value for each of the attributes requested in the partition parameter. Any or all of the following values can be used. Partition values: isTruckRoute – Distinguish between truck route sections and non-truck route sections isFerry – Distinguish between ferry sections and non-ferry sections locality – Include the locality name for the route partition
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
GET

/truck/distance.{outputFormat}

Get distance and travel time between two geographic points for a commercial vehicle

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • truckRouteMultiplier (query) — The truck route multiplier value is used to multiply the cost of using roads that are not truck routes.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/truck/distance.{outputFormat}

Get distance and travel time between two geographic points

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
GET

/truck/distance/betweenPairs.{outputFormat}

Get distance and travel time between each pair of geographic points for a commercial vehicle

  • outputFormat (path, required) — Format of representation
  • fromPoints (query, required) — A comma-separated list of origin points. See fromPoints
  • toPoints (query, required) — A comma-separated list of destination points. See toPoints
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
  • maxPairs (query) — The maximum number of pairs to return for each toPoint. Pairs are ordered by distance/time from fromPoint. For example, given 1 fromPoint, and 10 toPoints, and maxPairs=1 , return the nearest toPoint to the fromPoint. Given 3 fromPoints and 10 toPoints, maxPairs=3 means return the 3 nearest toPoints to each fromPoint.
POST

/truck/distance/betweenPairs.{outputFormat}

Get distance and travel time between each pair of geographic points

  • outputFormat (path, required) — Format of representation
  • fromPoints (query, required) — A comma-separated list of origin points. See fromPoints
  • toPoints (query, required) — A comma-separated list of destination points. See toPoints
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
  • maxPairs (query) — The maximum number of pairs to return for each toPoint. Pairs are ordered by distance/time from fromPoint. For example, given 1 fromPoint, and 10 toPoints, and maxPairs=1 , return the nearest toPoint to the fromPoint. Given 3 fromPoints and 10 toPoints, maxPairs=3 means return the 3 nearest toPoints to each fromPoint.
GET

/truck/optimalDirections.{outputFormat}

Get the directions, optimal path, distance and travel time between a start point and a series of end points which are reordered to minimize total distance or time for a commercial vehicle

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • truckRouteMultiplier (query) — The truck route multiplier value is used to multiply the cost of using roads that are not truck routes.
  • partition (query) — A comma-separated list of values to identify sections of the route that correspond to truck route sections and non-truck route sections, ferry sections and non-ferry sections, and locality names. The response includes a partitions attribute, which is an array of objects, each of which has an index (into the route coordinate array) and a value for each of the attributes requested in the partition parameter. Any or all of the following values can be used. Partition values: isTruckRoute – Distinguish between truck route sections and non-truck route sections isFerry – Distinguish between ferry sections and non-ferry sections locality – Include the locality name for the route partition
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/truck/optimalDirections.{outputFormat}

Get the directions, optimal path, distance and travel time between a start point and one or more end points which are reordered to minimize total distance or time.

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • truckRouteMultiplier (query) — The truck route multiplier value is used to multiply the cost of using roads that are not truck routes.
  • partition (query) — A comma-separated list of values to identify sections of the route that correspond to truck route sections and non-truck route sections, ferry sections and non-ferry sections, and locality names. The response includes a partitions attribute, which is an array of objects, each of which has an index (into the route coordinate array) and a value for each of the attributes requested in the partition parameter. Any or all of the following values can be used. Partition values: isTruckRoute – Distinguish between truck route sections and non-truck route sections isFerry – Distinguish between ferry sections and non-ferry sections locality – Include the locality name for the route partition
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
GET

/truck/optimalRoute.{outputFormat}

Get the optimal path, distance and travel time between a start point and a series of end points which are reordered to minimize total distance or time for a commercial vehicle

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • truckRouteMultiplier (query) — The truck route multiplier value is used to multiply the cost of using roads that are not truck routes.
  • partition (query) — A comma-separated list of values to identify sections of the route that correspond to truck route sections and non-truck route sections, ferry sections and non-ferry sections, and locality names. The response includes a partitions attribute, which is an array of objects, each of which has an index (into the route coordinate array) and a value for each of the attributes requested in the partition parameter. Any or all of the following values can be used. Partition values: isTruckRoute – Distinguish between truck route sections and non-truck route sections isFerry – Distinguish between ferry sections and non-ferry sections locality – Include the locality name for the route partition
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/truck/optimalRoute.{outputFormat}

Get the path, distance and travel time between a start point and a series of end points which are reordered to minimize total distance or time.

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start and end points.Default is false.
  • truckRouteMultiplier (query) — The truck route multiplier value is used to multiply the cost of using roads that are not truck routes.
  • partition (query) — A comma-separated list of values to identify sections of the route that correspond to truck route sections and non-truck route sections, ferry sections and non-ferry sections, and locality names. The response includes a partitions attribute, which is an array of objects, each of which has an index (into the route coordinate array) and a value for each of the attributes requested in the partition parameter. Any or all of the following values can be used. Partition values: isTruckRoute – Distinguish between truck route sections and non-truck route sections isFerry – Distinguish between ferry sections and non-ferry sections locality – Include the locality name for the route partition
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
GET

/truck/route.{outputFormat}

Get the path, distance and travel time between a series of geographic points for a commercial vehicle

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start/end point.Default is false.
  • truckRouteMultiplier (query) — The truck route multiplier value is used to multiply the cost of using roads that are not truck routes.
  • partition (query) — A comma-separated list of values to identify sections of the route that correspond to truck route sections and non-truck route sections, ferry sections and non-ferry sections, and locality names. The response includes a partitions attribute, which is an array of objects, each of which has an index (into the route coordinate array) and a value for each of the attributes requested in the partition parameter. Any or all of the following values can be used. Partition values: isTruckRoute – Distinguish between truck route sections and non-truck route sections isFerry – Distinguish between ferry sections and non-ferry sections locality – Include the locality name for the route partition
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)
POST

/truck/route.{outputFormat}

Get the path, distance and travel time between a series of geographic points

  • outputFormat (path, required) — Format of representation
  • points (query, required) — A list of any number of route points in start to end order. See points
  • outputSRS (query) — The EPSG code of the spatial reference system (SRS) to use for output geometries. See outputSRS
  • criteria (query) — Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.
  • distanceUnit (query) — distance unit of measure (e.g., km, mi). Default is km.
  • roundTrip (query) — If true, route ends at start point. Default is false.
  • departure (query) — departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00); Ignored if time-dependency modules are disabled
  • correctSide (query) — If true, route starts and ends on same side of road as start/end point.Default is false.
  • truckRouteMultiplier (query) — The truck route multiplier value is used to multiply the cost of using roads that are not truck routes.
  • partition (query) — A comma-separated list of values to identify sections of the route that correspond to truck route sections and non-truck route sections, ferry sections and non-ferry sections, and locality names. The response includes a partitions attribute, which is an array of objects, each of which has an index (into the route coordinate array) and a value for each of the attributes requested in the partition parameter. Any or all of the following values can be used. Partition values: isTruckRoute – Distinguish between truck route sections and non-truck route sections isFerry – Distinguish between ferry sections and non-ferry sections locality – Include the locality name for the route partition
  • disable (query) — A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td). Module names include: sc – ferry schedules; disabled by default; disabled by default and only suitable for demos tf – historic traffic congestion; disabled by default and only suitable for demos ev – road events; disabled by default and only suitable for demos td – time-dependency; disabling this disables sc, tf, and ev modules tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored tc - turn costs (e.g., left turns take longer than right turns)
  • routeDescription (query) — Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)

24 endpoints auto-detected

Authentication

This API uses an API key, passed in the "apikey" header. No OAuth required.

curl -X GET \
  "https://router.api.gov.bc.ca/directions.{outputFormat}" \
  -H "apikey: YOUR_API_KEY"

router.api.gov.bc.ca · HTTPS only