/sources_to_targets

Time-distance matrix

post/sources_to_targets

Request body

idstring

Arbitrary request identifier echoed in the response.

format'json' | 'gpx' | 'osrm' | 'pbf' | 'geotiff' | 'mvt'

Not all formats are supported by all endpoints, e.g. geotiff is isochrone-only.

units'km' | 'miles' | 'mi'
languagestring

BCP47 locale for narrative output. See locales/ for supported values.

costing'auto' | 'bicycle' | 'pedestrian' | 'truck' | 'bus' | 'taxi' | 'motor_scooter' | 'motorcycle' | 'multimodal' | 'bikeshare' | 'auto_pedestrian' required
matrix_locationsinteger

Early-exit after finding this many targets. Only valid for TDMatrix algorithm.

verboseboolean

Include detailed per-cell metadata in the response.

shape_format'polyline6' | 'polyline5' | 'geojson' | 'no_shape'

Not all formats are supported by all endpoints, e.g. no_shape is not valid for isochrone.

expansion_max_distanceinteger

Maximum path distance in meters for an expansion. Currently this is implemented for the timedistancematrix algorithm. Source-target pairs whose cheapest path distance exceeds this limit will be returned as unreachable (with null time and distance).

Example request

{
  "format": "json",
  "costing": "auto",
  "costing_options": {
    "multimodal": {
      "filters": {
        "operators": {
          "action": "exclude",
          "ids": [
            "NYC_AUR"
          ]
        },
        "routes": {
          "action": "exclude",
          "ids": [
            "NYC_AUR"
          ]
        }
      }
    },
    "transit": {
      "filters": {
        "operators": {
          "action": "exclude",
          "ids": [
            "NYC_AUR"
          ]
        },
        "routes": {
          "action": "exclude",
          "ids": [
            "NYC_AUR"
          ]
        }
      }
    }
  },
  "exclude_locations": [
    {
      "type": "break",
      "preferred_side": "opposite",
      "street_side_cutoff": "primary",
      "search_filter": {
        "min_road_class": "primary",
        "max_road_class": "primary"
      }
    }
  ],
  "sources": [
    {
      "type": "break",
      "preferred_side": "opposite",
      "street_side_cutoff": "primary",
      "search_filter": {
        "min_road_class": "primary",
        "max_road_class": "primary"
      }
    }
  ],
  "targets": [
    {
      "type": "break",
      "preferred_side": "opposite",
      "street_side_cutoff": "primary",
      "search_filter": {
        "min_road_class": "primary",
        "max_road_class": "primary"
      }
    }
  ],
  "shape_format": "polyline6"
}

Response

Matrix result

Changes

Changed in 4 of the 6 revisions of this API.136

    • added the new optional request property allOf[BaseRequest]/costing_options/motor_scooter/allOf[subschema #2]/use_distance

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/motorcycle/allOf[subschema #2]/use_distance

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/truck/allOf[subschema #2]/use_distance

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/alley_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/bss_rent_cost

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/bss_rent_penalty

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/driveway_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/elevator_penalty

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/max_distance

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/max_hiking_difficulty

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/mode_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/multimodal_start_end_max_distance

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/sidewalk_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/step_penalty

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/transit_transfer_max_distance

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/use_hills

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/use_lit

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/walking_speed

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/bikeshare/allOf[subschema #2]/walkway_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/alley_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/bss_rent_cost

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/bss_rent_penalty

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/driveway_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/elevator_penalty

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/max_distance

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/max_hiking_difficulty

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/mode_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/multimodal_start_end_max_distance

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/sidewalk_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/step_penalty

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/transit_transfer_max_distance

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/use_hills

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/use_lit

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/walking_speed

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/pedestrian/allOf[subschema #2]/walkway_factor

      new-optional-request-property

    • added the new optional request property allOf[BaseRequest]/costing_options/truck/allOf[subschema #2]/low_class_factor

      new-optional-request-property

    • removed the request property allOf[BaseRequest]/costing_options/truck/allOf[subschema #2]/low_class_factor

      request-property-removed