Skip to main content
POST
/
api
/
osm
/
geocode
/
lookup
/osm/geocode/lookup
curl --request POST \
  --url https://api.anysite.io/api/osm/geocode/lookup \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "osm_ids": "<string>",
  "timeout": 300,
  "address_details": true,
  "extra_tags": true,
  "name_details": true,
  "accept_language": "en"
}
'
[
  {
    "@type": "OsmPlace",
    "place_id": 123,
    "osm_type": "<string>",
    "osm_id": 123,
    "latitude": 123,
    "longitude": 123,
    "category": "<string>",
    "place_type": "<string>",
    "place_rank": 123,
    "importance": 123,
    "addresstype": "<string>",
    "name": "<string>",
    "display_name": "<string>",
    "address": {
      "@type": "OsmAddress",
      "house_number": "<string>",
      "road": "<string>",
      "quarter": "<string>",
      "neighbourhood": "<string>",
      "suburb": "<string>",
      "borough": "<string>",
      "city_district": "<string>",
      "city": "<string>",
      "municipality": "<string>",
      "county": "<string>",
      "state_district": "<string>",
      "state": "<string>",
      "region": "<string>",
      "postcode": "<string>",
      "country": "<string>",
      "country_code": "<string>",
      "iso3166_2": "<string>"
    },
    "extratags": {},
    "namedetails": {},
    "boundingbox": [],
    "geojson": {},
    "source_url": "<string>"
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
osm_ids
string
required

Comma-separated OSM ids, each prefixed by type N (node), W (way) or R (relation); up to 50

Minimum string length: 1
Examples:

"W34633854,N13306330095"

"R146656"

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
address_details
boolean
default:true

Include a structured address breakdown

extra_tags
boolean
default:true

Include additional OSM tags (website, phone, opening hours…)

name_details
boolean
default:true

Include the full set of name/label variants

accept_language
string | null

Preferred language(s) for names and labels

Example:

"en"

Response

Successful Response

@type
string
default:OsmPlace
place_id
integer | null
osm_type
string | null
osm_id
integer | null
latitude
number | null
longitude
number | null
category
string | null
place_type
string | null
place_rank
integer | null
importance
number | null
addresstype
string | null
name
string | null
display_name
string | null
address
object | null
extratags
object
namedetails
object
boundingbox
number[]
geojson
object | null
source_url
string | null