Search Along Route API

Introduction

The Search Along Route API is a powerful tool designed to help users find points of interest (POIs) conveniently located near a predetermined travel path. Here is how it works:

  1. Define the Route: Begin by providing a series of location coordinates. These coordinates act as waypoints, outlining the specific trajectory the route should follow.
  2. POI Identification: The API identifies POIs that match your search query and fall within a specified proximity to the original route, determined by the max_detour_time parameter.
  3. Detour Time & Distance Calculations: The service will return the relevant information about the returned POIs - detour time and distance incurred from original route along with POI’s location, access points, opening hours etc. In case, a faster alternative route exists between two points on the original path, the API will return negative detour time values.
  4. Flexible Sorting of Results: Users can sort the matching POIs along the route in a way that best suits their needs.

With these features, the Search Along Route API offers a versatile solution for a wide range of applications requiring efficient POI discovery along a given route. This service is particularly useful for:

  • Navigation applications: Helping users find relevant stops without significant deviations.
  • Travel planning: Optimizing journeys by identifying convenient POIs.
  • Logistical operations: Streamlining routes by incorporating necessary stops.
POST

https://api.nextbillion.io/orbis/alongroute?key={your_api_key}

Request Parameters

Loading..

Request Body

Loading..

Request Parameters

Loading..

Example

Let’s look at the following sample which requests “Gas Stations” to be found along a given route, reachable within 10 mins (600 secs).

Sample API Request

1
curl --location 'https://api.nextbillion.io/orbis/alongroute?key=<your_api_key>' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"route": {
5
"points": "34.04932289,-118.25573833|34.04711381,-118.24976846|34.04153727,-118.2310818|34.03881998,-118.20756901"
6
},
7
"max_detour_time": 600,
8
"q": "Gas Station"
9
}'

Sample API Response

1
{
2
"items": [...]
3
}

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 invalidThis 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 resourcesYou 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 foundThis error occurs when a malformed hostname is used.
422Could not process the requestValid results could not be generated for the given parameters. Please modify the constraints/search query.
429Too many requestsQPM 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.