• Optimization
  • Navigation
  • Tracking
  • Maps
  • Places

Autosuggest API

Introduction

This endpoint suggests address or place candidates based on an incomplete or misspelled query, from which the user selects the best query to submit.

The Autosuggest API provides comprehensive responses to free-form user queries by returning suggestions for:

  1. unknown places from a category or chain, such as "hospitals".

  2. unknown places at known locations, such as "London museums".

  3. known places with known names, such as "Times Square" or "Paris".

  4. known and unknown places for partial queries, such as "hosp", "London muse", "Times S" or "Par"

NOTE: The response may contain experimental elements not documented here. Any undocumented element is subject to removal at any time.

Request Parameters

Loading..

Response Schema

Loading..

Examples

Let’s search for a mis-spelled query looking for “aquariums” in the Boston city region.

Sample API Request

1curl --location 'https://api.nextbillion.io/autosuggest?at=42.350133,-71.068900&key=<your_api_key>&limit=5&q=aqauriums'

Sample API Response

1{
2 "items": [
3 {
4 "title": "Aquarium Station",
5 "id": "47_E4Ni11pElGqRAU6PTcQ",
6 "address": {
7 "label": "Aquarium Station, 183 State Street, Boston, MA 02109, United States",
8 "countryCode": "USA",
9 "countryName": "United States",
10 "stateCode": "MA",
11 "state": "Massachusetts",
12 "county": "Suffolk",
13 "city": "Boston",
14 "street": "State Street",
15 "postalCode": "02109-2600",
16 "houseNumber": "183"
17 },
18 "scoring": {

API Query Limits

Nextbillion.ai allows a maximum rate limit of 2400 queries per minute or 40 queries/second for continuous requests.

API Error Codes

Response CodeDescriptionAdditional Notes
200Normal success case.
Normal success case
400Input validation failed.
There is a missing or an invalid parameter or a parameter with an invalid value type is added to the request.
401APIKEY not supplied or invalid.
This error occurs when the wrong API key is passed in the request or the key is missing altogether
403APIKEY is valid but does not have access to requested resources.
You might be querying for a geographical region which is not valid for your account, or requesting a service which is not enabled for you.
404Requested host/path not found.
This error occurs when a malformed hostname is used.
422Could not process the request.
Valid results could not be generated for the given parameters. Please modify the constraints/search query.
429Too many requests.
QPM or API request count quota reached
500Internal Service error.
There was an internal issue with NextBillion.ai services. You can reach out to [email protected] for an explanation.