Method 9: Bus Routes

Description: Returns a list of all bus routes.

Examples

url (REST) : http://api.wmata.com/Bus.svc/Routes?api_key=YOUR_API_KEY

 

url (JSON): http://api.wmata.com/Bus.svc/json/JRoutes?api_key=YOUR_API_KEY

Response example (REST):

<RoutesResp xmlns="http://www.wmata.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">   <Routes>     <Route>       <Name>10B - 10B HUNT TWRS-BALL (156)</Name>       <RouteID>10B</RouteID>     </Route>     <Route>       <Name>10B - 10B HUNT TWRS-BALL (156)</Name>       <RouteID>10Bc</RouteID>     </Route>     <Route>       <Name>10B - 10B HUNT TWRS-BALL (156)</Name>       <RouteID>10Bv1</RouteID>     </Route>     <Route>       <Name>10B - 10B HUNT TWRS-BALL (156)</Name>       <RouteID>10Bv4</RouteID>     </Route>     <Route>       <Name>10E - 10E HUNT TOWERS-PENT (2)</Name>       <RouteID>10E</RouteID>     </Route>     <Route>       <Name>11Y - 11Y MT VERNON EXPRESS (157)</Name>       <RouteID>11Y</RouteID>     </Route>

    ...   </Routes> </RoutesResp>

Description of response fields:

  • RouteID - Route identifier.
  • Name - Full name of the route.

4 Comments

  1. Doug Moore1 year ago

    I don't know if this is the right place to post it, but: something is poorly formatting 10A -- it is being converted to 10:00:00 AM

    also affected:

    13A to 1:00:00 PM
    16A to 4:00:00 PM

    Actually, if I do a search in the routes page for "00:00" it appears there are 62 routes affected.

  2. Wmata Admin1 year ago

    thank you - good find - - will investigate this upstream

  3. Doug Moore1 year ago

    Also, hopefully I didn't miss it in the documentation somewhere -- what is with the alternate routes? For instance, in the example data above there is a 10B a 10Bc and a 10Bv1 -- what is the significance of these alternate versions of the 10B?

    Oh, and what is the significance of the number in parentheses after the route name?

  4. Wmata Admin1 year ago

    Doug, in most cases these are shortened versions of main routes. Sometimes they go to some neighbourhoods, to which main route does not go. This is all depending on a time or day of the week. So they're variations of the same route (from passanger standpoint), but technically different routes. Number in parentheses is internal coding inserte in the title, does not mean anything to you. At some point I expect this code to go away from DB

Please sign in to post a comment.