---
title: "Toll road API | APIFor"
description: "Toll road sections, toll gates with coordinates, and the published tariff between two points by vehicle class. 2 credits per call, REST and MCP, one API key."
canonical: "https://apifor.dev/services/toll-roads/"
---

1. [Services](https://apifor.dev/services/)
2. [Toll roads](https://apifor.dev/services/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/tariff 2 credits About $0.002

[Get a free API key](https://app.apifor.dev/register) [Endpoint reference](https://apifor.dev/docs/reference/toll-roads/)

## Try it

GET /v1/toll-roads/tariff

```bash
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

```json
{
  "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

| Endpoint | Credits | About |
| --- | --- | --- |
| GET `/v1/toll-roads` | 1 credit | $0.001 |
| GET `/v1/toll-roads/{id}` | 1 credit | $0.001 |
| GET `/v1/toll-roads/gates` | 1 credit | $0.001 |
| GET `/v1/toll-roads/gates/{id}` | 1 credit | $0.001 |
| GET `/v1/toll-roads/tariff` | 2 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`](https://apifor.dev/docs/reference/toll-roads/#get-toll-roads-coverage), free with your API key. [How coverage works](https://apifor.dev/docs/coverage/)

## 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.

## Sources and licences

- **[OpenStreetMap contributors](https://www.openstreetmap.org/copyright)**: ODbL 1.0
- **[BPJT, Ministry of Public Works](https://bpjt.pu.go.id/info-tarif-dan-golongan/)**: Official public listing, credited (no reuse licence stated)

### Attribution

- © OpenStreetMap contributors

## Also on MCP

Connect `https://mcp.apifor.dev/mcp` and your agent gets a tool for this service, billed the same way.

[MCP setup](https://apifor.dev/docs/mcp/)

## 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](https://apifor.dev/services/)

- [Administrative boundaries API](https://apifor.dev/services/boundaries/)
- [Places (POI) API](https://apifor.dev/services/places/)
- [Train station API](https://apifor.dev/services/train-stations/)
- [Bus terminal API](https://apifor.dev/services/bus-terminals/)
- [School directory API](https://apifor.dev/services/schools/)
- [Hospital directory API](https://apifor.dev/services/hospitals/)
- [Vehicle registrations API](https://apifor.dev/services/vehicle-registrations/)
