OpenRouteService · Schema

OpenRouteService Matrix Request

Request body schema for the OpenRouteService Matrix API endpoint

RoutingGeospatialDirectionsIsochronesMatrixGeocodingElevationOptimizationOpenStreetMapNavigationLogisticsHumanitarian

Properties

Name Type Description
locations array Coordinates as [longitude, latitude] pairs. Used as both sources and destinations unless specified. Maximum 3,500 in standard plan.
sources array Indices into locations array to use as origins. If omitted, all locations are used as sources.
destinations array Indices into locations array to use as destinations. If omitted, all locations are used as destinations.
metrics array Metrics to compute for the matrix
resolve_locations boolean Return nearest road network location information for each coordinate
units string Distance units (only used when distance metric is requested)
id string Arbitrary identifier echoed back in the response
View JSON Schema on GitHub

JSON Schema

openrouteservice-matrix-request.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/openrouteservice/main/json-schema/openrouteservice-matrix-request.json",
  "title": "OpenRouteService Matrix Request",
  "description": "Request body schema for the OpenRouteService Matrix API endpoint",
  "type": "object",
  "required": ["locations"],
  "properties": {
    "locations": {
      "type": "array",
      "description": "Coordinates as [longitude, latitude] pairs. Used as both sources and destinations unless specified. Maximum 3,500 in standard plan.",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        },
        "minItems": 2,
        "maxItems": 2
      },
      "examples": [
        [
          [8.681495, 49.41461],
          [8.686507, 49.41943],
          [8.687872, 49.420318]
        ]
      ]
    },
    "sources": {
      "type": "array",
      "description": "Indices into locations array to use as origins. If omitted, all locations are used as sources.",
      "items": {
        "type": "integer",
        "minimum": 0
      }
    },
    "destinations": {
      "type": "array",
      "description": "Indices into locations array to use as destinations. If omitted, all locations are used as destinations.",
      "items": {
        "type": "integer",
        "minimum": 0
      }
    },
    "metrics": {
      "type": "array",
      "description": "Metrics to compute for the matrix",
      "items": {
        "type": "string",
        "enum": ["duration", "distance"]
      },
      "default": ["duration"],
      "minItems": 1
    },
    "resolve_locations": {
      "type": "boolean",
      "description": "Return nearest road network location information for each coordinate",
      "default": false
    },
    "units": {
      "type": "string",
      "description": "Distance units (only used when distance metric is requested)",
      "enum": ["m", "km", "mi"],
      "default": "m"
    },
    "id": {
      "type": "string",
      "description": "Arbitrary identifier echoed back in the response"
    }
  }
}

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/openrouteservice-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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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