Open documentation ↗Overview
A-to-B routing with turn-by-turn instructions
GraphHopper is a transportation API from graphhopper.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 16 endpoints.
At a glance
- Authentication
- API key
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Transportation
- Base URL
https://graphhopper.com/api/1- Version
- 1.0.0
- Endpoints
- 16
- OpenAPI
- Specification ↗
- Spec updated
- 2021-07-19
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://graphhopper.com/api/1/geocode" \
-H "Accept: application/json" \
-H "X-API-Key: YOUR_API_KEY"const response = await fetch("https://graphhopper.com/api/1/geocode", {
method: "GET",
headers: {
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://graphhopper.com/api/1/geocode",
headers={
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /cluster | POST Cluster Endpoint |
| POST | /cluster/calculate | Batch Cluster Endpoint |
| GET | /cluster/solution/{jobId} | GET Batch Solution Endpoint |
| GET | /geocode | Geocoding Endpoint |
| GET | /isochrone | Isochrone Endpoint |
| POST | /match | Map-match a GPX file |
| GET | /matrix | GET Matrix Endpoint |
| POST | /matrix | POST Matrix Endpoint |
| POST | /matrix/calculate | Batch Matrix Endpoint |
| GET | /matrix/solution/{jobId} | GET Batch Matrix Endpoint |
| GET | /route | GET Route Endpoint |
| POST | /route | POST Route Endpoint |
| GET | /route/info | Coverage information |
| POST | /vrp | POST route optimization problem |
| POST | /vrp/optimize | POST route optimization problem (batch mode) |
| GET | /vrp/solution/{jobId} | GET the solution (batch mode) |
Questions
Does the GraphHopper API need an API key?
Yes. The GraphHopper API uses API key authentication; the documentation explains how to get credentials.
Does the GraphHopper API support HTTPS?
Yes, the GraphHopper API is served over HTTPS.
How many endpoints does the GraphHopper API have?
Its OpenAPI description lists 16 endpoints in version 1.0.0. All of them are shown on this page.
What are alternatives to the GraphHopper API?
Other Transportation APIs include airportsapi, Transport for London, England, Uber, Transport for Spain, Amadeus for Developers.
Similar transportation APIs
Compare alternatives →airportsapi
TransportationGet name and website-URL for airports by ICAO code
Transport for London, England
TransportationDiscover TFL APIs
Uber
TransportationUber ride requests and price estimation
Transport for Spain
TransportationPublic trains of Spain
Amadeus for Developers
TransportationTravel Search - Limited usage
Boston MBTA Transit
TransportationStations and predicted arrivals for MBTA
Listed from public-apis (MIT), public-apis database (MIT), APIs.guru (CC0).