Gebeta Maps

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

Usage

curl https://mapapi.gebeta.app/api/route/direction/?origin={lat1,lon1}&destination={lat2,lat2}&waypoints=[{lat,lng}]&instruction=1&apiKey={apiKey}

Parameter

ParameterTypeDescriptionRequired
originstringSpecifies the latitude and longitude of the origin location in the format lat,lon.yes
destinationstringSpecifies the latitude and longitude of the destination location in the format lat,lon.yes
apiKeystringYour API key for accessing Gebeta Maps.yes
instructionstringA turn by turn instruction from the origin point to destnation. use value 1 to include instruction and 0 to ignore.no
waypointsstring[]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 CodeMessageDescription
200OKThe request was successful. The system found a valid route and returned the requested data.
404NoRouteNo route exists between the specified locations. Confirm that the locations are accessible by route.
401Not Authorized - No TokenAuthentication failed. No valid token was provided. Please include a valid authentication token.
401Not Authorized - Invalid TokenThe authentication token provided is either invalid or expired. Use a current, valid token.
422InvalidInputThe 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:

curl "curl https://mapapi.gebeta.app/api/route/direction/?origin={lat1,lon1}&destination={lat2,lat2}&waypoints=[{lat,lng}]&instruction=1&apiKey={apiKey}"

Example

fetch('https://mapapi.gebeta.app/api/route/direction/?origin={8.989022,38.79036}&destination={9.03045,38.76530}&apiKey=your-api-key')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

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.

Pricing

Gebeta Maps Geocoding API pricing is based on usage:

Request VolumeCost per 1,000 Requests
First 100,000 request $2
Next 400,000 request $1.75
Next 500,000 request $1.5
Over 1,000,000 request $1

For example, 2,000,000 requests would cost $2,000. For more details, refer to our pricing page.

On this page