GET /v1/location/context

HTTP Method: GET

Path: /v1/location/context

Authentication: API Key required

Description: Given a location id or a lat/long pair,  a location resolution and a radius, obtain a list of locations of the same resolution within the given radius.

Parameters:

parameter type description Required Example
location_id string a Central Index location_id
no GBN33RD
latitude float A latitude
no 53.678
longitude float A longitude no -1.567
radius integer Radius in kilometres yes 20
resolution collection One or more (comma-separated) of "district", "neighbourhood", "town", "region", "county", "province" yes
country string Two-letter ISO-3166 country code yes GB

Sample Response:

{
  "success": true,
  "msg": "ok",
  "data": [
    {
      "_id": "GB41713",
      "_rev": "3-1171c981fefbdac1d82e04aa842a2564",
      "name": "East Finchley",
      "formal_name": "East Finchley,London",
      "latitude": 51.589500427246094,
      "longitude": -0.17018400132656097,
      "resolution": "district",
      "country": "gb",
      "population": 0,
      "description": "",
      "timezone": "Europe/London",
      "parent_town": [
        "GB14648"
      ],
      "parent_county": [
        "GB14648"
      ],
      "parent_province": [
        "GB41673"
      ],
      "parent_neighbourhood": [
        "GB12335,GB12513,GB12328"
      ],
      "parent_region": [
        "GB13660,GB13666"
      ],
      "parent_district": [],
      "postalcode": [],
      "language": "en",
      "type": "postal"
    },
    {
      "_id": "GB41717",
      "_rev": "3-d74d81258a1d01387706da6c8079ad48",
      "name": "Finchley",
      "formal_name": "Finchley,London",
      "latitude": 51.60139846801758,
      "longitude": -0.19174399971961975,
      "resolution": "district",
      "country": "gb",
      "population": 0,
      "description": "",
      "timezone": "Europe/London",
      "parent_town": [
        "GB14648"
      ],
      "parent_county": [
        "GB14648"
      ],
      "parent_province": [
        "GB41673"
      ],
      "parent_neighbourhood": [
        "GB12328,GB12513,GB12319,GB12332,GB12517,GB12520"
      ],
      "parent_region": [
        "GB13660,GB13666"
      ],
      "parent_district": [],
      "postalcode": [],
      "language": "en",
      "type": "postal"
    }
  ]
}

Docs Navigation