🚊 CTA LineWatch Documentation

Unofficial Chicago CTA 'L' arrivals and lines API (CodeIgniter 4)

📖 Overview

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.

🌐 Base URL

https://your-domain.com/

🛤️ API Endpoints

GET/arrivals

Get train arrival information for stations

Parameters:

Example:

GET /arrivals?station_id=40380

GET/lines

Get information about available train lines

Example:

GET /lines

GET/stations

Get list of all stations

Parameters:

Example:

GET /stations?line=red

📋 Response Format

All responses are returned in JSON format.

✅ Success Response

{
  "status": "success",
  "data": {
    // ... response data
  },
  "timestamp": "2023-08-23T10:30:00Z"
}

❌ Error Response

{
  "status": "error",
  "message": "Error description",
  "code": 400
}

🚇 Train Lines

The following CTA train lines are available:

🚀 Getting Started

  1. Clone the repository
  2. Run composer install
  3. Copy env to .env and configure your settings
  4. Start the development server: php spark serve
  5. Visit http://localhost:8080

🔗 Links

📊 Project Stats

This project includes: