Schedule Information API

Command: fare

Inputs

Parameter Description
cmd=fare Requests the fare information for a trip between two stations. (Required)
key=<key> API registration key. (Required)
orig=<station> Specifies the origination station. Stations should be specified using the four character abbreviations. (Required)
dest=<station> Specifies the destination station. Stations should be specified using the four character abbreviations. (Required)
date=<mm/dd/yyyy> Specifies a specific date to use for calculating the fare. If not specified, the current date will be used. Also the terms "now" or "today" may be used instead of "mm/dd/yyyy". (Optional)
sched=<number> Specifies a specific schedule to use. (Optional)
json=y Returns API output in JSON format. Default output is XML if parameter not specified. (Optional)

Notes

Results

XML Sample

<?xml version="1.0" encoding="utf-8"?>
<root>
  <uri>
    <![CDATA[http://api.bart.gov/api/sched.aspx?cmd=fare&orig=12th&dest=embr&date=today]]>
  </uri>
  <origin>12TH</origin>
  <destination>EMBR</destination>
  <sched_num>45</sched_num>
  <trip>
    <fare>4.00</fare>
    <discount>
      <clipper>1.30</clipper>
    </discount>
  </trip>
  <fares level="normal">
    <fare amount="3.50" class="clipper" name="Clipper"/>
    <fare amount="4.00" class="cash" name="BART Blue Ticket"/>
    <fare amount="1.30" class="rtcclipper" name="Senior/Disabled Clipper"/>
    <fare amount="1.75" class="student" name="Youth Clipper"/>
  </fares>
  <message>
    <co2_emissions>
      <![CDATA[<p>CO<sub>2</sub> emissions saved by this BART trip: <strong>7.7 pounds.</strong> <a href="http://www.bart.gov/guide/carbon">Read more</a></p>]]>
    </co2_emissions>
  </message>
</root>

JSON Sample

{  
   "?xml":{  
      "@version":"1.0",
      "@encoding":"utf-8"
   },
   "root":{  
      "uri":{  
         "#cdata-section":"http://api.bart.gov/api/sched.aspx?cmd=fare&orig=12th&dest=embr&date=today&json=y"
      },
      "origin":"12TH",
      "destination":"EMBR",
      "sched_num":"45",
      "trip":{  
         "fare":"4.00",
         "discount":{  
            "clipper":"1.30"
         }
      },
      "fares":{  
         "@level":"normal",
         "fare":[  
            {  
               "@amount":"3.50",
               "@class":"clipper",
               "@name":"Clipper"
            },
            {  
               "@amount":"4.00",
               "@class":"cash",
               "@name":"BART Blue Ticket"
            },
            {  
               "@amount":"1.30",
               "@class":"rtcclipper",
               "@name":"Senior/Disabled Clipper"
            },
            {  
               "@amount":"1.75",
               "@class":"student",
               "@name":"Youth Clipper"
            }
         ]
      },
      "message":{  
         "co2_emissions":{  
            "#cdata-section":"

CO2 emissions saved by this BART trip: 7.7 pounds. Read more

" } } } }

Notes

Usage

XML: http://api.bart.gov/api/sched.aspx?cmd=fare&orig=12th&dest=embr&date=today&key=MW9S-E7SL-26DU-VV8V
JSON: http://api.bart.gov/api/sched.aspx?cmd=fare&orig=12th&dest=embr&date=today&key=MW9S-E7SL-26DU-VV8V&json=y