v1

latestOpenAPI 3.0.02026-07-241437122.4 KB
Lookup

Lookup

The lookup API allows querying the address and other details of one or multiple OSM objects, such as nodes, ways, or relations.

get/lookup

Query parameters

osm_idsstring required
Example:R146656,W104393803,N240109189

This must contain a comma-separated list of OSM ids each prefixed with its type, one of node(N), way(W) or relation(R). Up to 3 ids can be queried at the same time.

json_callbackstring

Wrap json output in a callback function (JSONP) i.e. <string>(<json>). Only has an effect for JSON output formats.

addressdetails0 | 1

Include a breakdown of the address of this result into elements. Important components include (but not limited to) country, postcode, state, county, city, town. Only those elements that are available for a given location will be returned.

extratags0 | 1

Include additional information in the result if available, e.g. wikipedia link, opening hours. Defaults to 0.

namedetails0 | 1

Include a list of alternative names in the results. These may include language variants, references, operator and brand. Defaults to 0.

accept-languagestring
Example:en

Preferred language order for showing search results, overrides the value specified in the Accept-Language HTTP header. Defaults to en.

To use native language for the response when available, use accept-language=native.

Either uses standard <a href="https://tools.ietf.org/html/rfc2616#section-14.4" target="_blank">rfc2616 accept-language string</a> or a simple comma separated list of language codes.

polygon_geojson0 | 1

Output geometry of results in geojson format. Defaults to 0.

polygon_kml0 | 1

Output geometry of results in kml format. Defaults to 0.

polygon_svg0 | 1

Output geometry of results in svg format. Defaults to 0.

polygon_text0 | 1

Output geometry of results as a WKT. Defaults to 0.

polygon_thresholdnumber
Example:0.2

When one of the polygon_* outputs is chosen, return a simplified version of the output geometry. The parameter describes the tolerance in degrees with which the geometry may differ from the original geometry. Topology is preserved in the geometry.

normalizeaddress0 | 1

Makes parsing of the address object easier by returning a predictable and defined list of elements. Defaults to 0 for backward compatibility. We recommend setting this to 1 for new projects.

Element NameDescription
nameHouse name or Point of Interest (POI) such as a Cafe or School
house_numberHouse or Building number
roadRoads, Highways, Freeways, Motorways
neighbourhoodNeighbourhoods, Allotments, Quarters, Communities
suburbSuburbs, Subdivisions
islandIslands, Islets
cityCities, Towns, Villages, Municipalities, Districts, Boroughs, Hamlets
countyCounties
stateStates, Provinces, Regions, State Districts
state_codeState or Province Code
postcodePostal Codes, Zipcodes
countryCountries, Nation-states
country_codeCountry Code - 2 letter (ISO 3166-1 alpha-2)
normalizecity0 | 1

For responses with no city value in the address section, the next available element in this order - city_district, locality, town, borough, municipality, village, hamlet, quarter, neighbourhood - from the address section will be normalized to city. Defaults to 0.

postaladdress0 | 1

Returns address inside the postaladdress key, that is specifically formatted for each country. Currently supported for addresses in Belgium, Brazil, France, Germany, Greece, India, Ireland, Italy, Portugal, South Africa, Spain and United Kingdom. Defaults to 0.

statecode0 | 1

Adds state or province code when available to the state_code key inside the address object when available. Defaults to 0.

formatstring

Output Format. Only json supported as of now.

Response

OK

place_idinteger

Unique identifier for the place.

licencestring

License information for the data.

osm_typestring

Type of OpenStreetMap object.

osm_idinteger

Unique identifier for the OpenStreetMap object.

boundingboxstring[]

List of bounding box coordinates [min_lat, max_lat, min_lon, max_lon].

latstring

Latitude of the location.

lonstring

Longitude of the location.

display_namestring

Formatted address for display.

classstring

Categorization of map features based on their nature.

typestring

It denotes the specific kind of feature within a class.

extratagsExtratags

The dictionary with additional useful tags like website or maxspeed. Returned when extratags=1 is set in the request.

Example response

{
  "address": {
    "house_number": "3894",
    "road": "Spring Mill Way",
    "residential": "Hunter’s Point",
    "village": "Landen",
    "city": "Landen",
    "county": "Warren County",
    "state": "Ohio",
    "postcode": "45039",
    "country": "United States of America",
    "country_code": "us",
    "state_code": "oh"
  }
}