geocode

Translate coordinates to the closest address(es)/places/stops.

get/api/v1/reverse-geocode

Query parameters

placestring required

latitude, longitude in degrees

typeLocationType[]

Optional. Default is all types.

Only return results matching one of the given types. For example, this can be used to allow only ADDRESS and STOP results.

numResultsinteger

Optional. Number of results to return.

If omitted, 5 results are returned by default. Must be <= server config variable reverse_geocode_max_results.

Response

A list of guesses to resolve the coordinates to a location

type'ADDRESS' | 'PLACE' | 'STOP' required

location type

categorystring

Experimental. Type categories might be adjusted.

For OSM stop locations: the amenity type based on https://wiki.openstreetmap.org/wiki/OpenStreetMap_Carto/Symbols

namestring required

name of the location (transit stop / PoI / address)

idstring required

unique ID of the location

latnumber required

latitude

lonnumber required

longitude

levelnumber

level according to OpenStreetMap (at the moment only for public transport)

streetstring

street name

houseNumberstring

house number

countrystring

ISO3166-1 country code from OpenStreetMap

zipstring

zip code

tzstring

timezone name (e.g. "Europe/Berlin")

scorenumber required

score according to the internal scoring system (the scoring algorithm might change in the future)

modesMode[]

available transport modes for stops

importancenumber

importance of a stop, normalized from [0, 1]

Changes

Changed in 5 of the 52 revisions of this API.559

    • added the new HGV enum value to the items/modes/items/ response property for the response status 200

      response-property-enum-value-added

    • removed the enum value ADDRESS from the query request parameter type

      request-parameter-enum-value-removed

    • removed the enum value PLACE from the query request parameter type

      request-parameter-enum-value-removed

    • removed the enum value STOP from the query request parameter type

      request-parameter-enum-value-removed

    • for the query request parameter type, the type/format was changed from string/ to array/

      request-parameter-type-changed

    • added the new optional query request parameter numResults

      new-optional-request-parameter

    • added the new DEBUG_BUS_ROUTE enum value to the items/modes/items/ response property for the response status 200

      response-property-enum-value-added

    • added the new DEBUG_FERRY_ROUTE enum value to the items/modes/items/ response property for the response status 200

      response-property-enum-value-added

    • added the new DEBUG_RAILWAY_ROUTE enum value to the items/modes/items/ response property for the response status 200

      response-property-enum-value-added

  • b7bf68a0d6f3118See the full diff
    • the query request parameter type was restricted to a list of enum values

      request-parameter-became-enum

    • deleted the query request parameter numResults

      request-parameter-removed

    • added the new enum value ADDRESS to the query request parameter type

      request-parameter-enum-value-added

    • added the new enum value PLACE to the query request parameter type

      request-parameter-enum-value-added

    • added the new enum value STOP to the query request parameter type

      request-parameter-enum-value-added

    • for the query request parameter type, the type/format was generalized from array/ to string/

      request-parameter-type-generalized

    • removed the DEBUG_BUS_ROUTE enum value from the items/modes/items/ response property for the response status 200

      response-property-enum-value-removed

    • removed the DEBUG_FERRY_ROUTE enum value from the items/modes/items/ response property for the response status 200

      response-property-enum-value-removed

    • removed the DEBUG_RAILWAY_ROUTE enum value from the items/modes/items/ response property for the response status 200

      response-property-enum-value-removed

    • removed the HGV enum value from the items/modes/items/ response property for the response status 200

      response-property-enum-value-removed

    This revision also has 30 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog