Valhalla · Schema

MatrixRequest

Request body for the Valhalla /sources_to_targets endpoint. Computes time and distance matrices between sets of origins and destinations.

RoutingNavigationOpenStreetMapMappingGeospatialDirectionsIsochronesTravelTransportationOpen-Source

Properties

Name Type Description
sources array Origin locations.
targets array Destination locations.
costing string Travel mode costing model.
costing_options object Per-costing-model fine-tuning options.
id string Arbitrary request identifier echoed in the response.
units string
verbose boolean Include detailed per-cell metadata in the response.
matrix_locations integer Early-exit after finding this many targets (TDMatrix only).
expansion_max_distance integer Maximum path distance in meters. Source-target pairs exceeding this are returned as unreachable.
date_time object
View JSON Schema on GitHub

JSON Schema

matrix-request.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/valhalla/main/json-schema/matrix-request.json",
  "title": "MatrixRequest",
  "description": "Request body for the Valhalla /sources_to_targets endpoint. Computes time and distance matrices between sets of origins and destinations.",
  "type": "object",
  "required": ["sources", "targets", "costing"],
  "properties": {
    "sources": {
      "type": "array",
      "minItems": 1,
      "description": "Origin locations.",
      "items": { "$ref": "location.json" }
    },
    "targets": {
      "type": "array",
      "minItems": 1,
      "description": "Destination locations.",
      "items": { "$ref": "location.json" }
    },
    "costing": {
      "type": "string",
      "enum": ["auto", "bicycle", "pedestrian", "truck", "bus", "taxi", "motor_scooter", "motorcycle", "multimodal", "bikeshare", "auto_pedestrian"],
      "description": "Travel mode costing model."
    },
    "costing_options": {
      "type": "object",
      "description": "Per-costing-model fine-tuning options."
    },
    "id": {
      "type": "string",
      "description": "Arbitrary request identifier echoed in the response."
    },
    "units": {
      "type": "string",
      "enum": ["km", "miles", "mi"],
      "default": "km"
    },
    "verbose": {
      "type": "boolean",
      "default": true,
      "description": "Include detailed per-cell metadata in the response."
    },
    "matrix_locations": {
      "type": "integer",
      "minimum": 1,
      "description": "Early-exit after finding this many targets (TDMatrix only)."
    },
    "expansion_max_distance": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000,
      "default": 0,
      "description": "Maximum path distance in meters. Source-target pairs exceeding this are returned as unreachable."
    },
    "date_time": {
      "type": "object",
      "properties": {
        "type": {
          "type": "integer",
          "enum": [0, 1, 2, 3]
        },
        "value": {
          "type": "string"
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/matrix-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.