Credits are the currency of GraphHopper. Credits can be spent for all Directions API products. For example, if you buy a Standard subscription, you will receive 15,000 credits per day. These credits can be used for the Routing API and Route Optimization API - but also all other APIs. Each request to a service costs credits. Below is a detailed overview of the credit costs of each API.


TABLE OF CONTENTS


You can use the estimator in the dashboard (below the pricing table) to roughly estimate the necessary credits per day.

Routing API


A simple Routing API request with 2 to 10 locations costs 1 credit, so if you buy a Standard subscription with 15,000 credits per day, you can calculate 15,000 routes with up to 10 locations each.


If you want to calculate routes with more than 10 locations, you pay for 10 additional locations, one credit more for each. For example, a route request with 11 (via) locations costs 2 credits, 21 (via) locations cost 3 credits, and so on.


If you want to calculate alternative routes for a route request, you have to set the parameter "algorithm" to "alternative_route". A route request with alternative routes costs 2 credits more than a simple route request without alternative routes.


A route request between 2 locations (from, to) with alternative routes no longer costs only 1 credit but 1+2=3 credits.


If you set the "algorithm" to "round_trip" this costs 2 credits.


When you set "optimize=true" you request to additionally solve a Traveling Salesman problem, see the documentation. Since this problem requires a little more computing time, such a request costs 10 times more than a simple route request. For example, if you want to optimize the sequence of 10 locations, it will cost 10 credits instead of 1 credit.


Route Optimization API


The cost of a Route Optimization API request depends on the number of vehicles and unique locations in that request and is calculated as #vehicles x #locations. However, an optimization request costs at least 10 credits.


For example: 

  • If you want to solve a Traveling Salesman problem with 1 vehicle and 100 stops, it will cost you 1 x 100 credits.
  • If you want to solve a vehicle routing problem with 10 vehicles and 150 stops, it costs 10 x 150 = 1,500 credits. If you buy a Premium plan, you receive 50,000 credits per day, i.e. you can solve 50,000/1,500 = 33 of such vehicle routing problems per day.


The GET request to fetch the solution costs 0.3 credits per request. This might be an incentive to reduce heavy polling. You can avoid this and use the recommended synchronous POST endpoint instead.



Matrix API


The costs of one Matrix API request are calculated as follows: If either the number of origins or the number of destinations is less than 20, it costs #origins x #destinations / 2 credits. Otherwise, it costs MAX_OF(origins, destinations) * 10. However, each request costs at least 1 credit is charged. 


For example, if you have 2 origins and 10 destinations, 2 x 10 / 2 = 10 credits will be charged. If you have 30 origins and 40 destinations, the required credits amount to 40 x 10 = 400 credits. If you need to calculate one-to-many matrices like 1-to-100, then the first formula always applies, i.e. origins x destinations / 2.


Summary: credits = num_of_origins x num_of_destinations / 2 if min(num_of_origins, num_of_destinations) < 20, otherwise max(num_of_origins, num_of_destinations) x 10.



Geocoding API


For the Geocoding API we have integrated different providers. Each provider has its own prices. To take these differences into account, the prices per geocoding request vary depending on the provider. The following list shows the credit costs per request for the different providers:


  • default: 0.3 credits
  • gisgraphy: 0.3 credits
  • nominatim: 0.9 credits
  • nettoolkit: 0.9 credits
  • opencagedata: 0.9 credits



Map Matching API


The cost of a Map Matching API request is calculated using the following formula: input_locations / 50. However, each request costs at least 1 credit.



Isochrone API


The costs for one Isochrone API request is 2 credits for every minute it explores. However, each request costs at least 10 credits. For example, if you want to calculate an isochrone with a time limit of 20 minutes (1200 seconds), that request will cost 2x20=40 credits.



Cluster API


The costs for one Cluster API request costs the number of customers times 10 and so at least 10 credits. For example, if you want to calculate a cluster request with 50 customers it costs 50*10=500 credits.