{"id":15617889,"url":"https://github.com/data-creative/next-train-api","last_synced_at":"2025-10-13T19:31:04.124Z","repository":{"id":87115467,"uuid":"92795550","full_name":"data-creative/next-train-api","owner":"data-creative","description":"Serves any GTFS feed as a JSON API! :train: :train:","archived":false,"fork":false,"pushed_at":"2018-12-29T02:31:44.000Z","size":324,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T17:38:46.506Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/data-creative.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2017-05-30T03:42:36.000Z","updated_at":"2024-12-28T13:31:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ee26323-1957-4283-aecd-8b39d1096b58","html_url":"https://github.com/data-creative/next-train-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/data-creative/next-train-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-creative%2Fnext-train-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-creative%2Fnext-train-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-creative%2Fnext-train-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-creative%2Fnext-train-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/data-creative","download_url":"https://codeload.github.com/data-creative/next-train-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/data-creative%2Fnext-train-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016920,"owners_count":26085888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-03T08:00:51.187Z","updated_at":"2025-10-13T19:31:04.118Z","avatar_url":"https://github.com/data-creative.png","language":"Ruby","readme":"# NextTrain API\n\nThe **Next Train API** provides a JSON web service for any GTFS feed. Deploy this source code to your own Heroku server to set up an API for your own agency's feed. Let me know how it goes. I'm happy to support you!\n\nExample request URL: `/api/v1/trains.json?date=2017-12-17\u0026origin=BRN\u0026destination=NHV`\n\nExample response:\n\n```js\n{\n  \"query\": {\"origin\": \"BRN\", \"destination\": \"NHV\", \"date\": \"2017-12-17\"},\n  \"received_at\": \"2017-12-17 18:00:14 -0500\",\n  \"response_type\": \"Api::V1::TrainsResponse\",\n  \"errors\": [],\n  \"results\": [\n    {\n      \"schedule_id\": 22,\n      \"service_guid\": \"WE\",\n      \"route_guid\": \"SLE\",\n      \"trip_headsign\": \"Westbound\",\n      \"trip_guid\": \"3613\",\n      \"origin_departure\": \"2017-12-17T07:24:00-0500\",\n      \"destination_arrival\": \"2017-12-17T07:40:00-0500\",\n      \"stops\": [\n        {\n          \"stop_sequence\": 378,\n          \"stop_guid\": \"NLC\",\n          \"arrival_time\": \"2017-12-17T06:30:00-0500\",\n          \"departure_time\": \"2017-12-17T06:30:00-0500\"\n        },\n        {\n          \"stop_sequence\": 379,\n          \"stop_guid\": \"OSB\",\n          \"arrival_time\": \"2017-12-17T06:55:00-0500\",\n          \"departure_time\": \"2017-12-17T06:55:00-0500\"\n        },\n        {\n          \"stop_sequence\": 380,\n          \"stop_guid\": \"WES\",\n          \"arrival_time\": \"2017-12-17T07:00:00-0500\",\n          \"departure_time\": \"2017-12-17T07:00:00-0500\"\n        },\n        {\n          \"stop_sequence\": 381,\n          \"stop_guid\": \"CLIN\",\n          \"arrival_time\": \"2017-12-17T07:05:00-0500\",\n          \"departure_time\": \"2017-12-17T07:05:00-0500\"\n        },\n        {\n          \"stop_sequence\": 382,\n          \"stop_guid\": \"MAD\",\n          \"arrival_time\": \"2017-12-17T07:10:00-0500\",\n          \"departure_time\": \"2017-12-17T07:10:00-0500\"\n        },\n        {\n          \"stop_sequence\": 383,\n          \"stop_guid\": \"GUIL\",\n          \"arrival_time\": \"2017-12-17T07:16:00-0500\",\n          \"departure_time\": \"2017-12-17T07:16:00-0500\"\n        },\n        {\n          \"stop_sequence\": 384,\n          \"stop_guid\": \"BRN\",\n          \"arrival_time\": \"2017-12-17T07:24:00-0500\",\n          \"departure_time\": \"2017-12-17T07:24:00-0500\"\n        },\n        {\n          \"stop_sequence\": 385,\n          \"stop_guid\": \"ST\",\n          \"arrival_time\": \"2017-12-17T07:37:00-0500\",\n          \"departure_time\": \"2017-12-17T07:37:00-0500\"\n        },\n        {\n          \"stop_sequence\": 386,\n          \"stop_guid\": \"NHV\",\n          \"arrival_time\": \"2017-12-17T07:40:00-0500\",\n          \"departure_time\": \"2017-12-17T07:40:00-0500\"\n        }\n      ]\n    },\n    // ... etc. ...\n    {\n      \"schedule_id\": 22,\n      \"service_guid\": \"WE\",\n      \"route_guid\": \"SLE\",\n      \"trip_headsign\": \"Westbound\",\n      \"trip_guid\": \"3621\",\n      \"origin_departure\": \"2017-12-17T09:19:00-0500\",\n      \"destination_arrival\": \"2017-12-17T09:35:00-0500\",\n      \"stops\": [\n        {\n          \"stop_sequence\": 402,\n          \"stop_guid\": \"NLC\",\n          \"arrival_time\": \"2017-12-17T08:25:00-0500\",\n          \"departure_time\": \"2017-12-17T08:25:00-0500\"\n        },\n        {\n          \"stop_sequence\": 403,\n          \"stop_guid\": \"OSB\",\n          \"arrival_time\": \"2017-12-17T08:50:00-0500\",\n          \"departure_time\": \"2017-12-17T08:50:00-0500\"\n        },\n        {\n          \"stop_sequence\": 404,\n          \"stop_guid\": \"WES\",\n          \"arrival_time\": \"2017-12-17T08:55:00-0500\",\n          \"departure_time\": \"2017-12-17T08:55:00-0500\"\n        },\n        {\n          \"stop_sequence\": 405,\n          \"stop_guid\": \"CLIN\",\n          \"arrival_time\": \"2017-12-17T09:00:00-0500\",\n          \"departure_time\": \"2017-12-17T09:00:00-0500\"\n        },\n        {\n          \"stop_sequence\": 406,\n          \"stop_guid\": \"MAD\",\n          \"arrival_time\": \"2017-12-17T09:05:00-0500\",\n          \"departure_time\": \"2017-12-17T09:05:00-0500\"\n        },\n        {\n          \"stop_sequence\": 407,\n          \"stop_guid\": \"GUIL\",\n          \"arrival_time\": \"2017-12-17T09:11:00-0500\",\n          \"departure_time\": \"2017-12-17T09:11:00-0500\"\n        },\n        {\n          \"stop_sequence\": 408,\n          \"stop_guid\": \"BRN\",\n          \"arrival_time\": \"2017-12-17T09:19:00-0500\",\n          \"departure_time\": \"2017-12-17T09:19:00-0500\"\n        },\n        {\n          \"stop_sequence\": 409,\n          \"stop_guid\": \"ST\",\n          \"arrival_time\": \"2017-12-17T09:32:00-0500\",\n          \"departure_time\": \"2017-12-17T09:32:00-0500\"\n        },\n        {\n          \"stop_sequence\": 410,\n          \"stop_guid\": \"NHV\",\n          \"arrival_time\": \"2017-12-17T09:35:00-0500\",\n          \"departure_time\": \"2017-12-17T09:35:00-0500\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n## [Contributing](/CONTRIBUTING.md)\n\n## [Deploying](/DEPLOYING.md)\n\n## [License](/LICENSE.md)\n","funding_links":[],"categories":["Using Data","Recently Updated"],"sub_categories":["Agency Tools","[Oct 02, 2024](/content/2024/10/02/README.md)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdata-creative%2Fnext-train-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdata-creative%2Fnext-train-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdata-creative%2Fnext-train-api/lists"}