Teleport public APIs

Location Resource

A point-location identified by geographical coordinates

Properties

  • coordinates Coordinates(object) - Coordinates of the location in various coordinate schemes

Relations

  • location:nearest-cities resource: NearestCity - Nearest cities to the location
  • location:nearest-urban-areas resource: NearestUrbanArea - Nearest urban areas to the location

Example

{
    "_embedded": {
        "location:nearest-cities": [
            {
                "_links": {
                    "location:nearest-city": {
                        "href": "https://api.teleport.org/api/cities/geonameid:5391959/", 
                        "name": "San Francisco"
                    }
                }, 
                "distance_km": 0
            }
        ], 
        "location:nearest-urban-areas": [
            {
                "_links": {
                    "location:nearest-urban-area": {
                        "href": "https://api.teleport.org/api/urban_areas/slug:san-francisco-bay-area/", 
                        "name": "San Francisco Bay Area"
                    }
                }, 
                "distance_km": 0
            }
        ]
    }, 
    "_links": {
        "curies": [
            {
                "href": "https://developers.teleport.org/api/resources/Location/#!/relations/{rel}/", 
                "name": "location", 
                "templated": true
            }, 
            {
                "href": "https://developers.teleport.org/api/resources/City/#!/relations/{rel}/", 
                "name": "city", 
                "templated": true
            }, 
            {
                "href": "https://developers.teleport.org/api/resources/UrbanArea/#!/relations/{rel}/", 
                "name": "ua", 
                "templated": true
            }, 
            {
                "href": "https://developers.teleport.org/api/resources/Country/#!/relations/{rel}/", 
                "name": "country", 
                "templated": true
            }, 
            {
                "href": "https://developers.teleport.org/api/resources/Admin1Division/#!/relations/{rel}/", 
                "name": "a1", 
                "templated": true
            }, 
            {
                "href": "https://developers.teleport.org/api/resources/Timezone/#!/relations/{rel}/", 
                "name": "tz", 
                "templated": true
            }
        ], 
        "self": {
            "href": "https://api.teleport.org/api/locations/37.774930,-122.419420/"
        }
    }, 
    "coordinates": {
        "geohash": "", 
        "latlon": {
            "latitude": 37.77493, 
            "longitude": -122.41942
        }
    }
}