Skip to content
gtfs.media

GTFS Media API

The read API exposed by a gtfs.media deployment. Static GTFS files are modelled as addressable resources under a feed alias; GTFS-Realtime feeds are decoded server-side and republished as JSON.

https://{host}/gtfs/api/v2

Common parameters

Most operations accept these. They are listed once here rather than on every operation.

Parameters most operations accept
Name In Type What it does
feed_alias path string Alias of the feed to read, from /feeds. A deployment may host several feed versions at once.
limit query integer Items per page. Collections default to 500.
offset query integer Items to skip. Prefer following meta.links.next.
_format query json Response format. Send Accept: application/json instead if you prefer; one or the other is required.

Discovery

Finding out what a deployment serves.

GET / gtfs module

List every resource the deployment serves

Returns each REST resource with its URI template. Useful for discovering the surface of an unfamiliar deployment.

Also takes _format.

Example response
{
  "meta": {
    "totalCount": 24,
    "dataCount": 24,
    "limit": 0,
    "offset": 0
  },
  "data": [
    {
      "id": "gtfs_stop_resource",
      "label": "GTFS stop REST",
      "uri_template": "https://transit.example.gov/gtfs/api/v2/feeds/{feed_alias}/stops/{stop_id}"
    }
  ]
}

GET /feeds gtfs module

List available feeds

Every feed loaded into the deployment, with its alias.

Also takes _format.

Example response
{
  "meta": {
    "totalCount": 2,
    "dataCount": 2,
    "links": {
      "self": "https://transit.example.gov/gtfs/api/v2/feeds",
      "next": false,
      "previous": false
    },
    "limit": 0,
    "offset": 0
  },
  "data": [
    {
      "name": "Autumn 2026 service change",
      "alias": "autumn-2026",
      "link": "https://transit.example.gov/gtfs/api/v2/feeds/autumn-2026"
    }
  ]
}

GET /feeds/{feed_alias} gtfs module

Describe one feed

Feed metadata, plus links to its collections in meta.links.

Also takes feed_alias, _format.

Static GTFS

Scheduled service, imported from the agency's GTFS feed.

GET /feeds/{feed_alias}/agencies gtfs module

List agencies

Contents of agency.txt.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/agencies/{agency_id} gtfs module

Get one agency

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}
Name In Type What it does
agency_id required path string An agency_id from the feed.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes gtfs module

List routes

Contents of routes.txt for one agency.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes
Name In Type What it does
agency_id required path string An agency_id from the feed.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id} gtfs module

Get one route

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/geojson gtfs module

Get a route's shape as GeoJSON

A GeoJSON Feature whose geometry is a MultiLineString covering every shape the route's trips reference. Route identity and styling (route_color, route_text_color) travel in properties, ready to hand to a map library.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/geojson
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/directions gtfs module

List a route's directions

The directions the route operates in, derived from its trips. Direction names come from the feed where present.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/directions
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/directions/{direction_id} gtfs module

Get one direction of a route

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/directions/{direction_id}
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.
direction_id required path 0 | 1 GTFS direction id.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/stops/{direction_ids} gtfs module

List the stops a route serves

Stops along the route, in service order, for one or more directions.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/stops/{direction_ids}
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.
direction_ids required path string A direction id, or several separated by commas.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips gtfs module

List a route's trips

Contents of trips.txt for this route. Large routes run to thousands of trips; page with limit and offset.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips/{trip_id} gtfs module

Get one trip

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips/{trip_id}
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.
trip_id required path string A trip_id from the feed.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips/{trip_id}/stop_times gtfs module

List a trip's stop times

Contents of stop_times.txt for the trip, in stop_sequence order. Times may exceed 24 hours ("25:10:00") for service running past midnight, per the GTFS specification.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips/{trip_id}/stop_times
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.
trip_id required path string A trip_id from the feed.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/schedules/{service_id}/{direction_id} gtfs module

Get a route timetable

A timetable for one route, service and direction: the ordered stops and the trips that call at them, assembled ready to render as a grid.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/schedules/{service_id}/{direction_id}
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.
service_id required path string A service_id from calendar.txt.
direction_id required path 0 | 1 GTFS direction id.

Also takes feed_alias, _format.

Example response
{
  "meta": {
    "totalCount": 0,
    "dataCount": 0,
    "limit": 500,
    "offset": 0
  },
  "data": {
    "agency_id": "SFMTA",
    "route_id": "1",
    "service_id": "2",
    "direction_id": "0",
    "schedule": {
      "stops": [
        {
          "label": "Clay St & Drumm St (4015)",
          "stop_id": "4015",
          "stop_name": "Clay St & Drumm St"
        },
        {
          "label": "Sacramento St & Kearny St (3892)",
          "stop_id": "3892",
          "stop_name": "Sacramento St & Kearny St"
        }
      ],
      "trips": [
        {
          "label": "Geary + 33rd Avenue",
          "trip_id": "12053368",
          "route_id": "1",
          "service_id": "2",
          "direction_id": "0",
          "stop_times": [
            null,
            {
              "stop_id": 3892,
              "arrival_time": "4:38am",
              "arrival_time_seconds": 16680
            }
          ]
        }
      ]
    }
  }
}

GET /feeds/{feed_alias}/services gtfs module

List service calendars

Service calendars from calendar.txt. Each item carries the weekly pattern and date range; fetch a single service to add its exceptions from calendar_dates.txt.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/services/{service_id} gtfs module

Get one service calendar

The weekly service pattern, the date range it applies over, and any exceptions from calendar_dates.txt.

Parameters for GET /feeds/{feed_alias}/services/{service_id}
Name In Type What it does
service_id required path string A service_id from calendar.txt.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/shapes/{shape_id} gtfs module

Get a shape's points

The ordered points of one shape from shapes.txt. For route geometry ready to draw, prefer the route GeoJSON resource.

Parameters for GET /feeds/{feed_alias}/shapes/{shape_id}
Name In Type What it does
shape_id required path string A shape_id from the feed.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/stops gtfs module

List stops

Contents of stops.txt. Systems commonly have thousands of stops and the default page is 500; follow meta.links.next to page through.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/stops/{stop_id} gtfs module

Get one stop

Parameters for GET /feeds/{feed_alias}/stops/{stop_id}
Name In Type What it does
stop_id required path string A stop_id from the static feed.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/stops/{stop_id}/routes gtfs module

List the routes calling at a stop

Parameters for GET /feeds/{feed_alias}/stops/{stop_id}/routes
Name In Type What it does
stop_id required path string A stop_id from the static feed.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/wkt gtfs module

Get a route's shape as WKT

The same geometry as the GeoJSON resource, as a Well-Known Text MULTILINESTRING. Useful for loading straight into PostGIS or another geospatial tool. The payload is a bare string, not an object.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/wkt
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.

Also takes feed_alias, _format.

Example response
{
  "meta": {
    "totalCount": 0,
    "dataCount": 0,
    "limit": 500,
    "offset": 0
  },
  "data": "MULTILINESTRING((-122.397 37.7954,-122.3968 37.7955))"
}

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips/{trip_id}/geojson gtfs module

Get a trip's shape as GeoJSON

A GeoJSON Feature for one trip's path — a LineString, where the route resource returns a MultiLineString covering every variant. properties carries the trip's identity and headsign.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips/{trip_id}/geojson
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.
trip_id required path string A trip_id from the feed.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips/{trip_id}/stops gtfs module

List the stops a trip calls at

Stops on this trip, in stop_sequence order.

Parameters for GET /feeds/{feed_alias}/agencies/{agency_id}/routes/{route_id}/trips/{trip_id}/stops
Name In Type What it does
agency_id required path string An agency_id from the feed.
route_id required path string A route_id from the feed.
trip_id required path string A trip_id from the feed.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/shapes gtfs module

List shape ids

Every shape_id in the feed, with a link to its points. Identifiers only — fetch a shape for its geometry.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/shapes/{shape_id}/geojson gtfs module

Get a shape as GeoJSON

A GeoJSON Feature whose geometry is the shape's LineString. Carries no properties; the shape id is in the request.

Parameters for GET /feeds/{feed_alias}/shapes/{shape_id}/geojson
Name In Type What it does
shape_id required path string A shape_id from the feed.

Also takes feed_alias, _format.

GET /feeds/{feed_alias}/stops/{stop_id}/directions gtfs module

List the route directions serving a stop

Every route-and-direction combination that calls at this stop. Each item embeds the full route, so a departure board can be built from one request.

Parameters for GET /feeds/{feed_alias}/stops/{stop_id}/directions
Name In Type What it does
stop_id required path string A stop_id from the static feed.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/stops/{stop_id}/trips gtfs module

List the trips calling at a stop

Every trip that stops here. Busy stops run to thousands of trips across all service days; page with limit and offset.

Parameters for GET /feeds/{feed_alias}/stops/{stop_id}/trips
Name In Type What it does
stop_id required path string A stop_id from the static feed.

Also takes feed_alias, limit, offset, _format.

GET /feeds/{feed_alias}/stops/{stop_id}/stop_times gtfs module

List scheduled calls at a stop

Every scheduled arrival and departure at this stop, across all trips and service days — the timetable for one stop. Filter by service day using the service_id on the referenced trips.

Parameters for GET /feeds/{feed_alias}/stops/{stop_id}/stop_times
Name In Type What it does
stop_id required path string A stop_id from the static feed.

Also takes feed_alias, limit, offset, _format.

Realtime

GTFS-Realtime, decoded from Protobuf and served as JSON.

GET /rt/tripupdates/{stop_id} gtfs_rt module

Predicted arrivals and departures at a stop

GTFS-Realtime TripUpdate entities affecting this stop, decoded from Protobuf. Realtime feeds may identify stops differently from the static feed — many agencies publish stop_code in realtime and stop_id in the schedule. Use the identifier your realtime feed uses. meta.last_fetched is the Unix timestamp of the last successful poll of the upstream feed. Compare it against your own clock to decide whether a prediction is still trustworthy.

Parameters for GET /rt/tripupdates/{stop_id}
Name In Type What it does
stop_id required path string The stop identifier as it appears in the realtime feed.

Also takes _format.

Example response
{
  "meta": {
    "totalCount": 16,
    "dataCount": 16,
    "limit": 500,
    "offset": 0,
    "last_fetched": 1787101680
  },
  "data": [
    {
      "trip": {
        "tripId": "12066664_M21",
        "routeId": "25",
        "directionId": 0,
        "startDate": "20260818",
        "scheduleRelationship": "SCHEDULED",
        "tripHeadsign": "Treasure Island"
      },
      "vehicle": {
        "id": "8744",
        "label": "8744",
        "licensePlate": ""
      },
      "stopTimeUpdate": [
        {
          "stopSequence": 1,
          "stopId": "17948",
          "departure": {
            "delay": 0,
            "time": "1787101800"
          }
        },
        {
          "stopSequence": 2,
          "stopId": "18000",
          "arrival": {
            "delay": 117,
            "time": "1787102517"
          }
        }
      ],
      "timestamp": "1787101656"
    }
  ]
}

GET /rt/vehicles/{route_id} gtfs_rt module

Live vehicle positions on a route

GTFS-Realtime VehiclePosition entities for the route, with coordinates, bearing and speed where the agency publishes them.

Parameters for GET /rt/vehicles/{route_id}
Name In Type What it does
route_id required path string A route_id from the feed.

Also takes _format.

Example response
{
  "meta": {
    "totalCount": 12,
    "dataCount": 12,
    "limit": 500,
    "offset": 0,
    "last_fetched": 1787102550
  },
  "data": [
    {
      "trip": {
        "tripId": "12053257_M21",
        "routeId": "1",
        "directionId": 1,
        "startDate": "20260818",
        "scheduleRelationship": "SCHEDULED"
      },
      "vehicle": {
        "id": "5737",
        "label": "5737",
        "licensePlate": ""
      },
      "position": {
        "latitude": 37.795387,
        "longitude": -122.39716,
        "bearing": 75,
        "speed": 0
      },
      "currentStopSequence": 48,
      "stopId": "14015",
      "currentStatus": "STOPPED_AT",
      "timestamp": "1787102547",
      "occupancyStatus": "EMPTY"
    }
  ]
}

GET /rt/alerts/{entity_type}/{entity_id} gtfs_rt module

Service alerts affecting an entity

GTFS-Realtime Alert entities whose informed entities include the one addressed. Returns an empty array when nothing is disrupted.

Parameters for GET /rt/alerts/{entity_type}/{entity_id}
Name In Type What it does
entity_type required path stop | stops | route | routes | trip | trips | agency | agencies The kind of entity the alert is attached to. Singular and plural are both accepted — the server strips one trailing s — so stop and stops behave identically.
entity_id required path string Identifier of that entity in the realtime feed.

Also takes _format.

Example response
{
  "meta": {
    "totalCount": 1,
    "dataCount": 1,
    "limit": 500,
    "offset": 0,
    "last_fetched": 1787101680
  },
  "data": [
    {
      "id": "alert_4471",
      "headerText": {
        "translation": [
          {
            "text": "Route 17: weekend detour",
            "language": "en"
          },
          {
            "text": "Ruta 17: desvío de fin de semana",
            "language": "es"
          }
        ]
      },
      "descriptionText": {
        "translation": [
          {
            "text": "Stops 4030-4034 are closed. Board at Elm St.",
            "language": "en"
          }
        ]
      },
      "informedEntity": [
        {
          "agencyId": "SFMTA",
          "routeId": "17",
          "stopId": null
        }
      ]
    }
  ]
}

Display

Operator annotations and overrides attached to GTFS entities.

GET /display/annotations/{entity_type}/{entity_id} gtfs_display module

Operator annotations for an entity

Notes and overrides staff have attached to a GTFS entity — a boarding change, a temporary closure, a message for one route at one stop. Only annotations currently within their active time window are returned. body is text-format processed HTML.

Parameters for GET /display/annotations/{entity_type}/{entity_id}
Name In Type What it does
entity_type required path stops | routes | trips | agency The GTFS entity type the annotation is attached to, matching the type used when the annotation was created.
entity_id required path string Identifier of that entity in the static feed.

Also takes _format.

Example response
{
  "meta": {
    "totalCount": 1,
    "dataCount": 1,
    "limit": 500,
    "offset": 0
  },
  "data": [
    {
      "id": 12,
      "annotation_type": "override",
      "entity_type": "stop",
      "entity_id": "4021",
      "secondary_entity_type": "route",
      "secondary_entity_id": "17",
      "body": "<p>Board across the street this weekend.</p>",
      "override_entity_id": "4099",
      "active": true
    }
  ]
}

Shapes

What the operations above return, inside the standard envelope.

Envelope

The wrapper every successful response shares. data is an object for single resources and an array for collections.

Fields of Envelope
Field Type What it is
meta Meta Counts, paging state and related links.
data The payload; shape depends on the resource.

Meta

Counts, paging state and related links.

Fields of Meta
Field Type What it is
totalCount integer Total items matching the request, ignoring paging.
dataCount integer Items in this response.
limit integer Page size in effect. 0 where paging does not apply.
offset integer Items skipped.
links Links Related resources. Absent keys mean the relation does not apply. next and previous are false rather than null when there is no further page — test truthiness, not presence.
last_fetched integer Realtime resources only. Unix timestamp of the last successful poll of the upstream GTFS-Realtime feed.

Error

Error document returned for 4xx and 5xx responses.

Fields of Error
Field Type What it is
message string Human-readable explanation.

ResourceDescriptor

One resource advertised by the API root.

Fields of ResourceDescriptor
Field Type What it is
id string Internal plugin id.
label string Human-readable name.
uri_template string RFC 6570 URI template for the resource.

Feed

An imported GTFS feed.

Fields of Feed
Field Type What it is
name string Name given at import
alias string Alias used in paths.
link string uri The feed's own resource.

Agency

A row of agency.txt.

Fields of Agency
Field Type What it is
label string Human-readable label for the row.
agency_id string
agency_name string
agency_url string uri
agency_timezone string
agency_lang string,null
agency_phone string,null
agency_fare_url string,null
agency_email string,null
links Links Related resources. Absent keys mean the relation does not apply. next and previous are false rather than null when there is no further page — test truthiness, not presence.

Route

A row of routes.txt. Deployments may enrich route payloads with their own fields through hook_gtfs_route_data_alter() — an agency logo URL, a route map image. Treat unrecognised keys as additive rather than an error.

Fields of Route
Field Type What it is
label string
route_id string
agency_id string
route_short_name string,null Public-facing designation, e.g. "38R".
route_long_name string,null
route_desc string,null
route_type string GTFS route type as a string, e.g. "3" for bus.
route_url string,null
route_color string,null Six-digit hex, no leading "#".
route_text_color string,null
route_sort_order string,null
continuous_pickup string,null
continuous_drop_off string,null
network_id string,null
links Links Related resources. Absent keys mean the relation does not apply. next and previous are false rather than null when there is no further page — test truthiness, not presence.

Stop

A row of stops.txt.

Fields of Stop
Field Type What it is
label string
stop_id string
stop_code string,null Rider-facing code
stop_name string
stop_desc string,null
stop_lat string Latitude as a string.
stop_lon string Longitude as a string.
zone_id string,null
stop_url string,null
location_type string,null
parent_station string,null
stop_timezone string,null
wheelchair_boarding string,null
platform_code string,null
tts_stop_name string,null Pronunciation hint for speech output.
level_id string,null
links Links Related resources. Absent keys mean the relation does not apply. next and previous are false rather than null when there is no further page — test truthiness, not presence.

Trip

A row of trips.txt.

Fields of Trip
Field Type What it is
label string
trip_id string
route_id string
service_id string
trip_headsign string,null Destination shown to riders.
trip_short_name string,null
direction_id string,null
block_id string,null
shape_id string,null
wheelchair_accessible string,null
bikes_allowed string,null
links Links Related resources. Absent keys mean the relation does not apply. next and previous are false rather than null when there is no further page — test truthiness, not presence.

StopTime

A row of stop_times.txt.

Fields of StopTime
Field Type What it is
label string
trip_id string
arrival_time string,null May exceed 24h, e.g. "25:10:00".
departure_time string,null
stop_id string
location_group_id string,null
stop_sequence string Order within the trip
stop_headsign string,null
start_pickup_drop_off_window string,null
end_pickup_drop_off_window string,null
pickup_type string,null
drop_off_type string,null
continuous_pickup string,null
continuous_drop_off string,null
shape_dist_traveled string,null
timepoint string,null
pickup_booking_rule_id string,null
drop_off_booking_rule_id string,null
links Present when listed for a stop; a trip's own stop times omit it.

Direction

A direction a route operates in.

Fields of Direction
Field Type What it is
label string
route_id string
direction_id string
direction string Name of the direction.
route The full route, embedded when the direction is reached through a stop, so a departure board needs one request. Absent on a route's own directions.
service The service calendar, where the deployment resolves one. Often null.
links Links Related resources. Absent keys mean the relation does not apply. next and previous are false rather than null when there is no further page — test truthiness, not presence.

Service

A service calendar: which days it runs, over what date range, and the dates that deviate.

Fields of Service
Field Type What it is
label string
service_id string
monday string "1" when service runs, "0" when not.
tuesday string
wednesday string
thursday string
friday string
saturday string
sunday string
start_date string date-time First day of service, ISO 8601 — not GTFS YYYYMMDD.
end_date string date-time Last day of service, ISO 8601.
exceptions array of object Dates that deviate, from calendar_dates.txt. Returned by the single-service resource; the collection omits it.
links Links Related resources. Absent keys mean the relation does not apply. next and previous are false rather than null when there is no further page — test truthiness, not presence.

ShapeStub

Item shape returned by the shapes collection — an identifier and a link to its points, not the geometry itself.

Fields of ShapeStub
Field Type What it is
shape_id string
links Links Related resources. Absent keys mean the relation does not apply. next and previous are false rather than null when there is no further page — test truthiness, not presence.

ShapePoint

One point of a shape, from shapes.txt.

Fields of ShapePoint
Field Type What it is
label string
shape_id string
shape_pt_lat string
shape_pt_lon string
shape_pt_sequence string
shape_dist_traveled string,null

Schedule

A timetable for one route, service and direction, pre-assembled as a grid: schedule.stops are the rows and schedule.trips the columns. Each trip's stop_times array is positionally aligned to schedule.stops and always the same length: index n is that trip's call at stops[n], or null where the trip skips it. Render the grid by walking the two in step — do not match on stop_id.

Fields of Schedule
Field Type What it is
agency_id string
route_id string
service_id string
direction_id string
schedule object The grid itself.

ScheduleTrip

ScheduleCell

One call in a timetable grid.

Fields of ScheduleCell
Field Type What it is
stop_id integer The stop for this cell. Note this is an integer here, while Stop.stop_id elsewhere in the API is a string.
arrival_time string Arrival formatted for display.
arrival_time_seconds integer The same arrival as seconds after midnight, for sorting and comparison. Values above 86400 are service past midnight.

GeoJsonFeature

A GeoJSON Feature (RFC 7946). Coordinates are [longitude, latitude] and are real numbers, unlike the string coordinates on static resources. Geometry and properties depend on which resource produced it: a route returns a MultiLineString covering every shape its trips use, with route identity and styling in properties; a trip returns the…

Fields of GeoJsonFeature
Field Type What it is
type string
properties object,null Identity and styling for the feature. Route features carry the route fields below; trip features carry trip_id, route_id, service_id, trip_headsign and block_id; shape features carry none.
geometry object

TripUpdate

A GTFS-Realtime TripUpdate. Field names follow the Protobuf schema in camelCase.

Fields of TripUpdate
Field Type What it is
trip RtTripDescriptor GTFS-Realtime TripDescriptor — which scheduled trip an update refers to. Shared by trip updates and vehicle positions.
vehicle RtVehicleDescriptor GTFS-Realtime VehicleDescriptor — which vehicle is running the trip.
stopTimeUpdate array of object Predictions for the stops ahead on this trip.
timestamp string Unix timestamp of this update

RtTripDescriptor

GTFS-Realtime TripDescriptor — which scheduled trip an update refers to. Shared by trip updates and vehicle positions.

Fields of RtTripDescriptor
Field Type What it is
tripId string
routeId string
directionId integer Direction as an integer here, unlike the string on static trips.
startDate string Service date the trip started, YYYYMMDD.
scheduleRelationship string How this trip relates to the schedule.
tripHeadsign string,null

RtVehicleDescriptor

GTFS-Realtime VehicleDescriptor — which vehicle is running the trip.

Fields of RtVehicleDescriptor
Field Type What it is
id string Agency's vehicle identifier.
label string,null Fleet number shown to riders.
licensePlate string,null Often an empty string where the agency does not publish it.

StopTimeEvent

A predicted arrival or departure.

Fields of StopTimeEvent
Field Type What it is
time string Predicted Unix timestamp
delay integer Seconds behind schedule; negative is early. Absent when not published.

VehiclePosition

A GTFS-Realtime VehiclePosition.

Fields of VehiclePosition
Field Type What it is
trip RtTripDescriptor GTFS-Realtime TripDescriptor — which scheduled trip an update refers to. Shared by trip updates and vehicle positions.
vehicle RtVehicleDescriptor GTFS-Realtime VehicleDescriptor — which vehicle is running the trip.
position object Coordinates here are numbers, not strings.
currentStopSequence integer
currentStatus string Where the vehicle is relative to stopId — GTFS-Realtime's VehicleStopStatus enum.
stopId string
timestamp string
occupancyStatus string GTFS-Realtime occupancy enum, where the agency publishes it.

Alert

A GTFS-Realtime Alert. Text fields are TranslatedStrings; pick the translation matching your locale.

Fields of Alert
Field Type What it is
id string
headerText TranslatedString GTFS-Realtime translated text.
descriptionText TranslatedString GTFS-Realtime translated text.
informedEntity array of object The stops, routes or trips this alert applies to.

TranslatedString

GTFS-Realtime translated text.

Fields of TranslatedString
Field Type What it is
translation array of object

Annotation

An operator note or override attached to a GTFS entity.

Fields of Annotation
Field Type What it is
id integer
annotation_type comment | override comment adds a message; override redirects predictions to another entity.
entity_type string
entity_id string
secondary_entity_type string,null Narrows the annotation, e.g. one route at one stop.
secondary_entity_id string,null
body string Processed HTML.
override_entity_id string,null Replacement entity, for overrides.
active boolean Whether it is within its time window now.