A route between multiple locations in Belgium

Routing API

Get exact times and distances for vehicles and people

Geoapify's Road Routing API makes it easy to calculate a route between two or more waypoints for cars, trucks, bicycles, walking, and transit. Our API returns the route object with route geometry in GeoJSON format.

Results include:

  • Route directions (or turn-by-turn instructions)
  • Exact travel time and distance between locations
  • Route details including elevation profiles, road properties and restrictions

Our API gives you all the information you need to plan trips for vehicles and people. Whether you want to plan a driving route for your fleet, a package delivery route, a hiking route for your vacation, or something else, our API has you covered.

Try Routing API

Click on the map to set a starting point and destination points, choose the transportation mode - car, truck, bicycle, pedestrian, or transit:

Try out different options and travel modes in our Routing API Playground. Get an API key and get started today. We offer Freemium pricing so you can get started right away for free, and buy a different package when you need it.

Road Routing Use Cases

Get driving or walking routes between waypoints

Our Road Routing gives you driving or walking route geometry, along with route length and duration. Easily estimate the real distance and time between provided waypoints, and visualize the route on a map.

Road routing use cases: route between locations
Route API to calculate the route between locations

Get navigation instructions

The API returns turn-by-turn navigation instructions for each route, so you can use the API alongside GPS tools. Request detailed navigation including street names, and detailed information about maneuvers. Routing API supports many languages, so you can use the “lang” input parameter to define your language.

  "text": "Turn right onto East 14th Street.",
  "type": "Right",
  "transition_instruction": "Turn right. Then Bear left toward Interstate 70 West.",
  "pre_transition_instruction": "Turn right onto East 14th Street. Then Bear left toward Interstate 70 West.",
  "post_transition_instruction": "Continue for 60 meters.",
  "streets": ["East 14th Street"]

Route analysis

As well as directions, our API gives you practical route information. Use the “route_details” parameter to get detailed information and analyze how good the route is. Get details about road class and surface, number of lanes, and how many maneuvers each route will take. Route analysis information helps you make decisions about route efficiency, fuel consumption, and ease of driving or walking.

  "speed": 40,
  "speed_limit": 40,
  "truck_limit": 40,
  "surface": "paved_smooth",
  "lane_count": 3,
  "road_class": "secondary",
  "name": "East 10th Street",
  "toll": false,
  "tunnel": false,
  "bridge": false,
  "roundabout": false,
  "rightside": true,
  "traversability": "forward",
  "elevation": 286

Calculate and preview hiking and mountain biking routes

Use Routing APi to calculate and preview hiking or mountain biking routes. Get a feel for the terrain before you even set out. You can also request elevation information to create elevation profile visualizations. These are helpful for any hiking or biking route, especially among mountains.

Road routing use cases: route elevation profile
Elevation profile for hiking and bicycle routes

Need to estimate distance and travel time for multiple locations?

Our Route Matrix API returns time/distance for multiple locations, up to 1000 values at once.

Need to reconstruct a route from its GPS coordinates?

Our Map Matching API lets you put in GPS coordinates, and matches them to existing roads. You get route geometry alongside route details.

Need to find the optimal route between locations?

Our Route Planner API lets you search for the optimal route between multiple locations, and for multiple vehicles or people.

Features and capabilities

Support a variety of travel modes

Routing API supports multiple travel modes and vehicle types. That means you get a route that's tailor made to your specific conditions. Supported modes include:

DrivingA passenger car with a maximum weight of 3.5 tonnes and a maximum height of 1.6 meters.
Light TruckSuitable for a larger passenger car, small delivery truck, camper van, or other van, with a maximum weight of 3.5 tonnes and a maximum height of 3.2 meters.
Medium truckA medium sized truck such as a delivery vehicle with a maximum weight of 7.5 tonnes and a maximum height of 4 meters.
TruckA standard full size truck with a maximum weight of 22 tonnes and a maximum height of 4 meters.
Heavy truckA heavyweight vehicle weight up to 40 tonnes.
Truck carrying dangerous goodsSuitable for trucks carrying dangerous good such as flammables, explosives, or solvents, with a maximum weight of 22 tonnes and a maximum height of 4 meters.
Long truckSuitable for longer vehicles with a length up to 34 meters.
BusOur APi will help you find lanes and roads with bus only access.
ScooterPut together routes for motor scooters and mopeds.
MotorcycleSuitable for motorcycle riders, helping you to find suitable road classes to drive safely.
BicycleFind routes that work for city bicycles that are built to ride on roads and paths with good surfaces.
Mountain bicycleSuitable for off-road use, but slower on roads. Our API takes road time into account.
Road bicycleRoad bikes have narrow tires and lightweight frames. Use our API to find the best roads to travel to your destination.
WalkGetting to your destination on foot? Our API still has your back. Pedestrian mode is set to a speed of 5 km/hour.
HikeOur specialized hiking mode uses hiking trails and more difficult paths than our walking mode.
TransitFind the best way to reach your destination using transit or public transport.

Skip gates, roads, and even countries

Our Routing API lets you set barriers around specific locations, so the API won't build a route through them. You can skip tunnels and bridges, or set it to avoid specific roads. You can even set it to avoid specific countries, for example in areas where some routes might cross a border and come back again.

Here is an example URL that shows how to add barriers on the roads:


Here is the result of a call to the Routing API:

Result of avoid location option
Set barrier on South Church Street/US 70

Avoid unwanted route parts

If you want to avoid specific route parts such as toll roads, ferries, or highways, you can. The Routing API makes it easy to avoid specific parts. If you don't want to go down a toll road, or take your vehicle onto a ferry, the API makes it easy to avoid that. And if an unwanted route part comes up between your destinations, the API will offer you alternative routes if possible.

Here is an URL that uses the Avoid Toll Roads and Avoid Highways parameters:


Get directions and instructions

Every route result includes navigation instructions to guide you to your destination. For example, “Drive west on Freisinger Straße/DAH 9” or “Enter the roundabout and take the 2nd exit”. The API supports instructions in English, German, Italian, Spanish, French, and other languages.

See elevation profiles

Ask the API for a route elevation profile to determine how much elevation you'll gain on your route. This is great for bike and hiking routes so you know ahead of time what to expect. Knowing a route's elevation helps you determine its difficulty.

Easy to use and permissive

Our routing API is accessible via HTTP GET requests and easy to integrate with any programming language. Results are returned as GeoJSON objects. Because our Routing API is based on open data, you can store and redistribute your results.

Getting started

Getting started with Routing API is easy:

Step 1. Register and get an API Key

You'll need an API key to get started. Register on Geoapify MyProjects and get an API key.

Step 2. Generate and call HTTP Get request

Generate an HTTP Get request with input data and make the call. Use our Playground and Documentation to learn about Routing API request/response structure.

Here's an example of a Routing API URL that calculates a route between 5 waypoints for bicycle:


Here is the response object returned by the API call:

    • [] 1 item
      • {} 3 keys
        • "Feature"
        • {} 5 keys
          • {} 2 keys
        • {} 2 keys
          • "bicycle"
          • [] 5 items
          • "FeatureCollection"

        The response has one feature of MultiLineString. The feature properties contain waypoints and route legs. Each route leg includes time/distance information and Directions instructions.

        The code samples below show you how to make an API call with different programming languages:

        .then(resp => resp.json())
        .then((calculatedRouteGeoJSON) => {

        Routing API tutorials

        Check out our tutorials to make it easy to get started and get the results you want with Routing API:

        Geoapify Route Directions

        How to use the Route Directions API

        Learn how to get Route Directions with API. We'll show you how to avoid highways, tolls, and select the right transportation mode.
        Visualize a route on a MapLibre GL (Mapbox GL) map

        How to draw routes on a Maplibre GL (Mapbox GL) map

        Learn how to draw the route created by the API on a Maplibre GL (Mapbox GL) map. Check out our live demo on JSFiddle.
        Grand Loop Road, Yellowstone National Park elevation profile

        Drawing Route Elevation Profile with Chart.js

        Learn how to draw road elevations on a chart with chart.js library. Get started quickly with our JSFiddle code sample.

        Still not sure how to start? If you're facing any problems or have questions, we're here to help! Contact us and we will be happy to assist.

        How Much Does It Cost?

        We offer Affordable Prices for businesses of all sizes. Our free plan includes up to 3000 credits a day. Each API call costs a certain number of credits:

        • Each pair of waypoints costs 1 credit.
        • Each 500 kilometers of the resulting route length costs an additional credit, if the route length is more than 500 kilometers.

        Use our Pricing Calculator to estimate how many credits you need.

        Read more about how we calculate costs here.


        How do you bill Directions API Requests?

        A route between every pair of waypoints is counted as a credit. Learn more about the API pricing on the API Documentation page.

        How is 'Truck' mode different from 'Drive' mode?

        Truck mode takes into account truck-specific road restrictions, and avoids narrow roads and residential areas. It also prioritizes routes with fewer maneuvers.

        I need to build routes for heavy transport. Can your API do that?

        The Geoapify Routing API has a very flexible and powerful engine under the hood. Contact us and we will create a solution that works for your business.

        How good is coverage for public transport?

        We provide worldwide coverage for public transport. We use official GTFS feeds when they are available and approximated models for other places.

        Can we use custom GTFS feeds with your Routing API?

        Sure! We can set up a dedicated server for you that builds routes with your GTFS feeds.

        Can you provide custom conditions for high volumes?

        Yes! Contact us and we'll work out a plan that suits your needs

        World map

        Ready To Get Started?

        Get an API key and start using Geoapify Routing API for free today.

        Need help getting started or want to discuss your specific needs? Get in touch and our team will be happy to help.