Geocoding

Lookup Nominatim OSM ids

Looks up OpenStreetMap objects by the required osm_ids, a comma-separated list prefixed N (node), W (way) or R (relation), such as W34633854,N123. Each place has its display name, category and type, coordinates, bounding box, importance and address parts; addressdetails defaults to true, and extratags, namedetails and accept_language are optional. Malformed ids return 400; no match returns 404.

get/geocoding/lookup

Request

  • Base URL: https://api.crawlora.net/api/v1
  • URL: https://api.crawlora.net/api/v1/geocoding/lookup
  • Auth: API key in header x-api-key

Query parameters

osm_idsstring required

Comma-separated OSM ids such as W34633854,N123,R456

accept_languagestring

Preferred result language, forwarded to Nominatim

addressdetailsboolean

Include address details, defaults to true

extratagsboolean

Include OSM extra tags

namedetailsboolean

Include multilingual name details

Headers

x-api-keystring required

API key required

Response

OK

codeinteger
msgstring

Example response

{
  "code": 200,
  "data": {
    "query": "W34633854,N123",
    "results": [
      {
        "address": {
          "ISO3166-2-lvl4": "US-NY",
          "city": "New York",
          "country": "United States",
          "country_code": "us",
          "county": "New York County",
          "house_number": "350",
          "neighbourhood": "Koreatown",
          "office": "Empire State Building",
          "postcode": "10118",
          "road": "5th Avenue",
          "state": "New York",
          "suburb": "Manhattan"
        },
        "addresstype": "office",
        "boundingbox": [
          "40.7479255",
          "40.7489585",
          "-73.9865012",
          "-73.9848166"
        ],
        "category": "office",
        "display_name": "Empire State Building, 350, 5th Avenue, New York, United States",
        "importance": 0.5803438355141769,
        "lat": "40.7484421",
        "licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
        "lon": "-73.9856589",
        "name": "Empire State Building",
        "osm_id": 34633854,
        "osm_type": "way",
        "place_id": 358220252,
        "place_rank": 30,
        "type": "yes"
      }
    ]
  },
  "msg": "OK"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.