Skip to main content

Israel Rail API

image image Build status

This is a unofficial wrapping of the API of Israeli Rail network in Python.

Use this script for checking your own train schedule, integrating with Alexa, and so on!

Installing

Tested with Python 3.8-3.14.

pip install israel-rail-api

Usage

import israelrailapi

schedule = israelrailapi.TrainSchedule()
routes = schedule.query('Tel Aviv University', 'Jerusalem Yitzhak Navon')

for route in routes:
    print(route)

Each returned route contains one or more train segments in route.trains. Every segment is a TrainRoutePart with:

  • src / dst: source and destination station ids
  • departure / arrival: scheduled departure and arrival timestamps
  • platform / dst_platform: origin and destination platforms
  • departure_delay: departure delay in minutes for the segment origin station

Example:

import israelrailapi

schedule = israelrailapi.TrainSchedule()
routes = schedule.query('Tel Aviv HaHagana', 'Ben Gurion Airport', '2026-04-24', '09:00')

for route in routes:
    for train in route.trains:
        print(
            train.departure,
            train.arrival,
            f"delay={train.departure_delay}m",
        )

CLI example:

python3 israelrailapi/schedule.py "tel aviv hahagana" "ben gurion airport" 2026-04-24 0900

Contributing

We'd love your contributions! Fire up a (tested!) Pull request, and we'll be happy to approve it.

Release files for israel-rail-api 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for israel-rail-api 0.1.5
File Size Uploaded
israel_rail_api-0.1.5.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for israel-rail-api 0.1.5
File Interpreter ABI Platform
israel_rail_api-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / israel_rail_api-0.1.5.tar.gz

Download URL israel_rail_api-0.1.5.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c66a94e66a8b7781451f23e36e933516a3305ffc0dbdf88f3ae81d8f776415eb
BLAKE2b-256 checksum
How to use checksums
5e7fb392be011f50b197150bdcefc98698c81a5ed2dc454d5c24d41f1790b8f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.

Transparency log

Release files / israel_rail_api-0.1.5-py3-none-any.whl

Download URL israel_rail_api-0.1.5-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f06f6b7392dff55c7ac31a03fdf672ecdd7e2e367d3bcf53f71ac1e2febfa18a
BLAKE2b-256 checksum
How to use checksums
088f2637c1fad27192a813adc78600cc91e1a2357e82ee5b3e8c8e98652c4b19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page