REST API - Feeds
Transitland is built on publicly available GTFS data contributed by our user community to the Transitland Atlas.
Feeds contain details on how to access transit information, including URLs to data sources in various formats (GTFS, GTFS-RT, GBFS, etc), license information, related feeds, details on how to make authorized requests, and feed version archives. Feed versions are archived (as .zip
files) and imported into the Transitland database for querying agencies, stops, routes, trips, etc.
Feed license information
To learn more about how Transitland classifies the licenses associated with a feed, see this overview of Transitland legal and licensing issues.
Request overview
The feeds API provides a number of searching and filtering parameters; results are based on this GraphQL query.
Request parameters
GET /api/v2/rest/feeds Feeds — Search for feeds
GET /api/v2/rest/feeds.{format} — Request feeds in specified format
GET /api/v2/rest/feeds/{feed_key} — Request a feed by ID or Onestop ID
GET /api/v2/rest/feeds/{feed_key}.{format} — Request a feed by ID or Onestop ID in format
Parameter | Type | Description | Example |
---|---|---|---|
id |
integer
0 ... unlimited | Search for a specific internal ID | |
feed_key |
string
| Equivalent to id (if an integer) or onestop_id (if string) | |
after |
integer
| Return records past this record ID | |
limit |
integer
0 ... 100 | Maximum number of records to return | limit=1 |
format | enum | Response format | format=geojson |
search |
string
| Full text search | search=caltrain |
onestop_id |
string
| Search for a specific Onestop ID | onestop_id=f-9q9-caltrain |
spec | string enum | Type of data contained in this feed | spec=gtfs |
fetch_error | string enum | Search for feeds with or without a fetch error | fetch_error=true |
tag_key |
string
| Search for feeds with a tag. Combine with tag_value also query for the value of the tag. | tag_key=gtfs_data_exchange |
tag_value |
string
| Search for feeds tagged with a given value. Must be combined with tag_key. | tag_key=unstable_url&tag_value=true |
Response format
(int64)
Example123
(string)
Examplef-9q9-bart
(string)
ExampleBay Area Rapid Transit
(string)
(string)
Exampleo-9q9-bart
(string array)
Example{ "0": "en-US" }
(object)
(string)
Examplehttps://www.bart.gov/dev/schedules/google_transit.zip
(string array)
(string)
(string)
(string)
(string)
(object)
(string)
ExampleCC-BY-4.0
(string)
Examplehttp://www.actransit.org/data-terms-and-conditions/
(string)
(string)
(string)
(string)
(string)
(string)
Exampledata provided by 511.org
(string)
ExampleYou must acknowledge the source of the provided data...
(object)
(string)
(string)
(string)
(object)
(string)
ExampleLineString
(number array)
Example[ [ -122.496, 37.778 ], [ -122.425, 37.786 ] ]
(object)
(string)
Example404 error
(datetime)
Example2019-11-15T00:45:55.409906
(datetime)
Example2019-11-15T00:45:55.409906
(object)
(object array)
Downloading source GTFS
GET /api/v2/rest/feeds/{feed_key}/download_latest_feed_version — Download latest feed version for this feed