Contents
REST API - Feed versions
Feed versions
The REST API feed versions endpoint provides a fast and flexible way to browse
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 specifed 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: FeedVersionFeed versions
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 around all active stops in the feed version
feed
object: FeedFeed associated with this feed version
onestop_id
stringOnestopID for this feed
name
stringA common name for this feed. Optional. Alternatively use
associated_operators[].namespec
object: FeedSpecTypesType of feed
files
array: FeedVersionFileInfoMetadata for each text file present in the main directory of the zip archive
name
stringName of the file
rows
integerNumber of rows in the file
sha1
stringSHA1 hash of the file
header
stringNormalized header row of the file, if CSV-like
csv_like
booleanIs the file CSV-like?
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
integerNumber of seconds of service scheduled on the Monday of this week
tuesday
integerNumber of seconds of service scheduled on the Tuesday of this week
wednesday
integerNumber of seconds of service scheduled on the Wednesday of this week
thursday
integerNumber of seconds of service scheduled on the Thursday of this week
friday
integerNumber of seconds of service scheduled on the Friday of this week
saturday
integerNumber of seconds of service scheduled on the Saturday of this week
sunday
integerNumber of seconds of service scheduled on the Sunday of this week
feed_infos
array: FeedInfoFeed infos associated with this feed version, if imported
default_lang
stringGTFS feed_info.default_lang
feed_contact_email
stringGTFS feed_info.feed_contact_email
feed_contact_url
stringGTFS feed_info.feed_contact_url
feed_end_date
stringGTFS feed_info.feed_end_date
Example2019-11-15
feed_lang
stringGTFS feed_info.feed_lang
feed_publisher_name
stringGTFS feed_info.feed_publisher_name
feed_start_date
stringGTFS feed_info.feed_start_date
Example2019-11-15
feed_publisher_url
stringGTFS feed_info.feed_publisher_url
feed_version_gtfs_import
object: FeedVersionGtfsImportCurrent database import status of this feed version
in_progress
booleanIs the import currently in-progress
success
booleanDid the import complete successfully
exception_log
stringException log if any errors occurred during import
warning_count
Counts of warnings by file name
skip_entity_error_count
Counts of entities skipped due to errors
skip_entity_filter_count
Counts of entities skipped due to import filters
skip_entity_marked_count
Counts of entities skipped due to marker filters
interpolated_stop_time_count
integerNumber of stop times with arrival/departure times set by interpolation during import process
Downloading source GTFS
See also
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.