research/transjakarta-live-data/index.md
hermes 77b0a55c41 Add comuline-krl-data topic + jakarta-public-transport-data umbrella
Second audit under the Jakarta public transport umbrella: comuline.com replicates KAI Commuter's official partner API (api-partner.krl.co.id); its data has been frozen since ~2025-03-30. Adds the umbrella hub, the comuline topic (sources/analysis/recipes/next-steps), and links the existing transjakarta-live-data topic under the umbrella.
2026-10-12 12:17:01 +00:00

48 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "TransJakarta live data — verified stack: MQTT stream, app REST API, GTFS"
description: "How TransJakarta realtime bus data works and how to use it — anonymous MQTT broker, guest REST API, official GTFS. Verified by cross-capture, Oct 2026."
status: concluded
category: technical
tags: [transjakarta, mqtt, realtime, gtfs, reverse-engineering, transit-data, jakarta-public-transport-data]
draft: true
created: 2026-10-12
updated: 2026-10-12
---
# TransJakarta live data — verified stack
**What this is:** a verified map of TransJakarta's public realtime data services — the MQTT live-bus stream, the official app REST API, and the GTFS static feed — plus ready-to-use connection recipes.
**Origin:** reverse-engineering `transit.oyenza.com` (a third-party tracker) to determine what it uses. The trail led to TransJakarta's own services, which are reachable directly. Cross-capture verification proved the third-party tracker serves the same data as the official feed — see [[transjakarta-live-data/analysis|Analysis]].
## TL;DR — the three services
1. **Live positions (MQTT):** `wss://mqtt.tj.co.id:8084/mqtt` — anonymous, no key needed. Topics `/mobile_armada/<cell>/<route>/<trip>/<fleet-no>`; one JSON payload per bus.
2. **App REST API:** `https://tijeapi.transjakarta.co.id` — guest JWT via `POST /v1/auth/login/guest` (no account). `POST /v1/bus` returns nearby buses **and** the MQTT topics to subscribe.
3. **Static schedule:** `https://gtfs.transjakarta.co.id/files/file_gtfs.zip` (~2.4 MB, open download; version observed 27 Jul 2026).
## Key verified numbers (Oct 12, 2026)
- Live fleet: ~3,300–3,720 buses (BRT, Mikrotrans, Angkutan Umum Integrasi, Transjabodetabek, Royaltrans, Rusun).
- oyenza cross-capture: 1,794 common buses, 100% trip/route ID agreement, median position delta 8.9 m, 97.8% fleet overlap over 75 s.
- Broker: ~2,000+ retained messages delivered instantly on subscribe; per-bus refresh ~8–75 s in samples.
- Third-party tracker's own browser stream: full snapshot (3,722 buses) + deltas every 3.00 s.
## Using it
- Copy-paste recipes (curl / node): [[transjakarta-live-data/recipes|Recipes]]
- Ready tool: [[transjakarta-live-data/scripts/tj-snapshot.mjs|scripts/tj-snapshot.mjs]] — capture a live snapshot to JSON.
- Evidence archive: `workspace/transjakarta-live-captures/` (raw captures, scripts, bundles).
## Files
- [[transjakarta-live-data/sources|Sources]] — endpoints, repos, references
- [[transjakarta-live-data/analysis|Analysis]] — architecture + verification evidence
- [[transjakarta-live-data/methodology|Methodology]] — how it was verified (repeatable)
- [[transjakarta-live-data/recipes|Recipes]] — connection examples
- [[transjakarta-live-data/next-steps|Next steps]] — risks + future ideas
## Related Research
- [[jakarta-public-transport-data/index|Jakarta Public Transport Data]] — umbrella topic
- [[comuline-krl-data/index|Comuline / KRL Schedule Data]] — sibling audit (rail schedules)