API & MCP

Everything a person can do on Detour Budget Planner, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Detour Budget Planner

Enter start, destination and candidate stop coordinates. Estimate extra kilometres, minutes and cost from a published road circuity factor, or route on your own OpenStreetMap extract or GPX file. Nothing is sent to a routing service.

Inputs of Detour Budget Planner
FieldTypeDefaultDescription
startLatnumber48.89Start latitude
startLonnumber8.7Start longitude
endLatnumber48.78Destination latitude
endLonnumber9.18Destination longitude
modeselect (car, bike, foot)"car"Travel mode
circuityPresetselect (ballou-europe, boscoe-us, europe-long, custom)"ballou-europe"Road circuity factor (estimate)
circuitynumber1.3Your own circuity factor (used with “Your own factor”)
speednumber0Average speed in km/h (0 = 60 car, 15 bike, 5 on foot)
costPerKmnumber0.3Cost per extra kilometre (your currency)
budgetnumber45Extra time including visit (minutes)
departuretime"09:00"Departure time
maxStopsnumber1Maximum stops in suggested itinerary
stopstable[{"name":"Proposed break","lat":48.85,"lon":8.95,"stay":15},{"name":"Museum visiCandidate stops
networktextarea—Optional road network for precise distances: OSM XML, GeoJSON with OSM tags or GPX text

Example request

Try an example

curl -X POST https://hearthdetourbudget.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "hearth-detour-budget": { "type": "http", "url": "https://hearthdetourbudget.usefulweb.app/mcp" }
  }
}