Autocomplete API
Introduction
BETA: This endpoint completes the few entered keystrokes to the valid street address or administrative area to speed-up entering the address queries.
Parameters
Loading...Response Schema
Loading...Query Limits
Nextbillion.ai allows a maximum rate limit of 6000 queries per minute or 100 queries/second for continuous requests.
Note: We can increase the quota if needed on request. Contact [email protected] for more details.
Examples
Sample API Request
1https://api.nextbillion.io/h/autocomplete?q=berl&key={{key}}
Sample API Response
1{
2 "items": [
3 {
4 "title": "string",
5 "id": "string",
6 "language": "string",
7 "politicalView": "string",
8 "resultType": "administrativeArea",
9 "houseNumberType": "PA",
10 "localityType": "postalCode",
11 "administrativeAreaType": "county",
12 "address": {
13 "label": "string",
14 "countryCode": "string",
15 "countryName": "string",
16 "stateCode": "string",
17 "state": "string",
18 "countyCode": "string",
19 "county": "string",
20 "city": "string",
21 "district": "string",
22 "subdistrict": "string",
23 "street": "string",
24 "block": "string",
25 "subblock": "string",
26 "postalCode": "string",
27 "houseNumber": "string",
28 "building": "string"
29 },
30 "distance": 172039,
31 "highlights": {
32 "title": [
33 {
34 "start": 0,
35 "end": 0
36 }
37 ]
38 },
39 "streetInfo": [
40 {
41 "baseName": "string",
42 "streetType": "string",
43 "streetTypePrecedes": true,
44 "streetTypeAttached": true,
45 "prefix": "string",
46 "suffix": "string",
47 "direction": "string",
48 "language": "string"
49 }
50 ]
51 }
52 ]
53}
API Error Codes
Response Code | Description | Additional Notes |
---|---|---|
200 | Normal success case. | Normal success case. |
400 | Input validation failed. | Such as missing parameter or parameter with invalid value type (for example value cannot be parsed into number). |
401 | APIKEY not supplied or invalid. | This error occurs when the wrong API key is passed in the request or the key is missing altogether |
403 | APIKEY 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. |
404 | Requested host/path not found. | This error occurs when there is a malformed host name used. |
422 | Could not process the request. | There is an underlying map issue which prevents the processing of the request. |
429 | Too many requests. | QPM reached or API request count quota reached. |
500 | Internal Service error. | There was an internal issue with NextBillion.ai services. You can reach out to [email protected] for an explanation. |