Road Map
Road Map · Actions GPT
GraphHopper Routing API
Free routing API based on OpenStreetMap. Requires free API key from https://graphhopper.com/
GET /routeGet directions between coordinatesCalculates a route between locations using car, bike, or foot profile.
Schéma original API
{
"openapi": "3.1.0",
"info": {
"title": "GraphHopper Routing API",
"description": "Free routing API based on OpenStreetMap. Requires free API key from https://graphhopper.com/\n",
"version": "1.0.0"
},
"servers": [
{
"url": "https://graphhopper.com/api/1",
"description": "GraphHopper API server"
}
],
"paths": {
"/route": {
"get": {
"operationId": "getGraphhopperRoute",
"summary": "Get directions between coordinates",
"description": "Calculates a route between locations using car, bike, or foot profile.\n",
"parameters": [
{
"name": "point",
"in": "query",
"required": true,
"description": "Repeated parameter of lat,lon points (at least two)",
"schema": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"37.7749,-122.4194",
"37.8044,-122.2712"
]
},
"style": "form",
"explode": true
},
{
"name": "profile",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"car",
"bike",
"foot"
],
"default": "car"
}
},
{
"name": "locale",
"in": "query",
"required": false,
"schema": {
"type": "string",
"default": "en"
}
},
{
"name": "calc_points",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": true
}
},
{
"name": "key",
"in": "query",
"required": true,
"description": "Your GraphHopper API key",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful route",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {
"type": "object",
"properties": {
"distance": {
"type": "number",
"description": "Distance in meters"
},
"time": {
"type": "number",
"description": "Time in milliseconds"
},
"points": {
"type": "object",
"description": "Encoded polyline geometry"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid input"
},
"403": {
"description": "Invalid API key or usage limit exceeded"
}
}
}
}
}
}