Skip to main content

Tolls Calculator — API

Tolls for Spain, Portugal and France

Calculate real toll costs for any route

Integrate our toll API into your routing software or query toll rates instantly. Full coverage of toll motorways with all vehicle types. No minimum, no commitment.

demo.title

demo.subtitle

demo.lead.title

demo.lead.subtitle

3
Countries
8.000 km
Coverage
< 50 ms
API latency
15.000+
Routes/day

Full coverage

Real-time toll data for your software

From a single route query to full integration with your logistics platform. Coverage of toll motorways in Spain, Portugal and France.

Official rates

Toll prices updated from official operators. No estimated data, no approximations.

Multiple vehicles

All vehicle types: cars, trucks, vans, buses. Each category with its specific rate.

Instant response

API queries in milliseconds. Average latency < 50ms for routes up to 1,000 km.

No minimum

Pricing from 0.001€ per query. No minimum fee, no commitment. Pay only for what you use.

Full routes

Calculate tolls between two points or along a complete route. Results with per-section breakdown.

Simple integration

REST API with OpenAPI documentation. SDKs in Python, JavaScript. Compatible with any TMS or routing system.

Who Tolls Calculator is for

From software integrations to one-off route queries, we cover every case.

Developers

Ready-to-use REST API and MCP server. Python and JavaScript SDKs. Full OpenAPI docs.

View API docs

Logistics & TMS

Connect the API to your ERP, Odoo or SAP. Automatic toll costs on every planned route.

How to integrate

Fleet managers

Query tolls for single routes instantly. No sign-up: calculate, compare and decide.

Open calculator

Integrate in minutes

Connect the toll API to your current stack. Examples for major languages and systems.

REST API

curl -X POST 'https://tolls.cargoffer.com/api/tolls/calculate' \
  -H 'Content-Type: application/json' \
  -d '{"origin":[42.23,-8.71],"destination":[40.41,-3.70],"vehicleType":"truck"}'

Python

import httpx
url = 'https://tolls.cargoffer.com/api/tolls/calculate'
resp = httpx.post(url, json={'origin':[42.23,-8.71],'destination':[40.41,-3.70],'vehicleType':'truck'})
print(resp.json()['totalCost'])

Node.js

const resp = await fetch('https://tolls.cargoffer.com/api/tolls/calculate', {
  method:'POST', headers:{'Content-Type':'application/json'},
  body: JSON.stringify({origin:[42.23,-8.71],destination:[40.41,-3.70],vehicleType:'truck'})
});
console.log((await resp.json()).totalCost);

MCP Server

{
  "mcpServers": {
    "tolls": { "command": "python", "args": ["-m","tolls_mcp"] }
  }
}

Odoo

class TollCalculator:
    def calculate(self, o, d):
        r = requests.post('https://tolls.cargoffer.com/api/tolls/calculate',
            json={'origin':o,'destination':d,'vehicleType':'truck'})
        return r.json()['totalCost']

SAP

DATA: lv_url TYPE string.
lv_url = 'https://tolls.cargoffer.com/api/tolls/calculate'.
CALL METHOD cl_http_client=>create_by_url EXPORTING url = lv_url RECEIVING client = lo_client.

Tolls Calculator vs alternatives

Why choose a toll API built for Spain, Portugal and France.

FeatureTolls CalculatorTollGuruGoogle Maps
ES / PT / FR
All vehicle types
API access
Pay per use (no fee)
MCP server for LLMs
Official rates

Frequently asked questions

Which countries does the API cover?

We cover Spain, Portugal and France. All toll motorway operators with updated official rates.

What vehicle types are supported?

All: light vehicles (cat. 1/2), trucks (cat. 3/4), vans, buses and special. Each with its own rate.

How much does each query cost?

From €0.001 per query. No minimum fee or commitment. Pay only for what you use.

How do I access the API?

Sign up and get your API key. REST docs and MCP server available at /how-it-works.

Calculate your tolls today

Try the API free with 100 calls/month. No card required.