{"uid":"cap_Nca4DctcrTbzLy16IIhhS","slug":"mbta-real-time-vehicle-locations-be727d37","name":"MBTA Real-Time Vehicle Locations","description":"Live MBTA Boston vehicle positions for one route (e.g. Red, Orange, Blue, 1): vehicle label, latitude/longitude, bearing, speed, current status, current stop id and occupancy when reported. Anonymous access is rate limited by MBTA.","url":"https://api.healthtravel-api.workers.dev/api/travel/mbta-realtime?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["route"],"properties":{"limit":{"type":"string","description":"Max vehicles, 1 to 100 (default 20)"},"route":{"type":"string","description":"MBTA route id, letters/digits/hyphens, 1 to 20 characters"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"count":14,"route":"Red","source":"https://api-v3.mbta.com/vehicles","vehicles":[{"id":"R-548C5C56","lat":42.28245,"lon":-71.06246,"label":"1811","stopId":"70094","bearing":330,"routeId":"Red","speedMps":null,"occupancy":null,"updatedAt":"2026-10-23T05:30:54-04:00","currentStatus":"IN_TRANSIT_TO"},{"id":"R-548C5C36","lat":42.28458,"lon":-71.06377,"label":"1948","stopId":"70094","bearing":330,"routeId":"Red","speedMps":null,"occupancy":null,"updatedAt":"2026-10-23T05:34:01-04:00","currentStatus":"STOPPED_AT"}],"checkedAt":"2026-10-23T09:36:40.289Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_EA0Q-MgkNc-REr6Veu4BO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time positions and status of MBTA vehicles (trains/buses) currently operating on a given route","exampleAgentPrompt":"Where are all the Red Line trains right now? Show me their live positions — give me up to 20 vehicles and whether each one is stopped or in transit.","exampleUseCases":[{"title":"Live commute status check","prompt":"What's happening on the Orange Line right now? I want to see where all the trains are and whether any are stopped at a station."},{"title":"Transit app vehicle map feed","prompt":"Pull the real-time positions of all MBTA Green Line vehicles — give me their coordinates, bearing, and current status for up to 50 vehicles."},{"title":"Delay monitoring for a bus route","prompt":"Show me the current live locations of buses on MBTA route 1 — I want to know which ones are stopped versus moving and where they are on the route."}],"resultDescription":"A JSON object containing a count of vehicles, the queried route ID, a source URL, a checkedAt timestamp, and an array of vehicle objects each with: vehicle ID, latitude, longitude, stop ID, bearing, route ID, speed in m/s (if available), occupancy (if available), last updated timestamp, and current status (e.g. IN_TRANSIT_TO or STOPPED_AT).","failureModes":["Missing or invalid route parameter returns an error — route is required","Route ID not recognized by MBTA API results in empty vehicle list","Limit value outside 1–100 range may be rejected or clamped","MBTA upstream API downtime causes failed or stale response","Network timeout from the upstream MBTA v3 API","No vehicles currently active on the requested route returns count of 0"],"whenToPreferThis":"Choose this endpoint when you need live, real-time MBTA vehicle positions for a specific route without requiring API keys or prior registration. It is ideal for transit-aware agents, commuter tools, or dashboards that need up-to-the-minute train and bus locations in the greater Boston area. It sources directly from the official MBTA v3 API and supports pay-per-call via crypto micropayments, making it suitable for lightweight or infrequent queries where a subscription would be wasteful.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:34:32.288Z","isFirstParty":false,"canonicalSlug":"mbta-real-time-vehicle-locations-be727d37"}