Follow GTFS-Realtime feed polling and freshness best practices

domain: gtfs.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Read the official best-practices guidance at gtfs.org/documentation/realtime/realtime-best-practices/ before building a polling loop
  2. Poll each feed no less often than every 30 seconds, or faster if the underlying data changes more frequently (especially VehiclePositions)
  3. Check FeedHeader.timestamp on every fetch and flag data older than the recommended freshness window (about 90 seconds for TripUpdates/VehiclePositions, about 10 minutes for Alerts)
  4. Use HTTP conditional GET (If-Modified-Since) where the producer supports it to avoid re-transferring an unchanged feed
  5. Treat feeds as stateless snapshots: if an entity present in one poll is absent in the next, treat it as no longer active rather than trying to diff/patch prior state

Known gotchas

Related routes

Consume a GTFS-Realtime feed for live vehicle positions, trip updates, and service alerts
gtfs.org · 5 steps · unrated
Consume a GTFS-Realtime ServiceAlerts feed for service disruptions
gtfs.org · 5 steps · unrated
Consume a GTFS-Realtime VehiclePositions feed for live vehicle location
gtfs.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans