Real-time bus prediction methods.<h4 class="text-primary">Description</h4>
<p>Returns next bus arrival times at a stop.</p>
<h4 class="text-primary">Response Elements</h4>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th class="col-md-3">Element</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Predictions</td>
<td>
Array containing bus predictions (<a href=
"#NextBusPrediction">NextBusPrediction</a>).
</td>
</tr>
<tr>
<td>StopName</td>
<td>Full name of the given StopID.</td>
</tr>
<tr>
<td colspan="2">
<div class="text-primary" style="margin-top: 1em">
<a id="NextBusPrediction" name=
"NextBusPrediction">NextBusPrediction Elements</a>
</div>
</td>
</tr>
<tr>
<td>DirectionNum</td>
<td>Denotes a binary direction (0 or 1) of the bus. There is no
specific mapping to direction, but a different value for the same
route signifies that the buses are traveling in opposite
directions. Use the DirectionText element to show the actual
destination of the bus.</td>
</tr>
<tr>
<td>DirectionText</td>
<td>Customer-friendly description of direction and destination for
a bus.</td>
</tr>
<tr>
<td>Minutes</td>
<td>Minutes until bus arrival at this stop. Numeric value.</td>
</tr>
<tr>
<td>RouteID</td>
<td>Base route name as shown on the bus. This can be used in other
bus-related methods. Note that all variants will be shown as their
base route names (i.e.: 10Av1 and 10Av2 will be shown as 10A).</td>
</tr>
<tr>
<td>TripID</td>
<td>Trip identifier. This can be correlated with the data in our
bus schedule information as well as bus positions.</td>
</tr>
<tr>
<td>VehicleID</td>
<td>Bus identifier. This can be correlated with results returned
from bus positions.</td>
</tr>
</tbody>
</table>7-digit regional stop ID.Default response type.{
"Predictions": [
{
"DirectionNum": "0",
"DirectionText": "North to Bwi - Thurgood Marshall Airport",
"Minutes": 8,
"RouteID": "B30",
"TripID": "6794838",
"VehicleID": "6217"
},
{
"DirectionNum": "1",
"DirectionText": "South to Greenbelt Station",
"Minutes": 37,
"RouteID": "B30",
"TripID": "6794868",
"VehicleID": "6217"
},
{
"DirectionNum": "0",
"DirectionText": "North to Bwi - Thurgood Marshall Airport",
"Minutes": 48,
"RouteID": "B30",
"TripID": "6794839",
"VehicleID": "6213"
},
{
"DirectionNum": "1",
"DirectionText": "South to Greenbelt Station",
"Minutes": 77,
"RouteID": "B30",
"TripID": "6794869",
"VehicleID": "6213"
}
],
"StopName": "Bwi Airport + Stop 2"
}Response from invalid Stop ID.{"Message":"Stop Id not specified, invalid, or does not exist."}<h4 class="text-primary">Description</h4>
<p>Returns next bus arrival times at a stop.</p>
<h4 class="text-primary">Response Elements</h4>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th class="col-md-3">Element</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Predictions</td>
<td>
Array containing bus predictions (<a href=
"#NextBusPrediction">NextBusPrediction</a>).
</td>
</tr>
<tr>
<td>StopName</td>
<td>Full name of the given StopID.</td>
</tr>
<tr>
<td colspan="2">
<div class="text-primary" style="margin-top: 1em">
<a id="NextBusPrediction" name=
"NextBusPrediction">NextBusPrediction Elements</a>
</div>
</td>
</tr>
<tr>
<td>DirectionNum</td>
<td>Denotes a binary direction (0 or 1) of the bus. There is no
specific mapping to direction, but a different value for the same
route signifies that the buses are traveling in opposite
directions. Use the DirectionText element to show the actual
destination of the bus.</td>
</tr>
<tr>
<td>DirectionText</td>
<td>Customer-friendly description of direction and destination for
a bus.</td>
</tr>
<tr>
<td>Minutes</td>
<td>Minutes until bus arrival at this stop. Numeric value.</td>
</tr>
<tr>
<td>RouteID</td>
<td>Base route name as shown on the bus. This can be used in other
bus-related methods. Note that all variants will be shown as their
base route names (i.e.: 10Av1 and 10Av2 will be shown as 10A).</td>
</tr>
<tr>
<td>TripID</td>
<td>Trip identifier. This can be correlated with the data in our
bus schedule information as well as bus positions.</td>
</tr>
<tr>
<td>VehicleID</td>
<td>Bus identifier. This can be correlated with results returned
from bus positions.</td>
</tr>
</tbody>
</table>7-digit regional stop ID.Default response code.<NextBusResponse
xmlns="http://www.wmata.com"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Predictions>
<NextBusPrediction>
<DirectionNum>0</DirectionNum>
<DirectionText>North to Bwi - Thurgood Marshall Airport</DirectionText>
<Minutes>8</Minutes>
<RouteID>B30</RouteID>
<TripID>6794838</TripID>
<VehicleID>6217</VehicleID>
</NextBusPrediction>
<NextBusPrediction>
<DirectionNum>1</DirectionNum>
<DirectionText>South to Greenbelt Station</DirectionText>
<Minutes>37</Minutes>
<RouteID>B30</RouteID>
<TripID>6794868</TripID>
<VehicleID>6217</VehicleID>
</NextBusPrediction>
<NextBusPrediction>
<DirectionNum>0</DirectionNum>
<DirectionText>North to Bwi - Thurgood Marshall Airport</DirectionText>
<Minutes>48</Minutes>
<RouteID>B30</RouteID>
<TripID>6794839</TripID>
<VehicleID>6213</VehicleID>
</NextBusPrediction>
<NextBusPrediction>
<DirectionNum>1</DirectionNum>
<DirectionText>South to Greenbelt Station</DirectionText>
<Minutes>77</Minutes>
<RouteID>B30</RouteID>
<TripID>6794869</TripID>
<VehicleID>6213</VehicleID>
</NextBusPrediction>
</Predictions>
<StopName>Bwi Airport + Stop 2</StopName>
</NextBusResponse>Response from invalid Stop ID.<Error><Message>Stop Id not specified, invalid, or does not exist.</Message></Error>