- Previous: Method 13: Bus Positions
- Up: Description of Methods
- Next: Method 15: Bus Prediction
Method 14: Bus Schedule by Stop
Description: Returns the bus schedule for a specific bus stop.
Examples
url (REST) : http://api.wmata.com/Bus.svc/StopSchedule?stopId=2000019&date=2010-12-01&api_key=YOUR_API_KEY
url (JSON): http://api.wmata.com/Bus.svc/json/JStopSchedule?stopId=2000019&date=2010-12-01&api_key=YOUR_API_KEY
Parameters:
stopID - identifier of stop. Required.
date can be empty (default is today).
Response example (REST):
<StopScheduleInfo xmlns="http://www.wmata.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <ScheduleArrivals> <StopScheduleArrival> <DirectionNum>1</DirectionNum> <EndTime>2011-01-21T05:17:00</EndTime> <RouteID>32</RouteID> <ScheduleTime>2011-01-21T04:22:28</ScheduleTime> <StartTime>2011-01-21T04:16:00</StartTime> <TripDirectionText>EAST</TripDirectionText> <TripHeadsign>SOUTHERN AVE STATION</TripHeadsign> <TripID>20163_21</TripID> </StopScheduleArrival> <StopScheduleArrival> <DirectionNum>1</DirectionNum> <EndTime>2011-01-21T05:26:00</EndTime> <RouteID>36</RouteID> <ScheduleTime>2011-01-21T04:35:28</ScheduleTime> <StartTime>2011-01-21T04:29:00</StartTime> <TripDirectionText>EAST</TripDirectionText> <TripHeadsign>NAYLOR RD STATION</TripHeadsign> <TripID>20169_21</TripID> </StopScheduleArrival> ... </ScheduleArrivals> <Stop> <Lat>38.94611602</Lat> <Lon>-77.07880776</Lon> <Name>WISCONSIN AVE NW + TENLEY CIRCLE NW</Name> <Routes xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <a:string>31</a:string> <a:string>32</a:string> <a:string>36</a:string> <a:string>D32</a:string> <a:string>H2</a:string> <a:string>H3</a:string> <a:string>H4</a:string> <a:string>N8</a:string> </Routes> <StopID>1002442</StopID> </Stop> </StopScheduleInfo>
Description of response fields:
Response contains Stop description and Schedule for this stop.
Stop description contains:
- StopID - BusStop identifier
- Lat - latitude of the BusStop
- Lon - longitude of the BusStop
- Name - name of the BusStop
- Routes - all routes using this stop. Regardless of "date" parameter.
StopScheduleArrival contains:
- RouteID - identifier of the route.
- TripID - identifier of the trip.
- DirectionNum - trip direction on the route (0 or 1).
- TripHeadsign - trip headsign.
- TripDirectionText - name of the direction.
- StartTime - start time of the trip.
- EndTime - end time of the trip.
- ScheduleTime - schedule time for the stop.
- Previous: Method 13: Bus Positions
- Up: Description of Methods
- Next: Method 15: Bus Prediction
Docs Navigation
- Description of Methods
- Method 1: Rail Lines
- Method 2: Rail Stations
- Method 3: Rail Station Info
- Method 4: Rail Paths
- Method 5: Rail Station Prediction
- Method 6: Rail Incidents
- Method 7: Elevator / Elevator Incidents
- Method 8: Station Entrances
- Method 9: Bus Routes
- Method 10: Bus Stops
- Method 11: Bus Schedule by Route
- Method 12: Bus Route Details
- Method 13: Bus Positions
- Method 14: Bus Schedule by Stop
- Method 15: Bus Prediction
2 Comments
dgross03 – 1 year ago
Is it possible that this method (“Bus Schedule By Stop”, Meth 14) returns bad data on the set of routes serving each bus stop in the WMATA system pre 2010-12-19? The weekend of Dec 19 and 20, a broad set of bus system changes came into effect. Yet even for dates before that weekend, for each bus stop the method’s returned XML appears to list the routes serving the stop after the system change, even if they didn’t serve it on the date given as argument to the method. For example, I think route H2 was only extended to Stop 1002442 on 2010-12-19, but it appears in the list of routes returned for dates before then.
I know this question is quite picky and only concerns historical data, but if anyone (esp admins) happens to have an answer it'd be much appreciated. Thanks!
Wmata Admin – 1 year ago
The portion of XML that lists route names for a particular bus stop does not take date into consideration (eventhough you pass date to that query.) It shows all routes that we currently see in schedule regardless of the date.
Ideologically it is similar to you coming to a bus stop and looking into sign with routes. Even if today is Sunday, you will see all buses that come here, including those that dont service this stop on Sundays. Will update docs.
Please sign in to post a comment.