Browse API

Introduction

This API provides search results for places based on different filters, such as categories or name, ranked by distance from a given search center. The only mandatory elements exposed in the response are id and position. The other elements shown in the response samples section are only dataset attribute suggestions.

Request Parameters

Loading..

Response Schema

Loading..

Examples

Let’s browse for “market” in San Francisco area.

Sample API Request

1
curl --location 'https://api.nextbillion.io/browse?categories=market&limit=2&in=countryCode:USA,MEX&at=37.78182,-122.45291&key=<your_api_key>'

Sample API Response

1
{{
2
"items": [
3
{
4
"title": "Whole Foods Mkt",
5
"id": "FrPIlYtjFL_GkJym9qtx0A",
6
"address": {
7
"label": "Whole Foods Mkt, 69 Stanyan Street, San Francisco, CA 94118, United States",
8
"countryCode": "USA",
9
"countryName": "United States",
10
"stateCode": "CA",
11
"state": "California",
12
"county": "San Francisco",
13
"city": "San Francisco",
14
"street": "Stanyan Street",
15
"postalCode": "94118",
16
"houseNumber": "69"
17
},
18
"scoring": {
19
"queryScore": 1
20
},
21
"position": {
22
"lat": 37.780383,
23
"lng": -122.456272
24
},
25
"access": [
26
{
27
"lat": 37.7801,
28
"lng": -122.45596
29
}
30
],
31
"distance": 335,
32
"mapView": {
33
"west": -122.45741,
34
"south": 37.77948,
35
"east": -122.45513,
36
"north": 37.78128
37
},
38
"categories": [
39
{
40
"id": "7332005",
41
"name": "market, supermarkets hypermarkets",
42
"primary": true
43
}
44
],
45
"contacts": [
46
{
47
"phone": [
48
{
49
"value": "+1 415-876-6740"
50
}
51
]
52
}
53
]
54
},
55
{
56
"title": "Trader Joe's",
57
"id": "s4WyLPIdyuC8j5BBl4znKA",
58
"address": {
59
"label": "Trader Joe's, 3 Masonic Avenue, San Francisco, CA 94118, United States",
60
"countryCode": "USA",
61
"countryName": "United States",
62
"stateCode": "CA",
63
"state": "California",
64
"county": "San Francisco",
65
"city": "San Francisco",
66
"street": "Masonic Avenue",
67
"postalCode": "94118",
68
"houseNumber": "3"
69
},
70
"scoring": {
71
"queryScore": 1
72
},
73
"position": {
74
"lat": 37.783337,
75
"lng": -122.44775
76
},
77
"access": [
78
{
79
"lat": 37.7834,
80
"lng": -122.44724
81
}
82
],
83
"distance": 483,
84
"mapView": {
85
"west": -122.44889,
86
"south": 37.78244,
87
"east": -122.44661,
88
"north": 37.78424
89
},
90
"categories": [
91
{
92
"id": "7332005",
93
"name": "market, supermarkets hypermarkets",
94
"primary": true
95
}
96
],
97
"contacts": [
98
{
99
"phone": [
100
{
101
"value": "+1 415-346-9964"
102
}
103
],
104
"www": [
105
{
106
"value": "www.traderjoes.com/"
107
}
108
]
109
}
110
]
111
}
112
]
113
}
114

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
200

Normal success case.

Normal success case

400

Input validation failed.

There is a missing or an invalid parameter or a parameter with an invalid value type is added to the request.

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 a malformed hostname is used.

422

Could not process the request.

Valid results could not be generated for the given parameters. Please modify the constraints/search query.

429

Too many requests.

QPM 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.

© 2024 NextBillion.ai all rights reserved.