Skip to main content
Use the Autocomplete API to autocomplete addresses and place names as a user types, and to find your geofences or public places near a location. 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.

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

A 200 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.
Radar returns this response:

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. If your project has address enrichment enabled, this operation also returns the enriched address.

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.
For a project with address enrichment enabled, Radar returns this response:

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
Distances in this search are straight-line distances from 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

A 200 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 tag store and offers set to true, without geometries.
Radar returns this response:

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.

Query parameters

Send at least one of chains, 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

A 200 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.
Radar returns this response:

Errors

A 400 response looks like this: