Station Information API

Command: stns

Inputs

Parameter Description
cmd=stns Requests current API version information (Required)
key=<key> API registration key (Required)
json=y Returns API output in JSON format. Default output is XML if parameter not specified. (Optional)

Notes

This command provides a list of all of the BART stations with their full names, abbreviations, latitude, longitude and addresses.

Results

XML Sample

<?xml version="1.0" encoding="utf-8" ?> 
<root>
<uri><![CDATA[ https://api.bart.gov/api/stn.aspx?cmd=stns ]]></uri>
  <stations>
    <station>
      <name>12th St. Oakland City Center</name> 
      <abbr>12TH</abbr>
      <gtfs_latitude>37.803664</gtfs_latitude>
      <gtfs_longitude>-122.271604</gtfs_longitude>
      <address>1245 Broadway</address> 
      <city>Oakland</city> 
      <county>alameda</county> 
      <state>CA</state> 
      <zipcode>94612</zipcode> 
    </station>
    ...
    <station>
      <name>Warm Springs / South Fremont</name>
      <abbr>WARM</abbr>
      <gtfs_latitude>37.502171</gtfs_latitude>
      <gtfs_longitude>-121.939313</gtfs_longitude>
      <address>45193 Warm Springs Blvd</address>
      <city>Fremont</city>
      <county>alameda</county>
      <state>CA</state>
      <zipcode>94539</zipcode>
    </station>
  </stations>
  <message /> 
</root>

JSON Sample

{
   "?xml":{
      "@version":"1.0",
      "@encoding":"utf-8"
   },
   "root":{
      "uri":{
         "#cdata-section":"https://api.bart.gov/api/stn.aspx?cmd=stns&json=y"
      },
      "stations":{
         "station":[
            {
               "name":"12th St. Oakland City Center",
               "abbr":"12TH",
               "gtfs_latitude":"37.803768",
               "gtfs_longitude":"-122.271450",
               "address":"1245 Broadway",
               "city":"Oakland",
               "county":"alameda",
               "state":"CA",
               "zipcode":"94612"
            },
...
            {
               "name":"Warm Springs / South Fremont",
               "abbr":"WARM",
               "gtfs_latitude":"37.502171",
               "gtfs_longitude":"-121.939313",
               "address":"45193 Warm Springs Blvd",
               "city":"Fremont",
               "county":"alameda",
               "state":"CA",
               "zipcode":"94539"
            }
         ]
      },
      "message":""
   }
}

Notes

None.

Usage

XML: https://api.bart.gov/api/stn.aspx?cmd=stns&key=INSERT-KEY
JSON: https://api.bart.gov/api/stn.aspx?cmd=stns&key=INSERT-KEY&json=y