Geocoding (Reverse)

Attempt to match a latitude, longitude pair to an address.

Request GET parameters

  • lat
    float
    Latitude of the point to reverse geocode
  • lng
    float
    Longitude of the point to reverse geocode
  • within.country
    ISO 3166-1 alpha-2 or alpha-3 | optional
    Only return the results that are within the specified country. Useful when performing reverse geocoding requests near a border.

Response Body Json Attributes

The returned response is in GeoJSON format (check example below). Note that coordinates elements are longitude, latitude, in that order. The properties object contains the following attributes:

  • name
    string
    A short description of the location, varies depending on what is returned
  • label
    string
    Detailed label of the result, intended to be returned to the end user
  • score
    float | optional
    Result confidence score, maximum value is 1
  • house_number
    string | optional
  • street
    string | optional
  • region
    string | optional
  • region_code
    string | optional
  • neighbourhood
    string | optional
  • county
    string | optional
  • macroregion
    string | optional
  • city
    string | optional
  • country
    string | optional
  • country_code
    ISO 3166-1 alpha-3 | optional
  • continent
    string | optional
  • postcode
    string | optional
  • features
    object | optional
    Travel Time Platform features that are supported for searches from this point. If the object is missing, it means that Travel Time Platform searches from this point are not supported
    • public_transport
      object | optional
      Public transport support information. Public transport is not supported if this object is missing.
      • date_start
        date in extended ISO-8601 format
      • date_end
        date in extended ISO-8601 format
    • fares
      boolean
      Indicates whether or not we have fare data
    • postcodes
      boolean
      Indicates whether or not postcode searches are supported

Example Request

GET /v4/geocoding/reverse?lat=51.507281&lng=-0.132120 HTTP/1.1
Host: api.traveltimeapp.com
Accept: application/json
X-Application-Id: ...
X-Api-Key: ...

Response Body

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.132198,
                    51.50746
                ]
            },
            "properties": {
                "name": "8 Pall Mall",
                "label": "8 Pall Mall, London, England, United Kingdom",
                "score": 0.8,
                "house_number": "8",
                "street": "Pall Mall",
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "postcode": "SW1Y 5NG",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.132198,
                    51.50746
                ]
            },
            "properties": {
                "name": "The Balcon",
                "label": "The Balcon, London, England, United Kingdom",
                "score": 0.8,
                "house_number": "8",
                "street": "Pall Mall",
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "postcode": "SW1Y 5NG",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.132061,
                    51.507519
                ]
            },
            "properties": {
                "name": "Wafers N Papers",
                "label": "Wafers N Papers, London, England, United Kingdom",
                "score": 0.8,
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.132364,
                    51.507198
                ]
            },
            "properties": {
                "name": "Waterloo Place",
                "label": "Waterloo Place, London, England, United Kingdom",
                "score": 0.8,
                "street": "Waterloo Place",
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.132144,
                    51.507549
                ]
            },
            "properties": {
                "name": "Old London Gallery",
                "label": "Old London Gallery, London, England, United Kingdom",
                "score": 0.8,
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.132398,
                    51.507206
                ]
            },
            "properties": {
                "name": "Pall Mall Corporate Hospitality Ltd.",
                "label": "Pall Mall Corporate Hospitality Ltd., London, England, United Kingdom",
                "score": 0.8,
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.131975,
                    51.507533
                ]
            },
            "properties": {
                "name": "Royal Opera Arcade Gallery",
                "label": "Royal Opera Arcade Gallery, London, England, United Kingdom",
                "score": 0.8,
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.132034,
                    51.507612
                ]
            },
            "properties": {
                "name": "Stephen Wiltshire Gallery",
                "label": "Stephen Wiltshire Gallery, London, England, United Kingdom",
                "score": 0.8,
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.132456,
                    51.507187
                ]
            },
            "properties": {
                "name": "The Hub Initiative",
                "label": "The Hub Initiative, London, England, United Kingdom",
                "score": 0.8,
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -0.132456,
                    51.507187
                ]
            },
            "properties": {
                "name": "Institute of Directors",
                "label": "Institute of Directors, London, England, United Kingdom",
                "score": 0.8,
                "neighbourhood": "St. James's",
                "macroregion": "England",
                "city": "London",
                "country": "United Kingdom",
                "country_code": "GBR",
                "continent": "Europe",
                "features": {
                    "public_transport": {
                        "date_start": "2018-02-27T02:00:00+02:00",
                        "date_end": "2018-05-02T02:00:00+03:00"
                    },
                    "fares": true,
                    "postcodes": true
                }
            }
        }
    ]
}