Locations
Location Keys
A locationKey
is a unique identifier to represent a specific geographic location. It is required for most API endpoints including:
How to Retrieve a locationKey
To get a locationKey
, use one of the Location Search endpoints. Below are some examples:
Use Case | Endpoint |
---|---|
City name search | /locations/v1/cities/search |
Postal code search | /locations/v1/postalcodes/search |
Points of Interest search | /locations/v1/poi/search |
Cities by latitude/longitude | /locations/v1/cities/geoposition/search |
IP-based auto-detect | /locations/v1/cities/ipaddress |
Example
Code
Response:
Code(json)
➡️ 347629
is the locationKey
for San Francisco, CA, US.
How to Use the locationKey
Once retrieved, use the key in other API endpoints:
Example
Code
This returns the current conditions for San Francisco, CA.
Last modified on