Skip to main content
POST
/
api
/
osm
/
geocode
/
reverse
/osm/geocode/reverse
curl --request POST \
  --url https://api.anysite.io/api/osm/geocode/reverse \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "lat": 0,
  "lon": 0,
  "timeout": 300,
  "zoom": 9,
  "layer": [],
  "address_details": true,
  "extra_tags": true,
  "name_details": true,
  "polygon_geojson": false,
  "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
lat
number
required

Latitude

Required range: -90 <= x <= 90
Example:

48.8584

lon
number
required

Longitude

Required range: -180 <= x <= 180
Example:

2.2945

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
zoom
integer | null

Address detail level, 0 (country) to 18 (building)

Required range: 0 <= x <= 18
layer
enum<string>[] | null

Restrict result to one or more data layers

Available options:
address,
poi,
railway,
natural,
manmade
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

polygon_geojson
boolean
default:false

Include the object geometry as a GeoJSON object

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