trips-for-location Method
Search for active trips near a specific location.
Example Request
Example Response
{"code":200,"currentTime":1710978695626,"data":{"limitExceeded":false,"list":[{"frequency":null,"serviceDate":1710918000000,"situationIds":["1_57217"],"tripId":"1_585417265"},{"frequency":null,"serviceDate":1710918000000,"situationIds":[],"tripId":"1_562511425"},{"frequency":null,"serviceDate":1710918000000,"situationIds":[],"tripId":"1_562511675"},{"frequency":null,"serviceDate":1710918000000,"situationIds":[],"tripId":"1_629938405"},{"frequency":null,"serviceDate":1710918000000,"situationIds":["1_57217"],"tripId":"1_616833875"}],"outOfRange":false,"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"}],"routes":[{"agencyId":"1","color":"","description":"Northgate - Roosevelt - University District","id":"1_100259","longName":"","nullSafeShortName":"67","shortName":"67","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/067.html"},{"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":"Northgate - Lake City - Sand Point - Univ District","id":"1_100269","longName":"","nullSafeShortName":"75","shortName":"75","textColor":"","type":3,"url":"https://kingcounty.gov/en/dept/metro/routes-and-service/schedules-and-maps/075.html"}],"situations":[{"activeWindows":[{"from":1702587060000,"to":1711969140000}],"allAffects":[{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_100259","stopId":"","tripId":""},{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_100177","stopId":"","tripId":""},{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_100205","stopId":"","tripId":""},{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_102574","stopId":"","tripId":""},{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_102730","stopId":"","tripId":""},{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_102731","stopId":"","tripId":""},{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_100202","stopId":"","tripId":""},{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_100203","stopId":"","tripId":""},{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_100269","stopId":"","tripId":""},{"agencyId":"1","applicationId":"","directionId":"","routeId":"1_100204","stopId":"","tripId":""}],"consequenceMessage":"","consequences":[{"condition":"","conditionDetails":{"diversionPath":{"length":0,"levels":"","points":""},"diversionStopIds":[]}}],"creationTime":1710978581509,"description":{"lang":"en","value":"The northern section of Northgate Park & Ride D is scheduled to permanently close in December as part of a transit-oriented development (TOD) project that will build affordable housing next to transit service. In addition to housing, the development will also include retail space serving the Northgate community. \r\n\nMore information about the Northgate TOD project and how you can access alternate parking can be found at Metro’s website: Northgate Transit-Oriented Development Project - King County, Washington.\r\n\nTo prepare the site for construction, transit customers will no longer be able to park in the northern section (north of entrance off Third Avenue Northeast) of Northgate Park & Ride D after December 22. Any vehicle parked in the construction area after December 22th is subject to being towed at the owner’s expense.\r\n\nMake sure to move your vehicle by that date to avoid a tow. The remaining southern section of Northgate Park & Ride D is accessible through the south entrance off Northeast 100th Street.\r\n"},"id":"1_57217","publicationWindows":[],"reason":"UNKNOWN_CAUSE","severity":"noImpact","summary":{"lang":"en","value":"Northgate Park & Ride D Partial Closure for TOD Construction – Dec. 22, 2023"},"url":{"lang":"en","value":"https://kingcounty.gov/en/dept/metro/projects/transit-oriented-communities/northgate#toc-alternative-travel-options"}}],"stopTimes":[],"stops":[],"trips":[{"blockId":"1_7087085","directionId":"0","id":"1_585417265","peakOffpeak":0,"routeId":"1_100259","routeShortName":"","serviceId":"1_45626","shapeId":"1_11067005","timeZone":"","tripHeadsign":"Northgate Station Roosevelt Station","tripShortName":""},{"blockId":"1_7085270","directionId":"1","id":"1_562511425","peakOffpeak":0,"routeId":"1_100224","routeShortName":"","serviceId":"1_45626","shapeId":"1_20044006","timeZone":"","tripHeadsign":"University Of Washington Medical Center Wallingford","tripShortName":""},{"blockId":"1_7085237","directionId":"1","id":"1_562511675","peakOffpeak":0,"routeId":"1_100224","routeShortName":"","serviceId":"1_45626","shapeId":"1_20044006","timeZone":"","tripHeadsign":"University Of Washington Medical Center Wallingford","tripShortName":""},{"blockId":"1_7087201","directionId":"1","id":"1_629938405","peakOffpeak":0,"routeId":"1_100267","routeShortName":"","serviceId":"1_45626","shapeId":"1_20073013","timeZone":"","tripHeadsign":"University District Maple Leaf","tripShortName":""},{"blockId":"1_7087161","directionId":"0","id":"1_616833875","peakOffpeak":0,"routeId":"1_100269","routeShortName":"","serviceId":"1_45626","shapeId":"1_11075002","timeZone":"","tripHeadsign":"Northgate Station Sand Point","tripShortName":""}]}},"text":"OK","version":2}
Request Parameters
lat
- The latitude coordinate of the search centerlon
- The longitude coordinate of the search centerlatSpan
/lonSpan
- Set the limits of the search bounding boxincludeTrip
- Can be true/false to determine whether full<trip/>
elements are included in the<references/>
section. Defaults to false.includeSchedule
- Can be true/false to determine whether full<schedule/>
elements are included in the<tripDetails/>
section. Defaults to false.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 is a list of <tripDetails/>
element that captures extended details about each active trip. Active trips are ones where the transit vehicle is currently located within the search radius. We use real-time arrival data to determine the position of transit vehicles when available, otherwise we determine the location of vehicles from the static schedule.