# Openrouteservice distance and time matrix

Travel durations (seconds) and distances between many origins and destinations at once on OpenStreetMap data: rows are sources, columns destinations. Needs locations.

Travel durations (seconds) and distances between many origins and destinations at once on OpenStreetMap data: rows are sources, columns destinations. Pass up to 50 locations; sources and destinations are index lists into them (default: every location). Use for delivery planning, nearest-store ranking and territory design. Standard plan: 500 requests a day, 40 a minute.

- Tool ID: `openrouteservice/matrix`
- Name in the catalog: openrouteservice distance and time matrix
- Provider: [openrouteservice](/providers/openrouteservice.md)
- Capability: [Knowledge & research](/tools/knowledge.md)
- Price: no charge per call
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

No charge per call. A workspace is still needed so your agent can call it.


```json
{
  "model": "per_call",
  "amountUsd": 0
}
```

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "profile": {
      "type": "string",
      "enum": [
        "driving-car",
        "driving-hgv",
        "cycling-regular",
        "cycling-road",
        "cycling-mountain",
        "cycling-electric",
        "foot-walking",
        "foot-hiking",
        "wheelchair"
      ],
      "default": "driving-car",
      "description": "Travel mode, e.g. 'driving-hgv'"
    },
    "locations": {
      "type": "array",
      "minItems": 2,
      "maxItems": 50,
      "items": {
        "type": "array",
        "minItems": 2,
        "maxItems": 2,
        "items": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        "description": "[longitude, latitude] in that order, e.g. [2.3522, 48.8566]"
      },
      "description": "Points, each [longitude, latitude], e.g. [[2.3522, 48.8566], [4.8357, 45.764], [5.3698, 43.2965]]"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 49
      },
      "maxItems": 50,
      "description": "Indexes of locations used as origins, e.g. [0]"
    },
    "destinations": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 49
      },
      "maxItems": 50,
      "description": "Indexes of locations used as destinations, e.g. [1, 2]"
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "duration",
          "distance"
        ]
      },
      "uniqueItems": true,
      "minItems": 1,
      "maxItems": 2,
      "default": [
        "duration",
        "distance"
      ],
      "description": "Figures to compute, e.g. ['duration']"
    },
    "units": {
      "type": "string",
      "enum": [
        "km",
        "m",
        "mi"
      ],
      "default": "km",
      "description": "Distance units, e.g. 'mi'"
    }
  },
  "required": [
    "locations"
  ],
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "openrouteservice/matrix",
  "input": {
    "locations": [
      [
        2.3522,
        48.8566
      ],
      [
        4.8357,
        45.764
      ],
      [
        5.3698,
        43.2965
      ]
    ]
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

Licence: openrouteservice results CC BY-SA 4.0; OpenStreetMap data ODbL.

Attribution: © openrouteservice.org by HeiGIT | Map data © OpenStreetMap contributors.

[Provider documentation](https://giscience.github.io/openrouteservice/api-reference/endpoints/matrix/)

[REST inspection](https://api.agentik.cc/v1/tools/openrouteservice/matrix) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/openrouteservice/matrix) · [Agent index](/llms.txt)
