Don’t hesitate to contact us:
Forum: discuss.graphhopper.com
Email: support@graphhopper.com
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.
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 the number of locations divided by 10. E.g. for 25 locations it costs 2.5 credits.
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 2 simple 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 12 locations, it will cost 12 credits instead of 1.2 credits.
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 × #locations. However, an optimization request costs at least 10 credits and not more than 10 × #locations.
For example:
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.
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 × #destinations / 2 or max(#origins, #destinations) × 10 is used — depending on which is smaller.
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:
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.
The costs for one Isochrone API request are 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 2 × 20 = 40 credits.
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.
An exception is if you use the profile ‘as_the_crow_flies’, then the credit costs are equal to the number of customers, i.e. at least 1 credit.