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 standard 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 1 credit more than a normal route request without alternative routes.


A route request between 2 locations (from, to) with alternative routes costs 1 credit more, i.e. 1+1=2 credits.


If you set the "algorithm" to "round_trip" this costs 2simple 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: #origins * #destinations / 2 credits. 

For larger requests the formula MAX_OF(#origins, #destinations) * 10 is used if the result is smaller. However, each request costs at least 1 credit. 


For example, if you have 2 origins and 10 destinations, 2 * 10 / 2 = 10 credits will be charged. If you have 30 origins and 40 destinations, the second formula is cheaper and so the credits are calculated as 40 * 10 = 400.


For credit calculation, either #origins x #destinations / 2 or max(#origins, #destinations) x 10 is used. Depending on which is smaller.



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.