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:
- Define the Route: Begin by providing a series of location coordinates. These coordinates act as waypoints, outlining the specific trajectory the route should follow.
- 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. - 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.
- 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
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
Sample API Response
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 code | Description | Additional 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. |