The base URL is
https://api.radar.io. Send your API key in the Authorization header. All four operations accept a publishable key, so you can call them from a client. For key types, the error format, and rate limits, see Authentication, errors, and rate limits.
Search operations return one page of results, capped by limit. They don’t return a cursor. To see more results, raise limit up to the documented maximum or narrow the search with filters.
For address validation, see Validate an address.
Autocomplete
Autocompletes partial addresses and place names, sorted by relevance and proximity.- Endpoint:
GET /v1/search/autocomplete - Authentication: Publishable key
- Rate limit: 100 requests per second
- Used by: Autocomplete, geocode, and validate addresses, Build store locators
Query parameters
For full address completion in the United States and Canada, such as a checkout form, send
layers=address and countryCode=US,CA.
Generate one sessionToken when the user focuses the address field, and reuse it for every keystroke request from that field until the user selects a result. Wait for a short pause in typing before you send each request so you don’t issue one request per keystroke.
Response
A200 response contains meta and addresses, an array of address objects. Autocomplete results also include:
Example
This request autocompletes a place name near a location, with a session token.Errors
A
400 response looks like this:
Autocomplete select
Reports which autocomplete result the user chose. Radar uses selections to measure and improve autocomplete quality.- Endpoint:
POST /v1/search/autocomplete/select - Authentication: Publishable key
- Rate limit: Subject to your project’s overall API rate limit
- Used by: Autocomplete, geocode, and validate addresses
Body parameters
Response
Treat both
200 and 204 as success. Don’t block the user’s form on this call.
Example
This request reports the result the user chose.Errors
A
400 response looks like this:
Search geofences
Searches for geofences in your project near a location, sorted by distance.- Endpoint:
GET /v1/search/geofences - Authentication: Publishable key
- Rate limit: 50 requests per second
- Used by: Build store locators
near. To rank or label results by travel distance or ETA, pass the results to Matrix.
Query parameters
To retrieve more than 100 results, set
includeGeometry=false. With geometries included, Radar caps limit at 100.
Response
A200 response contains meta and geofences, an array of geofence objects. Search results carry the fields you need to list and display a location. The full geofence object is defined in the Geofences API.
If Radar adjusts your request, for example by capping
limit or raising radius, the response is still 200, and meta.message can describe the adjustment with meta.level set to warning.
Example
This request searches within 1000 meters of a location for up to 10 geofences that have the tagstore and offers set to true, without geometries.
Errors
A
400 response looks like this:
Search places
Searches for places near a location, sorted by distance. Places are public points of interest such as chain stores, restaurants, and airports.- Endpoint:
GET /v1/search/places - Authentication: Publishable key
- Rate limit: 50 requests per second
- Used by: Build store locators, Detect geofence events and place visits
Query parameters
Send at least one ofchains, categories, or iataCode. If you send none of them, Radar uses the place filters configured for your project, and returns 400 if the project has none.
Response
A200 response contains meta and places, an array of place objects:
Example
This request searches within 1000 meters of a location for up to 10 places in one chain.Errors
A
400 response looks like this: