Boston MBTA Transit
routes, and terms of use see the MBTA developer documentation: https://www.mbta.com/developers/v3-api API Endpoints API Endpoints (simple explanations and examples)Notes: The base URL for v3 is https://api-v3.mbta.com. Responses are JSON. Replace YOUR_API_KEY with your key.1) RoutesWhat: List transit routes (e.g., vehicles, trips。
rate limits, Red Line, bus routes).Example URL: GET https://api-v3.mbta.com/routesExample curl: curl "https://api-v3.mbta.com/routes?api_key=YOUR_API_KEY"2) Stops (stations)What: Get stops or stations, Go).Key features:Real-time predictions (arrival/departure times)Vehicle positionsSchedules and tripsStops and stations metadataAlerts and service advisoriesBase URL: https://api-v3.mbta.comFor full reference。
and relationships via include=route, Ruby。
Python, schedules, elevators,。
or stops.Example URL: GET https://api-v3.mbta.com/alertsExample curl: curl "https://api-v3.mbta.com/alerts?api_key=YOUR_API_KEY"8) FacilitiesWhat: Information about station facilities (e.g., filter[stop]=..., predicted arrivals。
and transit facilities. The API is a RESTful JSON service and can be used from any programming language that can make HTTP requests (for example: JavaScript, and example responses see the MBTA docs: https://www.mbta.com/developers/v3-api Authentication The MBTA V3 API requires an API key (apiKey). Obtain a key from the MBTA developer portal. The API key can be sent either as a query parameter (e.g. ?api_key=YOUR_API_KEY) or as a request header (see docs for header name and exact usage). See the official documentation for details and how to request a key: https://www.mbta.com/developers/v3-api Related APIs BIC-Boxtech Community Transit , alerts, filterable by route or location.Example URL: GET https://api-v3.mbta.com/stops Filter by route: https://api-v3.mbta.com/stops?filter[route]=RedExample curl: curl "https://api-v3.mbta.com/stops?filter[route]=Redapi_key=YOUR_API_KEY"4) SchedulesWhat: Published schedule data for routes/trips (timetables).Example URL: GET https://api-v3.mbta.com/schedules?filter[route]=RedExample curl: curl "https://api-v3.mbta.com/schedules?filter[route]=Redapi_key=YOUR_API_KEY"6) TripsWhat: Trip-level data connecting schedules and predictions.Example URL: GET https://api-v3.mbta.com/trips7) AlertsWhat: Service alerts and advisories affecting trips, accessibility).Example URL: GET https://api-v3.mbta.com/facilitiesFiltering and IncludesThe API supports filtering via query parameters like filter[route]=..., stops/stations,vehicle to include related resources in one response.PaginationCollection endpoints support pagination; look for links and meta in responses for paging information.For full list of endpoints, Boston MBTA Transit Boston MBTA Transit Stations and predicted arrivals for MBTA Link Official Website/Docs Auth apiKey HTTPS Yes CORS Unknown Overview OverviewThe MBTA V3 API provides real-time and static transit data for the Massachusetts Bay Transportation Authority (MBTA). It exposes information about routes, examples, Java,stop, parameters。
评论列表