Real-Time Information API

Command: etd

Inputs

Parameter Description
cmd=etd Requests current departure information. (Required)
orig=<station> Specifies the station. Stations are referenced by their abbreviations. You can also use 'ALL' to get all of the current ETD's. (Required)
key=<key> API registration key. (Required)
plat=<platform> This will limit results to a specific platform. Valid platforms depend on the station, but can range from 1-4. (Optional)
dir=<dir> This will limit results to a specific direction. Valid directions are 'n' for Northbound and 's' for Southbound. (Optional)

Notes

The optional parameters 'plat' and 'dir' should not be used together. If they are, then the 'dir' parameter will be ignored and just the platform parameter will be used.

If 'ALL' is used for the orig station, then 'plat' and 'dir' cannot be used.

XML Results

Sample

<?xml version="1.0" encoding="utf-8" ?> 
<root>
  <uri><![CDATA[ http://api.bart.gov/api/etd.aspx?cmd=etd&orig=RICH ]]></uri>
  <date>03/30/2011</date> 
  <time>02:43:27 PM PDT</time> 
  <station>
    <name>Richmond</name> 
    <abbr>RICH</abbr> 
    <etd>
      <destination>Fremont</destination> 
      <abbreviation>FRMT</abbreviation> 
      <estimate>
        <minutes>5</minutes> 
        <platform>2</platform> 
        <direction>South</direction> 
        <length>6</length> 
        <color>ORANGE</color> 
        <hexcolor>#ff9933</hexcolor> 
        <bikeflag>1</bikeflag> 
      </estimate>
      <estimate>
        <minutes>20</minutes> 
        <platform>2</platform> 
        <direction>South</direction> 
        <length>6</length> 
        <color>ORANGE</color> 
        <hexcolor>#ff9933</hexcolor> 
        <bikeflag>1</bikeflag> 
      </estimate>
    </etd>
    <etd>
      <destination>Millbrae</destination> 
      <abbreviation>MLBR</abbreviation> 
      <estimate>
        <minutes>Leaving</minutes> 
        <platform>2</platform> 
        <direction>South</direction> 
        <length>10</length> 
        <color>RED</color> 
        <hexcolor>#ff0000</hexcolor> 
        <bikeflag>1</bikeflag> 
      </estimate>
    </etd>
  </station>
  <message /> 
</root>

Notes

The <color>,<hexcolor>, and <bikeflag> fields will be added on 4/12/2011. See the Change Log for more information.

Usage

http://api.bart.gov/api/etd.aspx?cmd=etd&orig=RICH&key=MW9S-E7SL-26DU-VV8V