Valhalla · Example Payload

Sources To Targets

Example /sources_to_targets request computing a bicycle time-distance matrix between two origins and two destinations in San Francisco.

RoutingNavigationOpenStreetMapMappingGeospatialDirectionsIsochronesTravelTransportationOpen-Source

Sources To Targets is an example object payload from Valhalla, with 3 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

descriptionrequestresponse_summary

Example Payload

Raw ↑
{
  "description": "Example /sources_to_targets request computing a bicycle time-distance matrix between two origins and two destinations in San Francisco.",
  "request": {
    "sources": [
      { "lat": 37.7749, "lon": -122.4194, "name": "San Francisco City Hall" },
      { "lat": 37.7955, "lon": -122.3937, "name": "Ferry Building" }
    ],
    "targets": [
      { "lat": 37.8199, "lon": -122.4783, "name": "Golden Gate Bridge" },
      { "lat": 37.7694, "lon": -122.4862, "name": "Golden Gate Park" }
    ],
    "costing": "bicycle",
    "units": "km"
  },
  "response_summary": {
    "sources_to_targets": [
      [
        {
          "from_index": 0,
          "to_index": 0,
          "time": 2580,
          "distance": 9.7,
          "date_time": "current"
        },
        {
          "from_index": 0,
          "to_index": 1,
          "time": 2100,
          "distance": 7.8,
          "date_time": "current"
        }
      ],
      [
        {
          "from_index": 1,
          "to_index": 0,
          "time": 2340,
          "distance": 8.9,
          "date_time": "current"
        },
        {
          "from_index": 1,
          "to_index": 1,
          "time": 2760,
          "distance": 10.5,
          "date_time": "current"
        }
      ]
    ],
    "units": "km"
  }
}

Work with this as data

Every example 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 examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example 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 example
curl "https://apis.io/api/v1/examples/sources-to-targets"
All examples
curl "https://apis.io/api/v1/examples?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.