Real-time transit data for multiple agencies with enhanced route information
Overview
The Polaris Transit API provides comprehensive transit data for multiple agencies, including real-time updates, scheduled departures, and enhanced route information.
🚀 Real-time Data
GTFS-RT integration for live vehicle positions and trip updates
🎨 Smart Filtering
Automatically filters out past departures, showing only upcoming services
📍 Location Search
Find nearby stops and transit options based on your location
🎨 Enhanced Routes
Detailed route information including colors, names, and destinations
API Endpoints
GET /transit-options
Find nearby stops with routes and next departures in a single comprehensive call. Perfect for mobile applications.
All departure endpoints automatically filter out past departures and show only upcoming services for a cleaner, more relevant user experience.
How it works:
Converts current time to the agency's local timezone
Handles GTFS times that extend beyond 24 hours (e.g., "26:04:12" for 2 AM next day)
For real-time data, uses predicted times when available
Provides graceful fallback if filtering fails
Example
If it's currently 2:30 PM and a stop has departures at 1:00 PM, 2:00 PM, 3:00 PM, and 2:04 AM tomorrow, only the 3:00 PM and 2:04 AM departures will be returned.
// Before filtering
{
"departures": [
{"time": "13:00:00", "route": "325"}, // Past
{"time": "14:00:00", "route": "325"}, // Past
{"time": "15:00:00", "route": "325"}, // Future
{"time": "26:04:12", "route": "325"} // Next day
]
}
// After filtering (current time: 14:30:00)
{
"departures": [
{"time": "15:00:00", "route": "325"}, // Future
{"time": "26:04:12", "route": "325"} // Next day
]
}