Locations
Location keys
A location key is a unique identifier for a precise geographic location. Use one of the Locations API endpoints to find a location key. It is required for most API endpoints, including:
Find a location key
To get a location key, 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 |
Try a city search to get started:
Code
Response:
Code
➡️ 347629
is the location key for San Francisco, CA, US.
Use a location key
Use the location key we just found in other API endpoints:
Code
This returns the current conditions for San Francisco, CA.
Last modified on