llms.txt
Compare with other sites' llms.txt files →# tarif.ist
> Open-source map of Istanbul's rail network: every metro, Marmaray, tram and funicular line (21 lines, 234 stations), with station order, transfers, travel times, headways, estimated train positions and live service disruptions.
All data below is free to read with plain HTTP GET, without keys or authentication. Prefer the JSON endpoints over scraping the HTML pages. They carry the same data.
## Caveats
- Times are estimates from the published IBB GTFS timetable, including dwell time at stations. They are not live.
- Train positions are a timetable simulation, not GPS tracking. Real trains can be early, late or out of service.
- Station and line names are Turkish, as signed in Istanbul (e.g. "Yenikapı", "Taksim").
- Route planning between two stations is not offered. Use each stop's `transfers` and each station's `walkingTransfers` to chain lines yourself.
## Static data (rebuilt on every deploy)
- [All lines](https://tarif.ist/api/v1/lines.json): code, name, termini, station count, end-to-end minutes, headway
- [All stations](https://tarif.ist/api/v1/stations.json): name, slug, lines calling there, coordinates
- `https://tarif.ist/api/v1/lines/{slug}.json`: one line with its stops in order, minutes from the first stop, distances and transfers at each stop. The slug is the lowercase line code (e.g. `m2`, `marmaray`).
- `https://tarif.ist/api/v1/stations/{slug}.json`: one station with its lines, the terminus each direction heads towards, and stations within walking distance. Slugs are ASCII and lowercase (e.g. `yenikapi`, `sishane-zemin-istanbul`).
- [Everything as Markdown](https://tarif.ist/llms-full.txt): every line and station in one file
## Live data
- `https://backend.tarif.ist/v1/positions/{CODE}`: estimated trains on a line right now. Each train has `fromStation`, `toStation`, `segmentProgress` (0–1) and `secondsToNext`. Use the uppercase code (e.g. `M2`, `Marmaray`), as in the `code` field of lines.json. Add `?at=<unix seconds>` for another time.
- `https://backend.tarif.ist/v1/disruptions`: current Metro İstanbul service alerts. `fetchedAt` is 0 until the first upstream fetch succeeds.
- `https://backend.tarif.ist/v1/lines`: per-line train counts and headways from the timetable model
## Lines
- [F1: Taksim – Kabataş](https://tarif.ist/api/v1/lines/f1.json): Füniküler, 2 stations
- [F2: Karaköy – Tünel](https://tarif.ist/api/v1/lines/f2.json): Füniküler, 2 stations
- [M1A: Havaalanı – Yenikapı](https://tarif.ist/api/v1/lines/m1a.json): Hafif Metro, 18 stations
- [M1B: Yenikapı – Kirazlı](https://tarif.ist/api/v1/lines/m1b.json): Hafif Metro, 13 stations
- [M2: Yenikapı – Hacıosman](https://tarif.ist/api/v1/lines/m2.json): Metro, 16 stations
- [M2A: Sanayi Mah. – Seyrantepe](https://tarif.ist/api/v1/lines/m2a.json): Metro, 2 stations
- [M3: Kirazlı – Kayaşehir Merkez](https://tarif.ist/api/v1/lines/m3.json): Metro, 13 stations
- [M4: Kadıköy – Sabiha Gökçen](https://tarif.ist/api/v1/lines/m4.json): Metro, 23 stations
- [M5: Üsküdar – Çekmeköy](https://tarif.ist/api/v1/lines/m5.json): Metro, 16 stations
- [M6: Rumeli Hisarüstü – Levent](https://tarif.ist/api/v1/lines/m6.json): Metro, 4 stations
- [M7: Yıldız – Mahmutbey](https://tarif.ist/api/v1/lines/m7.json): Metro, 17 stations
- [M8: Parseller – Bostancı](https://tarif.ist/api/v1/lines/m8.json): Metro, 13 stations
- [M9: Bahariye – Olimpiyat](https://tarif.ist/api/v1/lines/m9.json): Metro, 4 stations
- [M11: Gayrettepe – Yeni Havalimanı - 3](https://tarif.ist/api/v1/lines/m11.json): Metro, 9 stations
- [Marmaray: Gebze – Halkalı](https://tarif.ist/api/v1/lines/marmaray.json): Banliyö, 43 stations
- [T1: Bağcılar – Kabataş](https://tarif.ist/api/v1/lines/t1.json): Tramvay, 31 stations
- [T3: Damga Sk. – Mühürdar](https://tarif.ist/api/v1/lines/t3.json): Nostaljik Tramvay, 10 stations
- [T4: Habibler – Fetihkapı](https://tarif.ist/api/v1/lines/t4.json): Tramvay, 22 stations
- [T5: Alibeyköy Cep Otogarı – Eminönü](https://tarif.ist/api/v1/lines/t5.json): Tramvay, 14 stations
- [TF1: Taşkışla – Maçka](https://tarif.ist/api/v1/lines/tf1.json): Teleferik, 2 stations
- [TF2: Pier Loti – Eyüp](https://tarif.ist/api/v1/lines/tf2.json): Teleferik, 2 stations
## For humans
- [Live map](https://tarif.ist/): open `https://tarif.ist/?line={CODE}` to show a single line
- [Line pages](https://tarif.ist/hat/) and [station pages](https://tarif.ist/durak/) (Turkish)
- [Source code](https://github.com/berkaycubuk/tarif.ist) (MIT)