Locations search
Query and search locations using the same technology that powers our Location Finder technology
Search locations
Search locations using a geo-search query (City, State, Postal code) or using specific latitude and longitude coordinates.
Locations are sorted by distance from the searched location.
GET /_api/locations_search/
Basic examples
Search with geo query - search string
GET /_api/locations_search/?near_location=Seattle,%20WA
Search with geo postal code query
GET /_api/locations_search/?near_location=98121
Search with latitude/longitude coordinates
GET /_api/locations_search/?near_lat=39.8281&near_lon=-98.5795
Parameters
Name | Type | Description |
---|---|---|
| string | Geographic search query. Can take any input that could be passed to Google Geocoding including city, state, full address or postal code |
| float | Example: Used in combination with |
| float | Example: Used in combination with |
| integer | Number of locations to return |
| integer | Distance in |
| string |
|
| string | Matching to location assigned postal code territories Options:
- |
Response
Locations are returned within objects
. If no locations are matched, objects
will be an empty list.
For list of attributes returned for each location, see Location model
The response will also contain distance details for each location and distance context.
In the resulting response meta
we will add the latitude and longitude of the searched point for reference.
In each of the the resulting Location objects, we add distance
(in miles or km depending on distance_unit
).
Additional examples
See if a postal code is assigned to any location
Last updated