Station Information API

Command: stninfo

Inputs

Parameter Description
cmd=stninfo Requests detailed information on the specified station. (Required)
key=<key> API registration key (Required)
orig=<station> Specifies the origination station. Stations should be specified using the four character abbreviations. (Required)
json=y Returns API output in JSON format. Default output is XML if parameter not specified. (Optional)

Notes

None.

Results

XML Sample

<?xml version="1.0" encoding="utf-8" ?> 
<root>
  <uri><![CDATA[ http://api.bart.gov/api/stn.aspx?cmd=stninfo&orig=24th ]]></uri>
    <stations>
      <station>
        <name>24th St. Mission</name> 
        <abbr>24TH</abbr> 
        <gtfs_latitude>37.752411</gtfs_latitude> 
        <gtfs_longitude>-122.418292</gtfs_longitude> 
        <address>2800 Mission Street</address> 
        <city>San Francisco</city> 
        <county>sanfrancisco</county> 
        <state>CA</state> 
        <zipcode>94110</zipcode> 
        <north_routes>
        <route>ROUTE 2</route> 
        <route>ROUTE 6</route> 
        <route>ROUTE 8</route> 
        <route>ROUTE 12</route> 
        </north_routes>
        <south_routes>
        <route>ROUTE 1</route> 
        <route>ROUTE 5</route> 
        <route>ROUTE 7</route> 
        <route>ROUTE 11</route> 
        </south_routes>
        <north_platforms>
        <platform>2</platform> 
        </north_platforms>
        <south_platforms>
        <platform>1</platform> 
        </south_platforms>
        <platform_info>Always check destination signs and listen for departure announcements.</platform_info> 
        <intro><![CDATA[ "The Mission" refers to the San Francisco de Asis Mission, also known as Mission Dolores, which was founded 1776. Today the neighborhood is host to an eclectic mix of restaurants, markets, performance spaces, shops, and nightspots. ]]></intro>
        <cross_street><![CDATA[ Nearby Cross: 24th St. ]]></cross_street>
        <food><![CDATA[ Nearby restaurant reviews from <a rel="external" href="http://www.yelp.com/search?find_desc=Restaurant+&ns=1&rpp=10&find_loc=2800 Mission Street San Francisco, CA 94110">yelp.com</a> ]]></food>
        <shopping><![CDATA[ Local shopping from <a rel="external"" href="http://www.yelp.com/search?find_desc=Shopping+&ns=1&rpp=10&find_loc=2800 Mission Street San Francisco, CA 94110">yelp.com</a> ]]></shopping>
        <attraction><![CDATA[ More station area attractions from <a rel="external" href="http://www.yelp.com/search?find_desc=+&ns=1&rpp=10&find_loc=2800 Mission Street San Francisco, CA 94110">yelp.com</a> ]]></attraction>
        <link>http://www.bart.gov/stations/24TH</link> 
      </station>
    </stations>
  <message /> 
</root>

JSON Sample

{
   "?xml":{
      "@version":"1.0",
      "@encoding":"utf-8"
   },
   "root":{
      "uri":{
         "#cdata-section":"http://api.bart.gov/api/stn.aspx?cmd=stninfo&orig=24th&json=y"
      },
      "stations":{
         "station":{
            "name":"24th St. Mission",
            "abbr":"24TH",
            "gtfs_latitude":"37.752470",
            "gtfs_longitude":"-122.418143",
            "address":"2800 Mission Street",
            "city":"San Francisco",
            "county":"sanfrancisco",
            "state":"CA",
            "zipcode":"94110",
            "north_routes":{
               "route":[
                  "ROUTE 2",
                  "ROUTE 6",
                  "ROUTE 8",
                  "ROUTE 12"
               ]
            },
            "south_routes":{
               "route":[
                  "ROUTE 1",
                  "ROUTE 5",
                  "ROUTE 7",
                  "ROUTE 11"
               ]
            },
            "north_platforms":{
               "platform":"2"
            },
            "south_platforms":{
               "platform":"1"
            },
            "platform_info":"Always check destination signs and listen for departure announcements.",
            "intro":{
               "#cdata-section":"\n      \"The Mission\" refers to the San Francisco de Asis Mission, also known as Mission Dolores, which was founded 1776. Today the neighborhood is host to an eclectic mix of restaurants, markets, performance spaces, shops, and nightspots.\n    "
            },
            "cross_street":{
               "#cdata-section":"\n      Nearby Cross: 24th St.\n    "
            },
            "food":{
               "#cdata-section":"\n      Nearby restaurant reviews from <a rel=\"external\" href=\"http://www.yelp.com/search?find_desc=Restaurant+&ns=1&rpp=10&find_loc=2800 Mission Street San Francisco, CA 94110\">yelp.com</a>\n    "
            },
            "shopping":{
               "#cdata-section":"\n      Local shopping from <a rel=\"external\" href=\"http://www.yelp.com/search?find_desc=Shopping+&ns=1&rpp=10&find_loc=2800 Mission Street San Francisco, CA 94110\">yelp.com</a>\n    "
            },
            "attraction":{
               "#cdata-section":"\n      More station area attractions from <a rel=\"external\" href=\"http://www.yelp.com/search?find_desc=+&ns=1&rpp=10&find_loc=2800 Mission Street San Francisco, CA 94110\">yelp.com</a>\n    "
            },
            "link":{
               "#cdata-section":"http://www.bart.gov/stations/24TH"
            }
         }
      },
      "message":""
   }
}

Notes

None.

Usage

XML: http://api.bart.gov/api/stn.aspx?cmd=stninfo&orig=24th&key=MW9S-E7SL-26DU-VV8V
JSON: http://api.bart.gov/api/stn.aspx?cmd=stninfo&orig=24th&key=MW9S-E7SL-26DU-VV8V&json=y