Contents
Documentation
REST API - Feed versions
Feed versions
The REST API feed versions endpoint provides a fast and flexible way to browse static GTFS feed versions contained in Transitland's archive.
Request overview
The feed versions API provides a number of searching and filtering parameters; results are based on this GraphQL query.
Request parameters
GET/api/v2/rest/feed_versions Search for feed versions
GET/api/v2/rest/feed_versions.{format} Request feed versions in specified format
GET/api/v2/rest/feed_versions/{feed_version_key} Request a feed version by ID or SHA1
GET/api/v2/rest/feed_versions/{feed_version_key}.{format} Request a feed version by ID or SHA1 in specified format
GET/api/v2/rest/feeds/{feed_key}/feed_versions Request feed versions by feed ID or Onestop ID
| Parameter | Type | Description | Example |
|---|---|---|---|
| feed_version_key | string | Feed version lookup key; can be an integer ID or a SHA1 value | |
| feed_key | string | Feed lookup key; can be an integer ID or Onestop ID | |
| sha1 | string | Feed version SHA1 | sha1=e535eb2b3... |
| feed_onestop_id | string | Feed OnestopID | feed_onestop_id=f-sf~bay~area~rg |
| fetched_before | string | Filter for feed versions fetched earlier than given date time in UTC | fetched_before=2023-01-01T00:00:00Z |
| fetched_after | string | Filter for feed versions fetched since given date time in UTC | fetched_after=2023-01-01T00:00:00Z |
| id | integer | Search for a specific internal ID | |
| after | integer | Pagination cursor value. This should be treated as an opaque value created by the server and returned as the link to the next result page, which may be empty. For historical reasons, this is based on the integer record ID values, but that should not be assumed to be the case in the future. | |
| limit | integer | Maximum number of records to return | limit=1 |
| format | string enum | Response format | format=geojson |
| radius | number | Search radius (meters); requires lat and lon | lon=-122.3&lat=37.8&radius=1000 |
| lon | number | Longitude | |
| lat | number | Latitude | |
| bbox | string | Geographic search using a bounding box, with coordinates in (min_lon, min_lat, max_lon, max_lat) order as a comma separated string | bbox=-122.269,37.807,-122.267,37.808 |
Response format
feed_versions
array: FeedVersionList or search for FeedVersions (specific archived import of a Feed)
id
integerInternal integer ID
sha1
stringSHA1 hash of the zip file
Exampleab5bdc8b6cedd06792d42186a9b542504c5eef9a
fetched_at
stringTime when the file was fetched from the URL
Example2019-11-15T00:45:55.409906
url
stringURL used to fetch the file
earliest_calendar_date
stringThe earliest date with scheduled service
Example2020-01-01
latest_calendar_date
stringThe latest date with scheduled service
Example2020-12-31
geometry
Convex hull of all stop coordinates in this feed version
feed
object: FeedFeed associated with this feed version
onestop_id
stringOnestop ID for this feed.
Format:
f-geohash-name.
Example: f-9q9-bart.name
stringA common name for this feed; alternatively use
associated_operators[].namespec
object: FeedSpecTypesType of feed:
GTFS, GTFS_RT, GBFS, or MDSfiles
array: FeedVersionFileInfoMetadata for each file in the GTFS archive
name
stringGTFS file name (e.g.
stops.txt)rows
integerNumber of data rows in the file (CSV files only)
sha1
stringSHA1 hash of the file
header
stringComma-joined column header row of the file (CSV files only)
csv_like
booleanTrue if the file is parseable as CSV
size
integerFile size, in bytes
service_levels
array: FeedVersionServiceLevelService levels (in seconds per day) for this feed version
start_date
stringStart date of this week
Example2019-11-15
end_date
stringEnd date of this week
Example2019-11-15
monday
integerSeconds of service scheduled on Monday
tuesday
integerSeconds of service scheduled on Tuesday
wednesday
integerSeconds of service scheduled on Wednesday
thursday
integerSeconds of service scheduled on Thursday
friday
integerSeconds of service scheduled on Friday
saturday
integerSeconds of service scheduled on Saturday
sunday
integerSeconds of service scheduled on Sunday
feed_infos
array: FeedInfoRecords from this feed version's
feed_info.txtdefault_lang
stringGTFS
feed_info.default_langfeed_contact_email
stringGTFS
feed_info.feed_contact_emailfeed_contact_url
stringGTFS
feed_info.feed_contact_urlfeed_end_date
stringGTFS
feed_info.feed_end_dateExample2019-11-15
feed_lang
stringGTFS
feed_info.feed_langfeed_publisher_name
stringGTFS
feed_info.feed_publisher_namefeed_start_date
stringGTFS
feed_info.feed_start_dateExample2019-11-15
feed_publisher_url
stringGTFS
feed_info.feed_publisher_urlfeed_version_gtfs_import
object: FeedVersionGtfsImportDatabase import status
in_progress
booleanTrue if the import is currently running
success
booleanTrue if the import completed successfully
exception_log
stringError log accumulated during import; empty on success
warning_count
Counts of warnings raised during import, keyed by file name
skip_entity_error_count
Counts of entities skipped due to errors, keyed by file name
skip_entity_filter_count
Counts of entities skipped due to import filters, keyed by file name
skip_entity_marked_count
Counts of entities skipped by the marker filter, keyed by file name
interpolated_stop_time_count
integerNumber of stop_times whose arrival/departure times were filled in by interpolation during import
Downloading source GTFS
See also downloading static GTFS feed versions.
GET/api/v2/rest/feed_versions/{feed_version_key}/download Download feed version
| Parameter | Type | Description | Example |
|---|---|---|---|
| feed_version_key | string | Feed version lookup key; can be an integer ID or a SHA1 value |
Description Download this feed version GTFS zip for this feed, if redistribution is allowed by the source feed's license. Available only using Transitland professional or enterprise plan API keys.