{"id":46561504,"url":"https://github.com/lbkulinski/cta4j-api","last_synced_at":"2026-03-07T06:02:31.718Z","repository":{"id":320828688,"uuid":"1002661686","full_name":"lbkulinski/cta4j-api","owner":"lbkulinski","description":"An improved API for the Chicago Transit Authority (CTA)","archived":false,"fork":false,"pushed_at":"2026-02-26T18:53:44.000Z","size":396,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-27T00:35:52.151Z","etag":null,"topics":["chicago","cta","java","spring-boot","transit"],"latest_commit_sha":null,"homepage":"https://cta4j.app","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lbkulinski.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-15T23:49:47.000Z","updated_at":"2026-02-26T18:48:16.000Z","dependencies_parsed_at":"2025-10-26T07:15:49.629Z","dependency_job_id":"0dc43ef7-fb5d-4d88-b029-e12d88af6d1b","html_url":"https://github.com/lbkulinski/cta4j-api","commit_stats":null,"previous_names":["lbkulinski/cta4j-api"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/lbkulinski/cta4j-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta4j-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta4j-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta4j-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta4j-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbkulinski","download_url":"https://codeload.github.com/lbkulinski/cta4j-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbkulinski%2Fcta4j-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30208801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chicago","cta","java","spring-boot","transit"],"created_at":"2026-03-07T06:02:26.344Z","updated_at":"2026-03-07T06:02:31.679Z","avatar_url":"https://github.com/lbkulinski.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚏 cta4j API\n\nReal‑time Chicago Transit Authority (CTA) data — simple, fast, and free.\n\nThe **cta4j API** powers [cta4j.app](https://cta4j.app) and provides clean, unified endpoints for accessing CTA **train** and **bus** data. Built for developers who want reliable, human‑friendly transit information without managing raw XML feeds or API keys.\n\n---\n\n## 🚆 Overview\n\nThe API aggregates CTA’s public data into an easy-to-use REST interface:\n\n* Consistent JSON schema for both train and bus predictions\n* Simplified endpoints and identifiers (no API keys required)\n* Designed for public consumption by apps, dashboards, or personal projects\n\n---\n\n## 🌐 Base URL\n\n```\nhttps://api.cta4j.app\n```\n\n\u003e All responses are JSON.\n\n---\n\n## 📄 OpenAPI Specification\n\nThe full OpenAPI spec is available for developers who want to generate clients or explore endpoints interactively.\n\n**Endpoints:**\n\n* `GET /v3/api-docs` — JSON format (OpenAPI 3.1)\n\nYou can view or import it directly in tools like [Swagger Editor](https://editor.swagger.io/) or [Postman](https://www.postman.com/).\n\nExample:\n\n```bash\ncurl -s https://api.cta4j.app/v3/api-docs | jq '.'\n```\n\n---\n\n## 🧩 Example Usage\n\n### Fetch upcoming train arrivals for a station\n\n```bash\ncurl -s https://api.cta4j.app/api/stations/40380/arrivals | jq '[.[] | {stationName, etaLabel, arrivalTime, route}]'\n```\n\n### Follow a train by its run number\n\n```bash\ncurl -s https://api.cta4j.app/api/trains/902 | jq '{coordinates, arrivals: (.arrivals[0:3])}'\n```\n\n### Fetch upcoming bus arrivals for a stop\n\n```bash\ncurl -s https://api.cta4j.app/api/routes/22/stops/14734/arrivals | jq '[.[] | {routeDesignator, destination, etaLabel}]'\n```\n\n---\n\n## 📚 Endpoints\n\n### Trains\n\n* `GET /api/trains/{run}` — Get details and upcoming stops for a specific train.\n* `GET /api/stations` — List all CTA train stations.\n* `GET /api/stations/{stationId}/arrivals` — Get upcoming train arrivals at a given station.\n\n### Buses\n\n* `GET /api/routes` — List all bus routes.\n* `GET /api/routes/{routeId}/directions` — Get available directions for a bus route.\n* `GET /api/routes/{routeId}/directions/{direction}/stops` — List stops for a route and direction.\n* `GET /api/routes/{routeId}/stops/{stopId}/arrivals` — Get upcoming bus arrivals for a stop.\n* `GET /api/buses/{id}` — Get live data for a specific bus.\n\n---\n\n## ⚙️ Conventions\n\n* **Timestamps**: ISO‑8601 UTC (e.g., `2025‑10‑25T18:41:00Z`)\n* **Units**: Distances in feet; headings in degrees\n* **Flags**: Boolean fields like `approaching`, `delayed`, `scheduled` simplify UI logic\n\n---\n\n## 🧠 Design Goals\n\n* **No keys required** → instant, public access\n* **Consistent schema** → same shape for trains and buses\n* **Lightweight** → built for developers and hobbyists\n* **Transparent** → no rate throttling for reasonable use\n\n---\n\n## 🛠️ Planned Improvements\n\n* Add **service alerts** endpoint\n* Add **test coverage**\n* Add **real‑time updates via WebSocket/SSE**\n* Expand to support **Pace**, **Metra**, and other cities\n* Improve **data caching** and **error granularity**\n\nHave an idea or feature request? Open an issue — contributions are welcome!\n\n---\n\n## 🧾 License\n\nThis project is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).\nCopyright © 2025 Logan Bailey Kulinski.\n\n---\n\n## 🗺️ Links\n\n* [Project Website](https://cta4j.app)\n* [Java SDK](https://github.com/lbkulinski/cta4j-java-sdk)\n* [CTA Developer Portal](https://www.transitchicago.com/developers/)\n* [Bus Tracker API](https://www.transitchicago.com/developers/bustracker/)\n* [Train Tracker API](https://www.transitchicago.com/developers/traintrackerapply/)\n\n---\n\n*Built with ❤️ by [Logan Kulinski](https://lbku.net)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbkulinski%2Fcta4j-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbkulinski%2Fcta4j-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbkulinski%2Fcta4j-api/lists"}