Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

GTFS Realtime

Security covered Under active development 1 sites

Part of the Gtfs ecosystem · 8 projects

This module ingests GTFS Realtime feeds for trip updates, vehicle positions, and service alerts, making the data available as JSON. It also provides REST endpoints to query predicted arrivals, vehicle locations, and active alerts.

Ingests GTFS Realtime feeds — trip updates, vehicle positions and service alerts — and serves them as JSON alongside the static schedule data from
GTFS Core.

Each feed is a configuration entity, so feeds deploy with your configuration instead of being clicked in by hand on every environment.

Features

  • Protobuf ingestion for all three GTFS-RT feed types, decoded and cached as JSON.
  • A refresh interval per feed, 60 seconds by default, run from cron.
  • An out-of-band refresh endpoint, so a display that asks for stale data can trigger its own update rather than waiting for the next cron run.
  • REST endpoints for predicted arrivals at a stop, vehicles on a route, and active alerts. Realtime responses are marked uncacheable by clients, so a CDN in front of the site cannot serve yesterday's predictions.
  • Hooks for feeds whose realtime identifiers differ from the static ones.

Requirements

GTFS Core 3.x. The gtfs-media/gtfs-realtime-php library is installed by Composer.

Installation

composer require drupal/gtfs_rt

Configuration

Add feeds at Administration › GTFS › Realtime feeds (/admin/gtfs/rt/feeds). Each needs a type, the protobuf endpoint URL, and a refresh interval. For public kiosk use, grant the restful get gtfs_rt_* permissions to the anonymous role.

When realtime IDs do not match the schedule

Regional aggregators often key stops differently from the agency's own static feed — a prefixed stop code, a different agency namespace. Rather than rewriting imported data, implement the identifier hooks in your own agency module. The mapping then lives with the agency, and survives the next feed import.

Rest API

Browse the REST API in OpenAPI format here.

How this module is built

Changes to this module since 2026 were drafted with an AI coding assistant (Claude Code). The maintainers review, test and take responsibility for every change, and the tests and code checks run on drupal.org's CI. Contributions follow Drupal's policy on the use of AI when contributing.

Supporting this module

Developed and maintained by Tyler Brown Cifu Shuster and Jason P. Salter of FivePaths, LLC. Development sponsored by FivePaths.

Drupal 11 · not 10

Ask your assistant about GTFS Realtime

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

3 tracked projects depend on this one

Activity

Tracked releases
4
Tracked since
Aug 2026
Latest release
1 month ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.1.1 Stable 11 Oct 20, 2026
2.1.0 Stable 11 Oct 20, 2026
2.0.x-dev Dev 10–11 Aug 19, 2026
2.0.0 Stable 10–11 Aug 19, 2026