Geocoding

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"
get/location/geo

Query parameters

latnumber double required

WGS 84 geodetic grid line, north to south.

Example:45.524098
lonnumber double required

WGS 84 geodetic grid line, east to west.

Example:-122.688408

Headers

x-custom-device-idstring

User-defined device ID, used to identify requests when using a cloud-to-cloud integration. Ignored if using a device token.

Example:my-device-12345

Response

Returns address data for a set of WGS 84 coordinates.

latnumber double required

WGS 84 geodetic grid line, north to south.

lonnumber double required

WGS 84 geodetic grid line, east to west.

uncertaintynumber double required

Radius of the uncertainty circle around the location in meters. Also known as Horizontal Positioning Error (HPE).

formattedstring required

Description of the address, created from values in the 'address' property

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"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.