GET /predictions

mbta.com:boston-mbta-transit

Summary:
Operation ID: ApiWeb.PredictionController.index
Auth: unknown

Parameters (15)

fields[prediction] (string, query, optional)

Fields to include with the response. Multiple fields **MUST** be a comma-separated (U+002C COMMA, ",") list. Note that fields can also be selected for included data types: see the [V3 API Best Practices](https://www.mbta.com/developers/v3-api/best-practices) for an example.

filter[direction_id] (string, query, optional)

Filter by direction of travel along the route. Must be used in conjuction with `filter[route]` to apply. The meaning of `direction_id` varies based on the route. You can programmatically get the direction names from `/routes` `/data/{index}/attributes/direction_names` or `/routes/{id}` `/data/attri...

Constraints: {'enum': ['0', '1']}

filter[latitude] (string, query, optional)

Latitude/Longitude must be both present or both absent.

filter[longitude] (string, query, optional)

Latitude/Longitude must be both present or both absent.

filter[radius] (string, query, optional)

Radius accepts a floating point number, and the default is 0.01. For example, if you query for: latitude: 42, longitude: -71, radius: 0.05 then you will filter between latitudes 41.95 and 42.05, and longitudes -70.95 and -71.05.

filter[revenue] (string, query, optional)

Filter predictions by revenue status. Revenue status indicates whether or not the vehicle is accepting passengers. When filter is not included, the default behavior is to filter by `revenue=REVENUE`. Multiple `revenue` types **MUST** be a comma-separated (U+002C COMMA, ",") list.

Constraints: {'enum': ['NON_REVENUE', 'REVENUE', 'NON_REVENUE,REVENUE']}

filter[route] (string, query, optional)

Filter by `/data/{index}/relationships/route/data/id`. Multiple IDs **MUST** be a comma-separated (U+002C COMMA, ",") list.

filter[route_pattern] (string, query, optional)

Filter by `/included/{index}/relationships/route_pattern/data/id` of a trip. Multiple `route_pattern_id` **MUST** be a comma-separated (U+002C COMMA, ",") list.

filter[route_type] (string, query, optional)

Filter by route_type: https://gtfs.org/documentation/schedule/reference/#routestxt. Multiple `route_type` **MUST** be a comma-separated (U+002C COMMA, ",") list. Must be used in conjunction with another filter.

Constraints: {'enum': ['0', '1', '2', '3', '4']}

filter[stop] (string, query, optional)

Filter by `/data/{index}/relationships/stop/data/id`. Multiple IDs **MUST** be a comma-separated (U+002C COMMA, ",") list. Parent station IDs are treated as though their child stops were also included.

filter[trip] (string, query, optional)

Filter by `/data/{index}/relationships/trip/data/id`. Multiple IDs **MUST** be a comma-separated (U+002C COMMA, ",") list.

include (string, query, optional)

Relationships to include. * `schedule` * `stop` * `route` * `trip` * `vehicle` * `alerts` The value of the include parameter **MUST** be a comma-separated (U+002C COMMA, ",") list of relationship paths. A relationship path is a dot-separated (U+002E FULL-STOP, ".") list of relationship names. [JSO...

page[limit] (integer, query, optional)

Max number of elements to return

page[offset] (integer, query, optional)

Offset (0-based) of first element in the page

sort (string, query, optional)

Results can be [sorted](http://jsonapi.org/format/#fetching-sorting) by the id or any `/data/{index}/attributes` key. | JSON pointer | Direction | `sort` | |--------------|-----------|------------| | `/data/{index}/attributes/arrival_time` | ascending | `arrival_time` | | `/data/{index}/attribu...

Constraints: {'enum': ['arrival_time', '-arrival_time', 'arrival_uncertainty', '-arrival_uncertainty', 'departure_time', '-departure_time', 'departure_uncertainty', '-departure_uncertainty', 'direction_id', '-direction_id', 'last_trip', '-last_trip', 'revenue_status', '-revenue_status', 'schedule_relationship', '-schedule_relationship', 'status', '-status', 'stop_sequence', '-stop_sequence', 'update_type', '-update_type', 'time', '-time']}

No probe data for this endpoint yet.