API Reference

Indonesia Railway Stations: Codes, Coordinates and Status

Transport category: 1,129 stations in 13 provinces.

Data as of · Source: OpenStreetMap (ODbL), Wikidata & Wikipedia

Main endpoint
GET https://use.apiindonesia.id/api/v1/stasiun
Endpoints
3
Authentication
x-api-key header (create one free in the dashboard)
Price
2 credits (Rp2) per successful request; failed requests are free
Format
JSON (REST), with cURL, JavaScript and Python examples
Data source
Sources: OpenStreetMap ((c) OpenStreetMap contributors, ODbL 1.0), Wikidata (CC0) and Indonesian Wikipedia (CC BY-SA 4.0); Passenger station lists from KAI, KAI Commuter, MRT Jakarta and LRT Jabodebek are used only for validation (confirming codes and whether a station serves passengers) and are not copied; Station codes that conflict between sources and cannot be confirmed are left null; Validation: terverifikasi means at least two coordinate sources agree within 1 km with a matching code or name (491 of the 660 active stations); sebagian means one coordinate source or no match in an operator list; Inactive stations are included when they have coordinates; filter status=aktif for operating stations; Every response carries meta.attribution
Product Brief

What this API gives you

Transport category: 1,129 stations in 13 provinces.

  • 660 active stations: 449 heavy rail, 155 KRL commuter, 36 LRT, 13 MRT, 4 airport rail, 3 high-speed rail
  • 469 inactive stations that still have coordinates
  • KAI station code (993 stations), elevation (781), Daop/Divre (957)
  • Operator and region with Kemendagri codes
  • Whether the station appears in an operator passenger list (518)
  • Nearest-station search from a coordinate
  • Sources: OpenStreetMap ((c) OpenStreetMap contributors, ODbL 1.0), Wikidata (CC0) and Indonesian Wikipedia (CC BY-SA 4.0)
  • Passenger station lists from KAI, KAI Commuter, MRT Jakarta and LRT Jabodebek are used only for validation (confirming codes and whether a station serves passengers) and are not copied
  • Station codes that conflict between sources and cannot be confirmed are left null
  • Validation: terverifikasi means at least two coordinate sources agree within 1 km with a matching code or name (491 of the 660 active stations); sebagian means one coordinate source or no match in an operator list
  • Inactive stations are included when they have coordinates; filter status=aktif for operating stations
  • Every response carries meta.attribution
Coverage
3

ready-to-use endpoints in this product, with JSON responses and consistent error handling.

Access
API key

Can be tried with the 3,000 credit signup bonus, then used in production through one API Indonesia key.

Sample resource
https://use.apiindonesia.id/api/v1/stasiun

Returns the 1,129 stations with code, type, operator, Daop/Divre, status, region, coordinates and validation status. The jenis filter also matches services, so jenis=krl includes heavy-rail stations served by KRL.

Example product scenarios

This section separates the product page from the docs. The docs explain how to call endpoints; this page explains why the endpoints make sense for your feature.

  • Transport apps: find the nearest stations and filter by service (KRL, MRT, LRT).
  • Forms & validation: fill station dropdowns and check KAI station codes.
  • Property & research: measure the distance from a location to the nearest active station.

Example Usage

Request
curl "https://use.apiindonesia.id/api/v1/stasiun?jenis=mrt&per_page=2" \
  -H "x-api-key: YOUR_API_KEY"
Response · 200 OK
{
  "success": true,
  "data": [
    {
      "id": "ssm",
      "kode": "SSM",
      "nama": "ASEAN",
      "jenis": "mrt",
      "operator": "MRT Jakarta",
      "daop": null,
      "status": "aktif",
      "melayani_penumpang": true,
      "provinsi": "Daerah Khusus Ibukota Jakarta",
      "provinsi_kode": "31",
      "kabupaten": "Kota Administrasi Jakarta Selatan",
      "kabupaten_kode": "31.74",
      "lat": -6.2387737,
      "lng": 106.7984457,
      "validasi": "terverifikasi"
    },
    {
      "id": "bnh",
      "kode": "BNH",
      "nama": "Bendungan Hilir",
      "jenis": "mrt",
      "operator": "MRT Jakarta",
      "daop": null,
      "status": "aktif",
      "melayani_penumpang": true,
      "provinsi": "Daerah Khusus Ibukota Jakarta",
      "provinsi_kode": "31",
      "kabupaten": "Kota Administrasi Jakarta Selatan",
      "kabupaten_kode": "31.74",
      "lat": -6.2150263,
      "lng": 106.8179484,
      "validasi": "terverifikasi"
    }
  ],
  "meta": {
    "total": 13,
    "page": 1,
    "per_page": 2,
    "total_pages": 7,
    "attribution": {
      "source": "© OpenStreetMap contributors; Wikidata; Wikipedia",
      "license": "ODbL 1.0 (bagian dari OpenStreetMap); Wikidata CC0; Wikipedia CC BY-SA 4.0",
      "license_url": "https://opendatacommons.org/licenses/odbl/1-0/",
      "source_url": "https://www.openstreetmap.org/copyright",
      "attribution_page": "https://id.wikipedia.org/wiki/Daftar_stasiun_kereta_api_di_Indonesia",
      "notice": "Data diubah: digabung dari sumber terbuka dan divalidasi silang terhadap daftar stasiun penumpang operator (tidak disalin), oleh API Indonesia",
      "sources": [
        {
          "name": "OpenStreetMap (railway=station/halt)",
          "url": "https://www.openstreetmap.org/copyright",
          "used_for": "koordinat, kode, operator, jenis"
        },
        {
          "name": "Wikidata (P296 kode stasiun)",
          "url": "https://www.wikidata.org",
          "used_for": "kode, elevasi, koordinat"
        },
        {
          "name": "Wikipedia bahasa Indonesia",
          "url": "https://id.wikipedia.org/wiki/Daftar_stasiun_kereta_api_di_Indonesia",
          "used_for": "kode, elevasi, Daop/Divre, status"
        }
      ]
    }
  }
}

Related Articles

Pricing 2 credits (Rp2) per successful request; failed requests are free. One-time 3,000 credit signup bonus, no credit card, no monthly allowance.

Indonesia Railway Stations: Codes, Coordinates and Status API questions

Where does the station data come from?

From OpenStreetMap (ODbL 1.0), Wikidata (CC0) and Indonesian Wikipedia (CC BY-SA 4.0). Passenger station lists from KAI, KAI Commuter, MRT and LRT are used only for validation and are not copied.

Why are inactive stations included?

There are 469 inactive stations that still have coordinates, useful for research and history. Use status=aktif for operating stations only; the nearby endpoint uses aktif by default.

Why do some stations have no code?

A station code is only filled when the open sources agree or an operator list confirms one value. Conflicting codes that cannot be confirmed are left null. 993 stations have a code.

Get Started

Start Integrating
Today

Sign up for free and get a 3,000 credit bonus (Rp3,000) once your email is verified, grab an API key, and call your first endpoint right away. No credit card, no tedious approval process.

Dot wave visualization