1. Geocoding
GraphHopper Directions API
  • Routing
    • Calculate a route
      GET
    • Calculate a route
      POST
  • Isochrones
    • Compute an isochrone
      GET
  • Matrices
    • Compute a matrix
      POST
    • Compute a matrix
      GET
    • Submit a matrix computation job
      POST
    • Retrieve result of a matrix computation job
      GET
  • Map Matching
    • Map-match a GPX file
      POST
  • Geocoding
    • Geocoding Endpoint
      GET
  • Route Optimization
    • Solve a route optimization problem
      POST
    • Submit a route optimization job
      POST
    • Retrieve solution of a route optimization job
      GET
  • Clustering
    • Solve a clustering problem
      POST
    • Submit a clustering job
      POST
    • Retrieve solution of a clustering job
      GET
  • Custom Profiles
    • Create a custom routing profile
      POST
    • List your custom routing profiles
      GET
    • Submit a profile creation job
      POST
    • Retrieve result of a profile creation job
      GET
    • Delete a custom routing profile
      DELETE
  • 数据模型
    • Schemas
      • ClusterResponse
      • Cluster
      • ClusterRequest
      • ClusterConfiguration
      • Clusters
      • ClusterCustomer
      • ClusterCustomerAddress
      • ClusterConfigurationRouting
      • ClusterConfigurationClustering
      • GeocodingResponse
      • GeocodingLocation
      • GeocodingPoint
      • MatrixRequest
      • SymmetricalMatrixRequest
      • MatrixResponse
      • RouteRequest
      • CustomModel
      • CustomModelForProfile
      • ProfileRequest
      • ProfileResponse
      • ProfileGetResponse
      • RouteResponse
      • EncodedLineString
      • BBox
      • FeatureCollection
      • RouteResponsePath
      • ResponseInfo
      • IsochroneResponse
      • IsochroneResponsePolygon
      • LineString
      • Polygon
      • GHError
      • JobId
      • BadRequest
      • ErrorMessage
      • InternalErrorMessage
      • Request
      • Vehicle
      • VehicleProfileId
      • Shift
      • Algorithm
      • Address
      • ResponseAddress
      • SnappedWaypoint
      • DriveTimeBreak
      • TimeWindowBreak
      • VehicleType
      • Service
      • Shipment
      • Pickup
      • Stop
      • TimeWindow
      • PreferredVehicle
      • Configuration
      • Optimization
      • Routing
      • Objective
      • CostMatrix
      • GroupRelation
      • JobRelation
      • Response
      • Solution
      • Detail
      • Route
      • RoutePoint
      • Activity
  1. Geocoding

Geocoding Endpoint

GET
/geocode

请求参数

Authorization
API Key
在 query 添加参数
key
示例:
key: ********************
or
Query 参数

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/geocode?q=undefined&locale=undefined&limit=undefined&reverse=undefined&debug=undefined&point=undefined&provider=undefined&key=%3Capi-key%3E'

返回响应

🟢200成功
application/json
An array found locations
Headers

Bodyapplication/json

示例
{
    "hits": [
        {
            "osm_id": 240109189,
            "osm_type": "N",
            "country": "Deutschland",
            "osm_key": "place",
            "city": "Berlin",
            "osm_value": "city",
            "postcode": "10117",
            "name": "Berlin",
            "point": {
                "lng": 13.3888599,
                "lat": 52.5170365
            }
        },
        {
            "osm_id": 62422,
            "osm_type": "R",
            "extent": [
                13.088345,
                52.6755087,
                13.7611609,
                52.33826
            ],
            "country": "Deutschland",
            "osm_key": "place",
            "osm_value": "city",
            "name": "Berlin",
            "point": {
                "lng": 13.4385964,
                "lat": 52.5198535
            }
        },
        {
            "osm_id": 120456814,
            "osm_type": "W",
            "extent": [
                13.3906703,
                52.5200704,
                13.3948873,
                52.5175007
            ],
            "country": "Deutschland",
            "osm_key": "amenity",
            "city": "Berlin",
            "street": "Dorotheenstraße",
            "osm_value": "university",
            "postcode": "10117",
            "name": "Humboldt-Universität zu Berlin",
            "point": {
                "lng": 13.393560493637775,
                "lat": 52.51875685
            }
        },
        {
            "osm_id": 6647,
            "osm_type": "R",
            "extent": [
                13.3924346,
                52.5191829,
                13.3948768,
                52.517526
            ],
            "country": "Deutschland",
            "osm_key": "building",
            "housenumber": "6",
            "city": "Berlin",
            "street": "Unter den Linden",
            "osm_value": "yes",
            "postcode": "10117",
            "name": "Humboldt-Universität zu Berlin",
            "point": {
                "lng": 13.392908021752554,
                "lat": 52.51840935
            }
        },
        {
            "osm_id": 38862723,
            "osm_type": "W",
            "extent": [
                13.2364563,
                52.5161915,
                13.2433375,
                52.5129557
            ],
            "country": "Deutschland",
            "osm_key": "leisure",
            "housenumber": "3",
            "city": "Berlin",
            "street": "Olympischer Platz",
            "osm_value": "stadium",
            "postcode": "14053",
            "name": "Olympiastadion Berlin",
            "point": {
                "lng": 13.239776301622072,
                "lat": 52.5147077
            }
        },
        {
            "osm_id": 583306346,
            "osm_type": "W",
            "extent": [
                13.3739245,
                52.528547,
                13.3818019,
                52.5229778
            ],
            "country": "Deutschland",
            "osm_key": "amenity",
            "city": "Berlin",
            "street": "Hufelandweg",
            "osm_value": "hospital",
            "postcode": "10117",
            "name": "Charité Universitätsmedizin Berlin",
            "point": {
                "lng": 13.377739577932736,
                "lat": 52.52585125
            }
        },
        {
            "osm_id": 180594,
            "osm_type": "R",
            "extent": [
                13.3906159,
                52.5190301,
                13.3923847,
                52.5174089
            ],
            "country": "Deutschland",
            "osm_key": "amenity",
            "housenumber": "8",
            "city": "Berlin",
            "street": "Unter den Linden",
            "osm_value": "library",
            "postcode": "10117",
            "name": "Staatsbibliothek zu Berlin",
            "point": {
                "lng": 13.391516532100738,
                "lat": 52.5182233
            }
        },
        {
            "osm_id": 3856100103,
            "osm_type": "N",
            "country": "Deutschland",
            "osm_key": "railway",
            "city": "Berlin",
            "street": "Washingtonplatz",
            "osm_value": "station",
            "postcode": "10557",
            "name": "Berlin Hauptbahnhof",
            "point": {
                "lng": 13.3696614,
                "lat": 52.5249451
            }
        },
        {
            "osm_id": 1078631331,
            "osm_type": "N",
            "country": "Deutschland",
            "osm_key": "historic",
            "city": "Berlin",
            "street": "Gertrud-Kolmar-Straße",
            "osm_value": "battlefield",
            "postcode": "10117",
            "name": "Schlacht um Berlin",
            "point": {
                "lng": 13.3814231,
                "lat": 52.5127537
            }
        },
        {
            "osm_id": 1154556,
            "osm_type": "R",
            "extent": [
                13.3807495,
                52.5083344,
                13.3822459,
                52.5074359
            ],
            "country": "Deutschland",
            "osm_key": "office",
            "housenumber": "5",
            "city": "Berlin",
            "street": "Niederkirchnerstraße",
            "osm_value": "government",
            "postcode": "10117",
            "name": "Abgeordnetenhaus von Berlin",
            "point": {
                "lng": 13.381504320489928,
                "lat": 52.50786655
            }
        }
    ],
    "took": 37
}
修改于 2025-11-25 06:18:54
上一页
Map-match a GPX file
下一页
Solve a route optimization problem
Built with