List of realtime feeds
Example data from realtime feed

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 lowa/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.

Supporting organizations: 
Sponsored development

Project information

Releases