- Previous: Method 7: Elevator / Elevator Incidents
- Up: Description of Methods
- Next: Method 9: Bus Routes
Method 8: Station Entrances
Description: Returns entrances (including elevators) to Metro stations. If a latitude/ longitude or radius is not provided or equals 0, all entrances will be returned. Radius is expressed in meters. Entrances are ordered by distance from latitude/ longitude, if provided.
Examples
url (REST) : http://api.wmata.com/Rail.svc/StationEntrances?lat=38.878586&lon=-76.989626&radius=500&api_key=YOUR_API_KEY
url (JSON): http://api.wmata.com/Rail.svc/json/JStationEntrances?lat=38.878586&lon=-76.989626&radius=500&api_key=YOUR_API_KEY
Response example (REST):
<StationEntrancesResp xmlns="http://www.wmata.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Entrances> <StationEntrance> <Description>Potomac Avenue, Main</Description> <ID>58</ID> <Lat>38.880836</Lat> <Lon>-76.98518</Lon> <Name>Potomac Avenue Main</Name> <StationCode1>D07</StationCode1> <StationCode2/> </StationEntrance> <StationEntrance> <Description>Potomac Avenue, Elevator</Description> <ID>59</ID> <Lat>38.881057</Lat> <Lon>-76.985126</Lon> <Name>Potomac Avenue Elevator</Name> <StationCode1>D07</StationCode1> <StationCode2/> </StationEntrance> </Entrances> </StationEntrancesResp>
Description of response fields:
- StationCode1 - ID of the station affected by the escalator/elevator incident. Stations are referenced by codes. See Stations method to find station names.
- StationCode2 - ID of the station affected by the escalator/elevator incident. Stations are referenced by codes. See Stations method to find station names.
- ID - ID of the entrance.
- Name - Name
- Description - Description
- Lat - Latitude.
- Lon - Longitude.
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
5 Comments
Samer – 2 years ago
It seems that not all stations are currently available using this method. I discovered this when I entered my home's lat/lon and a radius of 1000 m and expected to get Court House. Neither Court House nor Clarendon came up, and when widening the radius, Virgina Square was listed as first. So I compared all the stations with the output of all the stations from this method, and found many missing stations.
I wrote a quick script to compare the output of all the stations as retrieved from:
http://api.wmata.com/Rail.svc/Stations?api_key=MYKEY
(which did return all stations) against all the stations returned with:
http://api.wmata.com/Rail.svc/StationEntrances?api_key=MYKEY
(which should have returned all stations) and the following stations were missing from the second call:
Metro Center (A01)
Tenleytown (A07)
Bethesda (A09)
Grosvenor (A11)
Twinbrook (A13)
Rockville (A14)
Gallery Place (B01)
Brookland (B05)
Takoma (B07)
Wheaton (B10)
Glenmont (B11)
Rosslyn (C05)
Pentagon (C07)
Huntington (C15)
Smithsonian (D02)
L'Enfant Plaza (D03)
Deanwood (D10)
Cheverly (D11)
Landover (D12)
Fort Totten (E06)
Greenbelt (E10)
Archives (F02)
Waterfront (F04)
Anacostia (F06)
Suitland (F10)
Morgan Blvd (G04)
Largo Town Center (G05)
Franconia-Springf'ld (J03)
Court House (K01)
Clarendon (K02)
Ballston (K04)
Dunn Loring (K07)
Vienna (K08)
Would appreciate if you could look into this.
Peter Shashkin – 2 years ago
Thanks for pointing this out. You should have the full set now. (we don't have entrance info for Morgan Blvd, but this is how it is)
But remember, that you need to check StationID2 as well when you do your checks - some stations have multiple code designations
Tim Schmitz – 2 years ago
It'd be great if station entrances could indicate a type -- elevator, escalator, etc. Is there any chance of adding this data to the API?
Peter Shashkin – 2 years ago
I agree, and we will try to incorporate this in the future, but meanwhile you can extract this info from description
Luke – 1 year ago
The way this interacts with the escalator outages makes it pretty useless. The important information is how many out of the total escalators at a given entrance are out--all of them? One of two? Is there only one, and it's out? Unless I'm missing something, there's no indication how many escalators are in a bank; escalator outage reports will have a unit number like 05A at entrance 05, but there's no lookup for those units.
That's a basic feature. Here's what would be a huge bonus add--a lookup of all 588 escalators that included length.
Please sign in to post a comment.