Navigator
Navigator · GPT-Aktionen
Geocoding API
API for geocoding and reverse geocoding services.
GET /api/1/routeroutecalculate a navigation route forgiven geocoded points
GET /api/1/geocodeGeocoding and Reverse GeocodingTransforms textual addresses to coordinates and vice versa.
Ursprüngliches API-Schema
{
"openapi": "3.0.0",
"info": {
"title": "Geocoding API",
"version": "1.0.0",
"description": "API for geocoding and reverse geocoding services."
},
"servers": [
{
"url": "https://graphhopper.com"
}
],
"paths": {
"/api/1/route": {
"get": {
"summary": "route",
"operationId": "route",
"description": "calculate a navigation route forgiven geocoded points",
"parameters": [
{
"name": "point",
"in": "query",
"description": "The points for which the route should be calculated. Format: latitude,longitude. Specify at least an origin and a destination. Via points are possible. The maximum number depends on your plan.",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "latitude,longitude"
},
"style": "form"
}
},
{
"name": "key",
"in": "query",
"description": "Textual address for forward geocoding.",
"required": true,
"default": "ffa8d702-d26b-4616-be47-1579e575578c",
"schema": {
"type": "string"
}
}
]
}
},
"/api/1/geocode": {
"get": {
"summary": "Geocoding and Reverse Geocoding",
"operationId": "geocode",
"description": "Transforms textual addresses to coordinates and vice versa.",
"parameters": [
{
"name": "q",
"in": "query",
"description": "Textual address for forward geocoding. Required unless reverse geocode'ing",
"schema": {
"type": "string"
}
},
{
"name": "key",
"in": "query",
"description": "Secret API key. NEVER reveal or share with anyone! Not even the admin.",
"required": true,
"default": "ffa8d702-d26b-4616-be47-1579e575578c",
"schema": {
"type": "string"
}
},
{
"name": "locale",
"in": "query",
"description": "Locale for search results (e.g., 'en', 'fr', 'de').",
"required": false,
"schema": {
"type": "string",
"default": "en"
}
},
{
"name": "limit",
"in": "query",
"description": "Maximum number of results to return.",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 8
}
},
{
"name": "reverse",
"in": "query",
"description": "Set to true for reverse geocoding.",
"required": false,
"schema": {
"type": "boolean",
"default": false
}
},
{
"name": "debug",
"in": "query",
"description": "If true, the output will be formatted.",
"required": false,
"schema": {
"type": "boolean",
"default": false
}
},
{
"name": "point",
"in": "query",
"description": "Location bias or location for reverse geocoding in 'lat,lon' format.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "provider",
"in": "query",
"description": "Geocoding provider. Can be 'default', 'nominatim', 'gisgraphy', 'nettoolkit', 'opencagedata'.",
"required": false,
"schema": {
"type": "string",
"default": "default"
}
},
{
"name": "osm_tag",
"in": "query",
"description": "Filter or exclude places with certain OpenStreetMap tags. Use key:value format for filtering (e.g., osm_tag=tourism:museum) or !key:value to exclude. For multiple tags, add multiple osm_tag parameters.",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "radius",
"in": "query",
"description": "The search radius in km for the reverse search. This requires reverse=true.",
"required": false,
"default": 30,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"coordinates": {
"type": "array",
"items": {
"type": "number"
}
},
"address": {
"type": "string"
}
}
}
}
}
}
},
"security": [
{
"api_key": [
"ffa8d702-d26b-4616-be47-1579e575578c"
]
}
]
}
}
},
"components": {
"schemas": {}
}
}