trip-details Method
Get extended details for a specific trip
Example Request
https://api.pugetsound.onebusaway.org/api/where/trip-details/1_562510385.json?key=TEST
Example Response
{"code":200,"currentTime":1710978466004,"data":{"entry":{"frequency":null,"schedule":{"frequency":null,"nextTripId":"1_605425455","previousTripId":"1_562510085","stopTimes":[{"arrivalTime":62640,"departureTime":62640,"distanceAlongTrip":0.8060278297219835,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_25240"},{"arrivalTime":62722,"departureTime":62722,"distanceAlongTrip":218.32149043751826,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29405"},{"arrivalTime":62895,"departureTime":62895,"distanceAlongTrip":674.4171554855535,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29420"},{"arrivalTime":63077,"departureTime":63077,"distanceAlongTrip":1158.705120958114,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29440"},{"arrivalTime":63193,"departureTime":63193,"distanceAlongTrip":1466.8005094314592,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_11352"},{"arrivalTime":63300,"departureTime":63300,"distanceAlongTrip":1750.170119679847,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_9587"},{"arrivalTime":63436,"departureTime":63436,"distanceAlongTrip":2221.932588406368,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29455"},{"arrivalTime":63590,"departureTime":63590,"distanceAlongTrip":2758.9995664337616,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29480"},{"arrivalTime":63716,"departureTime":63716,"distanceAlongTrip":3197.2818053931423,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29500"},{"arrivalTime":63809,"departureTime":63809,"distanceAlongTrip":3520.753042583059,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_17310"},{"arrivalTime":63897,"departureTime":63897,"distanceAlongTrip":3827.511920370575,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29530"},{"arrivalTime":63960,"departureTime":63960,"distanceAlongTrip":4045.4227337252337,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29540"},{"arrivalTime":64023,"departureTime":64023,"distanceAlongTrip":4285.3658450672765,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29557"},{"arrivalTime":64095,"departureTime":64095,"distanceAlongTrip":4558.1959485528705,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29581"},{"arrivalTime":64200,"departureTime":64200,"distanceAlongTrip":4954.920646742599,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29600"},{"arrivalTime":64280,"departureTime":64280,"distanceAlongTrip":5293.413299996671,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29620"},{"arrivalTime":64331,"departureTime":64331,"distanceAlongTrip":5507.228750953632,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29630"},{"arrivalTime":64406,"departureTime":64406,"distanceAlongTrip":5822.010112919243,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29640"},{"arrivalTime":64452,"departureTime":64452,"distanceAlongTrip":6015.067339549548,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29650"},{"arrivalTime":64510,"departureTime":64510,"distanceAlongTrip":6259.883734374927,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29660"},{"arrivalTime":64593,"departureTime":64593,"distanceAlongTrip":6608.953764808458,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29680"},{"arrivalTime":64700,"departureTime":64700,"distanceAlongTrip":7056.803424058759,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29700"},{"arrivalTime":64794,"departureTime":64794,"distanceAlongTrip":7452.756959163688,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_29720"},{"arrivalTime":64860,"departureTime":64860,"distanceAlongTrip":7729.834756986152,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_18740"},{"arrivalTime":64949,"departureTime":64949,"distanceAlongTrip":8218.101509386805,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_18760"},{"arrivalTime":64995,"departureTime":64995,"distanceAlongTrip":8474.076394567779,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_18785"},{"arrivalTime":65040,"departureTime":65040,"distanceAlongTrip":8720.130026853763,"historicalOccupancy":"","stopHeadsign":"","stopId":"1_18085"}],"timeZone":"America/Los_Angeles"},"serviceDate":1710918000000,"situationIds":[],"status":{"activeTripId":"1_562510085","blockTripSequence":10,"closestStop":"1_17410","closestStopTimeOffset":-27,"distanceAlongTrip":5310.910612798107,"frequency":null,"lastKnownDistanceAlongTrip":0,"lastKnownLocation":{"lat":47.66138458251953,"lon":-122.33419799804688},"lastKnownOrientation":0,"lastLocationUpdateTime":1710978408000,"lastUpdateTime":1710978408000,"nextStop":"1_29234","nextStopTimeOffset":66,"occupancyCapacity":0,"occupancyCount":0,"occupancyStatus":"","orientation":0.13577173521464864,"phase":"in_progress","position":{"lat":47.66138696887396,"lon":-122.33416013518999},"predicted":true,"scheduleDeviation":8,"scheduledDistanceAlongTrip":5310.910612798107,"serviceDate":1710918000000,"situationIds":[],"status":"SCHEDULED","totalDistanceAlongTrip":8462.521770450538,"vehicleId":"1_4531"},"tripId":"1_562510385"},"references":{"agencies":[{"disclaimer":"","email":"","fareUrl":"https://kingcounty.gov/en/dept/metro/fares-and-payment/prices","id":"1","lang":"EN","name":"Metro Transit","phone":"206-553-3000","privateService":false,"timezone":"America/Los_Angeles","url":"https://kingcounty.gov/en/dept/metro"},{"disclaimer":"","email":"main@soundtransit.org","fareUrl":"https://www.soundtransit.org/ride-with-us/how-to-pay/fares","id":"40","lang":"en","name":"Sound Transit","phone":"1-888-889-6368","privateService":false,"timezone":"America/Los_Angeles","url":"https://www.soundtransit.org"}],"routes":[{"agencyId":"1","color":"","description":"Ballard - Montlake","id":"1_100224","longName":"","nullSafeShortName":"44","shortName":"44","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/044.html"},{"agencyId":"1","color":"","description":"Jackson Park - Univ District","id":"1_100267","longName":"","nullSafeShortName":"73","shortName":"73","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/073.html"},{"agencyId":"1","color":"","description":"Totem Lake TC-Kirkand TC-UW Link Sta-Univ Dist","id":"1_100146","longName":"","nullSafeShortName":"255","shortName":"255","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/255.html"},{"agencyId":"1","color":"","description":"Madrona - Lakeside School","id":"1_100346","longName":"","nullSafeShortName":"988","shortName":"988","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/988.html"},{"agencyId":"1","color":"","description":"Univ Dist-Montlake-Capitol Hill-Downtown Seattle","id":"1_100223","longName":"","nullSafeShortName":"43","shortName":"43","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/043.html"},{"agencyId":"1","color":"","description":"Mt Baker - University District","id":"1_100228","longName":"","nullSafeShortName":"48","shortName":"48","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/048.html"},{"agencyId":"1","color":"","description":"Issaquah - University District","id":"1_100162","longName":"","nullSafeShortName":"271","shortName":"271","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/271.html"},{"agencyId":"40","color":"2B376E","description":"Redmond - University District","id":"40_100511","longName":"Redmond - University District","nullSafeShortName":"542","shortName":"542","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/542"},{"agencyId":"40","color":"2B376E","description":"Issaquah-University District","id":"40_100451","longName":"Issaquah - Northgate","nullSafeShortName":"556","shortName":"556","textColor":"FFFFFF","type":3,"url":"https://www.soundtransit.org/556"},{"agencyId":"1","color":"","description":"UW/Cascadia College - University District","id":"1_100214","longName":"","nullSafeShortName":"372","shortName":"372","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/372.html"},{"agencyId":"1","color":"","description":"Lake City - Northgate - University District","id":"1_102730","longName":"","nullSafeShortName":"20","shortName":"20","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/020.html"},{"agencyId":"1","color":"","description":"Univ District - Broadway - Downtown Seattle","id":"1_100447","longName":"","nullSafeShortName":"49","shortName":"49","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/049.html"},{"agencyId":"1","color":"","description":"University District - Eastlake - Downtown Seattle","id":"1_100264","longName":"","nullSafeShortName":"70","shortName":"70","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/070.html"},{"agencyId":"1","color":"","description":"Sand Point - Green Lake - Downtown Seattle","id":"1_100252","longName":"","nullSafeShortName":"62","shortName":"62","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/062.html"},{"agencyId":"1","color":"","description":"Loyal Heights-Sunset Hill-Ballard-Downtown Seattle","id":"1_100062","longName":"","nullSafeShortName":"17","shortName":"17","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/017.html"},{"agencyId":"1","color":"","description":"Northgte-Ballard-Fremont-Westlake-Downtown Seattle","id":"1_102574","longName":"","nullSafeShortName":"40","shortName":"40","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/040.html"}],"situations":[],"stopTimes":[],"stops":[{"code":"25240","direction":"SW","id":"1_25240","lat":47.650227,"locationType":0,"lon":-122.30442,"name":"Montlake Blvd NE & NE Pacific Pl - Bay 3","parent":"","routeIds":["1_100224","1_100267","1_100146","1_100346"],"staticRouteIds":["1_100224","1_100267","1_100146","1_100346"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29405","direction":"NW","id":"1_29405","lat":47.649765,"locationType":0,"lon":-122.305893,"name":"NE Pacific St & Montlake Blvd NE - Bay 2","parent":"","routeIds":["1_100223","1_100224","1_100228","1_100267","1_100162"],"staticRouteIds":["1_100223","1_100224","1_100228","1_100267","1_100162"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29420","direction":"NW","id":"1_29420","lat":47.652206,"locationType":0,"lon":-122.310783,"name":"NE Pacific St & 15th Ave NE","parent":"","routeIds":["1_100224","1_100228","1_100267","1_100146","1_100162","40_100511","40_100451"],"staticRouteIds":["1_100224","1_100228","1_100267","1_100146","1_100162","40_100511","40_100451"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29440","direction":"N","id":"1_29440","lat":47.655899,"locationType":0,"lon":-122.311974,"name":"15th Ave NE & NE Campus Pkwy","parent":"","routeIds":["1_100224","1_100228","1_100162","1_100214","40_100511","40_100451"],"staticRouteIds":["1_100224","1_100228","1_100162","1_100214","40_100511","40_100451"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"11352","direction":"N","id":"1_11352","lat":47.658668,"locationType":0,"lon":-122.311905,"name":"15th Ave NE & NE 42nd St","parent":"","routeIds":["1_102730","1_100224","1_100228","1_100447","1_100264","1_100162","1_100214","40_100511","40_100451"],"staticRouteIds":["1_102730","1_100224","1_100228","1_100447","1_100264","1_100162","1_100214","40_100511","40_100451"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"9587","direction":"W","id":"1_9587","lat":47.659878,"locationType":0,"lon":-122.314117,"name":"U District Station - Bay 1","parent":"","routeIds":["1_102730","1_100224","1_100447","1_100264","1_100214"],"staticRouteIds":["1_102730","1_100224","1_100447","1_100264","1_100214"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29455","direction":"W","id":"1_29455","lat":47.661373,"locationType":0,"lon":-122.318214,"name":"NE 45th St & 9th Ave NE","parent":"","routeIds":["1_102730","1_100224"],"staticRouteIds":["1_102730","1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29480","direction":"W","id":"1_29480","lat":47.661415,"locationType":0,"lon":-122.325386,"name":"NE 45th St & Latona Ave NE","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29500","direction":"W","id":"1_29500","lat":47.661442,"locationType":0,"lon":-122.331238,"name":"N 45th St & Sunnyside Ave N","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"17310","direction":"W","id":"1_17310","lat":47.661461,"locationType":0,"lon":-122.335556,"name":"N 45th St & Wallingford Ave N","parent":"","routeIds":["1_100224","1_100252"],"staticRouteIds":["1_100224","1_100252"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29530","direction":"W","id":"1_29530","lat":47.661461,"locationType":0,"lon":-122.339653,"name":"N 45th St & Woodlawn Ave N","parent":"","routeIds":["1_100224","1_100252"],"staticRouteIds":["1_100224","1_100252"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29540","direction":"W","id":"1_29540","lat":47.661461,"locationType":0,"lon":-122.34256,"name":"N 45th St & Stone Way N","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29557","direction":"W","id":"1_29557","lat":47.662189,"locationType":0,"lon":-122.345413,"name":"N 46th St & Green Lake Way N","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29581","direction":"W","id":"1_29581","lat":47.662209,"locationType":0,"lon":-122.349037,"name":"Aurora Ramp & Fremont Ave N","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29600","direction":"W","id":"1_29600","lat":47.662212,"locationType":0,"lon":-122.354324,"name":"N 46th St & Phinney Ave N","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29620","direction":"N","id":"1_29620","lat":47.663639,"locationType":0,"lon":-122.357941,"name":"NW Market St & NW 48th St","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29630","direction":"NW","id":"1_29630","lat":47.665184,"locationType":0,"lon":-122.359619,"name":"NW Market St & NW 50th St","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29640","direction":"NW","id":"1_29640","lat":47.667763,"locationType":0,"lon":-122.361328,"name":"NW Market St & 3rd Ave NW","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29650","direction":"W","id":"1_29650","lat":47.668751,"locationType":0,"lon":-122.363228,"name":"NW Market St & 5th Ave NW","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29660","direction":"W","id":"1_29660","lat":47.668735,"locationType":0,"lon":-122.366493,"name":"NW Market St & 8th Ave NW","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29680","direction":"W","id":"1_29680","lat":47.668728,"locationType":0,"lon":-122.371155,"name":"NW Market St & 11th Ave NW","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29700","direction":"W","id":"1_29700","lat":47.668735,"locationType":0,"lon":-122.377136,"name":"NW Market St & 15th Ave NW","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29720","direction":"W","id":"1_29720","lat":47.668739,"locationType":0,"lon":-122.382423,"name":"NW Market St & 20th Ave NW","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"18740","direction":"W","id":"1_18740","lat":47.668747,"locationType":0,"lon":-122.386124,"name":"NW Market St & Ballard Ave NW","parent":"","routeIds":["1_100062","1_102574","1_100224"],"staticRouteIds":["1_100062","1_102574","1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"18760","direction":"W","id":"1_18760","lat":47.668724,"locationType":0,"lon":-122.392639,"name":"NW Market St & 28th Ave NW","parent":"","routeIds":["1_100062","1_100224"],"staticRouteIds":["1_100062","1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"18785","direction":"W","id":"1_18785","lat":47.668709,"locationType":0,"lon":-122.396057,"name":"NW Market St & 30th Ave NW","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"18085","direction":"S","id":"1_18085","lat":47.667934,"locationType":0,"lon":-122.398415,"name":"32nd Ave NW & NW Market St","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"17410","direction":"E","id":"1_17410","lat":47.661316,"locationType":0,"lon":-122.335442,"name":"N 45th St & Wallingford Ave N","parent":"","routeIds":["1_100224","1_100252"],"staticRouteIds":["1_100224","1_100252"],"wheelchairBoarding":"ACCESSIBLE"},{"code":"29234","direction":"E","id":"1_29234","lat":47.661308,"locationType":0,"lon":-122.331032,"name":"N 45th St & Corliss Ave N","parent":"","routeIds":["1_100224"],"staticRouteIds":["1_100224"],"wheelchairBoarding":"ACCESSIBLE"}],"trips":[{"blockId":"1_7085271","directionId":"0","id":"1_562510385","peakOffpeak":0,"routeId":"1_100224","routeShortName":"","serviceId":"1_45626","shapeId":"1_11044004","timeZone":"","tripHeadsign":"Ballard Wallingford","tripShortName":""},{"blockId":"1_7085271","directionId":"1","id":"1_605425455","peakOffpeak":0,"routeId":"1_100224","routeShortName":"","serviceId":"1_45626","shapeId":"1_20044006","timeZone":"","tripHeadsign":"University Of Washington Medical Center Wallingford","tripShortName":""},{"blockId":"1_7085271","directionId":"1","id":"1_562510085","peakOffpeak":0,"routeId":"1_100224","routeShortName":"","serviceId":"1_45626","shapeId":"1_20044006","timeZone":"","tripHeadsign":"University Of Washington Medical Center Wallingford","tripShortName":""}]}},"text":"OK","version":2}
Request Parameters
id
- the id of the trip, encoded directly in the URL:http://api.pugetsound.onebusaway.org/api/where/trip-details/[ID GOES HERE].xml
serviceDate
- the service date for the trip as unix-time in ms (optional). Used to disambiguate different versions of the same trip. See [Glossary#ServiceDate the glossary entry for service date].includeTrip
- Can be true/false to determine whether full<trip/>
element is included in the<references/>
section. Defaults to true.includeSchedule
- Can be true/false to determine whether full<schedule/>
element is included in the<tripDetails/>
section. Defaults to true.includeStatus
- Can be true/false to determine whether the full<status/>
element is include in the<tripDetails/>
section. Defaults to true.time
- by default, the method returns the status of the system right now. However, the system can also be queried at a specific time. This can be useful for testing. See timestamps for details on the format of thetime
parameter.
Response
The response <entry/>
element is a
<tripDetails/>
element that captures extended
details about a trip.
The status element will indicate whether the trip is scheduled or canceled.