GetAddressDataFromCoordinates
<div class="nrf-note"> <p><b>Cloud-to-cloud — authorize with an Organization Auth Token.</b><br><code>https://api.location.nrfcloud.com/v1/organizations/{organizationSlug}/projects/{projectSlug}/location/geo</code></p> <p><b>Device-to-cloud — authorize with a JSON Web Token.</b><br><code>https://api.location.nrfcloud.com/v1/location/geo</code></p> </div>Convert a set of WGS 84 coordinates into a physical address. Only country and state/province/region are guaranteed. Higher accuracy properties (street number, street, etc) are provided when available.
A 404 status code (not found) will be returned if nRF Cloud cannot determine at least country and state/province/region for the provided coordinates.
nRF Cloud returns the address data closest to the submitted coordinates. Coordinates from a higher-density urban areas generally provide better results. Coordinates from rural areas may return address data further away from the submitted coordinates. The system returns an uncertainty property, which is the distance in meters away from the submitted coordinates.
Coordinates obtained with a high-accuracy method (GNSS / Wi-Fi) will provide address data closer to the actual device location than coordinates obtained with lower-accuracy methods like cellular.
curl --location --request GET "$API_HOST/v1/location/geo?lat=45.524098&lon=-122.688408" \
--header "Authorization: Bearer $JWT" \
--header "Content-Type: application/json"
Query parameters
WGS 84 geodetic grid line, north to south.
WGS 84 geodetic grid line, east to west.
Headers
User-defined device ID, used to identify requests when using a cloud-to-cloud integration. Ignored if using a device token.
Response
Returns address data for a set of WGS 84 coordinates.
Example response
{
"lat": 45.524098,
"lon": -122.688408,
"uncertainty": 300.5,
"address": {
"country": "United States of America",
"state": "Oregon",
"countryCode": "US",
"postalCode": "97123",
"stateCode": "OR",
"city": "Portland",
"street": "Main St.",
"streetNumber": "123"
}
}