Unofficial Chicago CTA 'L' arrivals and lines API (CodeIgniter 4)
This API provides access to Chicago Transit Authority (CTA) train data including station information, arrival times, and line details. Built using the CodeIgniter 4 framework. Not affiliated with or endorsed by the CTA.
https://your-domain.com/
Get train arrival information for stations
station_id - Station identifierline - Train line (optional)GET /arrivals?station_id=40380
Get information about available train lines
GET /lines
Get list of all stations
line - Filter by train line (optional)GET /stations?line=red
All responses are returned in JSON format.
{
"status": "success",
"data": {
// ... response data
},
"timestamp": "2023-08-23T10:30:00Z"
}
{
"status": "error",
"message": "Error description",
"code": 400
}
The following CTA train lines are available:
composer installenv to .env and configure your settingsphp spark servehttp://localhost:8080This project includes: