1. Services
  2. Toll roads

Toll road API

Toll road sections, toll gates with coordinates, and the published tariff between two points by vehicle class.

GET /v1/toll-roads/tariff2 creditsAbout $0.002

Try it

GET/v1/toll-roads/tariff
curl 'https://api.apifor.dev/v1/toll-roads/tariff?from_gate=Jakarta&to_gate=cibatu-jakarta-cikampek&vehicle_class=1' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "success": true,
  "data": {
    "from_gate": {
      "input": "Jakarta",
      "gate_id": null,
      "name": "Jakarta",
      "section_id": null
    },
    "to_gate": {
      "input": "cibatu-jakarta-cikampek",
      "gate_id": "cibatu-jakarta-cikampek",
      "name": "Gerbang Tol Cibatu",
      "section_id": "jakarta-cikampek"
    },
    "vehicle_class": 1,
    "currency": "IDR",
    "matches": [
      {
        "section_id": "jakarta-cikampek",
        "section_name": "Jakarta-Cikampek dan Jakarta -Cikampek II Elevated",
        "network": "Trans Jawa",
        "distance_km": 121,
        "published_from": "Jakarta IC",
        "published_to": "Cibatu",
        "direction": "as_published",
        "tariff": 16500,
        "tariffs": {
          "class_1": 16500,
          "class_2": 24500,
          "class_3": 24500,
          "class_4": 32500,
          "class_5": 32500
        },
        "local": {
          "country": "ID",
          "vehicle_classes": {
            "golongan_I": 16500,
            "golongan_II_III": 24500,
            "golongan_IV_V": 32500
          }
        }
      }
    ],
    "rules": {
      "regime": "BPJT toll tariff",
      "legal_basis": "Tariffs set by decree of the Minister of Public Works (Keputusan Menteri PU) per toll road section",
      "effective_from": null,
      "effective_to": null,
      "source_url": "https://bpjt.pu.go.id/info-tarif-dan-golongan/"
    }
  },
  "meta": {
    "coverage": [
      "ID"
    ],
    "attribution": {
      "source": "© OpenStreetMap contributors; Badan Pengatur Jalan Tol (BPJT), Ministry of Public Works",
      "license": "Gate coordinates: ODbL 1.0 (OpenStreetMap). Sections and tariffs: BPJT public listings, credited as the official source",
      "license_url": "https://opendatacommons.org/licenses/odbl/1-0/",
      "source_url": "https://www.openstreetmap.org/copyright",
      "attribution_page": "https://bpjt.pu.go.id/daftar-ruas-jalan-tol-dan-bujt/",
      "notice": "Modified: OpenStreetMap toll booths validated (name, region, distance to the toll carriageway), merged per gate and mapped to BPJT sectio...",
      "sources": [
        {
          "name": "OpenStreetMap (barrier=toll_booth)",
          "url": "https://www.openstreetmap.org/copyright",
          "licence": "ODbL 1.0",
          "used_for": "gate coordinates"
        },
        {
          "name": "BPJT toll road and operator list",
          "url": "https://bpjt.pu.go.id/daftar-ruas-jalan-tol-dan-bujt/",
          "licence": "Official public listing (no reuse licence stated)",
          "used_for": "sections, operator, length, status, operation decree date"
        }
      ]
    }
  }
}

A real response from our OpenAPI file, with long lists and strings shortened.

Endpoints and price

EndpointCreditsAbout
GET /v1/toll-roads1 credit$0.001
GET /v1/toll-roads/{id}1 credit$0.001
GET /v1/toll-roads/gates1 credit$0.001
GET /v1/toll-roads/gates/{id}1 credit$0.001
GET /v1/toll-roads/tariff2 credits$0.002
GET /v1/toll-roads/coverage (Free)Free$0

USD at Starter pack prices ($5 for 5,000 credits). Calls that fail before work starts are refunded.

Coverage today

Indonesia.

Leave country out to get every covered country, or pass one to narrow it.

Sources, row counts and country-only fields per country: GET /v1/toll-roads/coverage, free with your API key. How coverage works

Limits

  • 77 sections, 558 gates and 1,485 tariff rows. The tariff call needs country.
  • If a gate pair is not published you get a 404 and pay nothing.
  • Vehicle classes 2 and 3 share a price, as do 4 and 5.

Questions

Can I pass gate names instead of ids?

Yes. We clean up both names and match them against the published tariff sheet.

What if the route is only published the other way?

You still get the tariff, with direction: reverse_of_published.

Related services

All services