v1

latestOpenAPI 3.1.02026-08-0420183200.9 KB
Geocoding

Retrieve detailed information about a place by its GID.

Many search result components include an associated GID field (for example, an address may have a localadmin_gid). The place endpoint lets you look up these places directly by ID. Note that GIDs are not stable for all sources. See the online documentation for details.

get/geocoding/v2/place_details

Query parameters

idsDocumentGid[] required
[
  "whosonfirst:locality:102026327"
]
langstring

A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.

Response

A GeoJSON FeatureCollection with the results

bboxnumber[] nullable

The geographic bounding box covering all features in the result set.

This is empty for autocomplete results.

typestring required

The GeoJSON object type as defined in RFC 7946.

NOTE: This is always FeatureCollection, as the response envelope is designed to hold multiple results.

Example response

{
  "features": [
    {
      "properties": {
        "coarse_location": "Seoul, South Korea",
        "context": {
          "whosonfirst": {
            "borough": {
              "gid": "whosonfirst:locality:102026327"
            },
            "continent": {
              "gid": "whosonfirst:locality:102026327"
            },
            "country": {
              "gid": "whosonfirst:locality:102026327"
            },
            "county": {
              "gid": "whosonfirst:locality:102026327"
            },
            "dependency": {
              "gid": "whosonfirst:locality:102026327"
            },
            "localadmin": {
              "gid": "whosonfirst:locality:102026327"
            },
            "locality": {
              "gid": "whosonfirst:locality:102026327"
            },
            "macrocounty": {
              "gid": "whosonfirst:locality:102026327"
            },
            "macroregion": {
              "gid": "whosonfirst:locality:102026327"
            },
            "marinearea": {
              "gid": "whosonfirst:locality:102026327"
            },
            "neighbourhood": {
              "gid": "whosonfirst:locality:102026327"
            },
            "ocean": {
              "gid": "whosonfirst:locality:102026327"
            },
            "region": {
              "gid": "whosonfirst:locality:102026327"
            }
          }
        },
        "gid": "whosonfirst:locality:102026327",
        "layer": "address",
        "name": "Hit Coffee Roasters",
        "sources": [
          {
            "source": "whosonfirst",
            "source_id": "85633135"
          }
        ]
      }
    }
  ]
}