Skip to content
Free API · No key required

Toll Calculator API

A free, public REST API to look up Philippine expressway toll fees. Covers all 13 expressways with 2,412 TRB-approved rates. No API key, no sign-up, no rate limits.

JSON responsesCORS-enabledRead-only · No auth

Endpoint

GET /api/toll-calculator

Base URL: https://www.expressway.ph

Query Parameters

ParameterTypeRequiredDescription
originstringYesEntry toll plaza name (e.g., "Balintawak", "Magallanes")
deststringYesExit toll plaza name (e.g., "Dau", "Calamba")
classnumberNo (default: 1)Vehicle class: 1 = Cars/SUVs, 2 = Buses/Light Trucks, 3 = Large Trucks

Response Format

Successful responses return HTTP 200 with this JSON structure:

200 OK
{
  "origin": "Balintawak",
  "destination": "Dau",
  "vehicleClass": 1,
  "totalToll": 411,
  "segments": [
    {
      "expresswayName": "NLEX",
      "expresswayColor": "#2563EB",
      "from": "Balintawak",
      "to": "Dau",
      "toll": 411,
      "rfidSystem": "Easytrip"
    }
  ],
  "rfidBreakdown": {
    "Easytrip": 411
  },
  "alternativeRoutes": []
}

Response Fields

originEntry plaza name
destinationExit plaza name
vehicleClassVehicle class used (1, 2, or 3)
totalTollTotal toll fee in PHP (integer)
segments[]Array of route segments with expresswayName, from, to, toll, and rfidSystem
rfidBreakdownRFID system to toll mapping (e.g., {"Easytrip": 411})
alternativeRoutes[]Other routes (if any) with label, tag, totalToll, and segments

Error Codes

StatusMeaning
200Route found. Response includes toll data.
400Missing or invalid parameters (origin, dest, or class).
404No route found between the given plazas. Check spelling.

Code Examples

cURL

bash
curl "https://www.expressway.ph/api/toll-calculator?origin=Balintawak&dest=Dau&class=1"

JavaScript / TypeScript

javascript
const response = await fetch(
  "https://www.expressway.ph/api/toll-calculator?origin=Balintawak&dest=Dau&class=1"
);
const data = await response.json();

console.log(data.totalToll);       // 411
console.log(data.segments);        // [{expresswayName: "NLEX", ...}]
console.log(data.rfidBreakdown);   // {Easytrip: 411}

Python

python
import requests

response = requests.get(
    "https://www.expressway.ph/api/toll-calculator",
    params={"origin": "Balintawak", "dest": "Dau", "class": 1}
)
data = response.json()

print(f"Total toll: \u20b1{data['totalToll']}")
for seg in data["segments"]:
    print(f"  {seg['from']} -> {seg['to']} via {seg['expresswayName']}: \u20b1{seg['toll']}")

Cross-Expressway Route

Routes spanning multiple expressways return multiple segments with RFID system info for each:

javascript
// Cross-expressway route: NLEX to SLEX via Skyway Stage 3
const response = await fetch(
  "https://www.expressway.ph/api/toll-calculator?origin=Balintawak&dest=Calamba&class=1"
);
const data = await response.json();

// data.segments will contain multiple segments:
// [
//   { expresswayName: "NLEX", from: "Balintawak", to: "Bocaue", toll: 98, rfidSystem: "Easytrip" },
//   { expresswayName: "Skyway Stage 3", from: "NLEX Int.", to: "Buendia", toll: 274, rfidSystem: "Autosweep" },
//   { expresswayName: "SLEX", from: "Magallanes", to: "Calamba", toll: 176, rfidSystem: "Autosweep" }
// ]

Try It Live

Enter plaza names below and hit "Send Request" to see the API response in real time.

GET /api/toll-calculator?origin=Balintawak&dest=Dau&class=1

Usage Guidelines

Free for any use — personal projects, commercial apps, travel blogs, mobile apps, bots. No API key needed.

CORS-enabled — call directly from browser JavaScript on any domain.

Cached for 24 hours — responses include Cache-Control: public, max-age=86400 so CDN and browser caching kicks in automatically.

Read-only — the API only supports GET requests and returns toll data. No mutations, no writes, no authentication required.

Fair use: Please be reasonable with request volume. If you need high-volume access (>10,000 requests/day), reach out first. We reserve the right to throttle abusive traffic.

Data Source & Accuracy

All toll rates are sourced from the Toll Regulatory Board (TRB) official rate matrices and updated within 24 hours of any official toll rate change.

The API covers 2,412 toll rate entries across 109 toll plazas on all 13 Philippine expressways: NLEX, SLEX, Skyway, Skyway Stage 3, TPLEX, SCTEX, CALAX, CAVITEX, MCX, STAR Tollway, NAIAX, NLEX Connector, and Harbor Link.

Cross-expressway routing uses a BFS algorithm across 18 interchange points to find the cheapest route automatically.