Direction API
A comprehensive driving directions service that provides accurate, real-time navigation to ensure a seamless travel experience..
The Directions API enables users to find the optimal route between two locations, providing essential information such as travel time, distance, traffic conditions, and detailed turn-by-turn instructions.
Use Cases
Fastest Route Finder
Discover the quickest route to your destination while avoiding traffic jams and road closures.
Navigation Integration
Incorporate navigation features into your app or website to provide directions, maps, and estimated travel times.
Delivery Route Optimization
Find the shortest or most efficient routes for delivering goods or services to multiple locations.
Interactive Experiences
Create engaging applications using directions and maps for games, quizzes, and tours.
Traffic Data Access
Utilize real-time and historical traffic data for research, planning, or forecasting purposes.
Usage
Parameter
| Parameter | Type | Description | Required |
|---|---|---|---|
origin | string | Specifies the latitude and longitude of the origin location in the format lat,lon. | yes |
destination | string | Specifies the latitude and longitude of the destination location in the format lat,lon. | yes |
apiKey | string | Your API key for accessing Gebeta Maps. | yes |
waypoints | string[] | An optional array of latitude and longitude pairs (formatted as "lat,lon") separated by semicolons, indicating intermediate locations to visit en route. | no |
Response Codes for Directions API
| Status Code | Message | Description |
|---|---|---|
200 | OK | The request was successful. The system found a valid route and returned the requested data. |
404 | NoRoute | No route exists between the specified locations. Confirm that the locations are accessible by route. |
401 | Not Authorized - No Token | Authentication failed. No valid token was provided. Please include a valid authentication token. |
401 | Not Authorized - Invalid Token | The authentication token provided is either invalid or expired. Use a current, valid token. |
422 | InvalidInput | The request parameters are incorrect. Review the input values and adjust as needed. |
Directions API - CURL Request
To get directions from one location to another using the Directions API, you can use the following curl command:
Example
API Limits and Restrictions**
The Geocoding API has a rate limit of 50 requests per second per API token. Exceeding this limit will result in an error and rejected requests. To manage this, consider:
- Throttling your requests.
- Using multiple tokens for different applications or users.