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[https://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"/>
	<fare amount="3.25" class="start" name="Clipper START"/>
  </fares>
</root>

JSON Sample

{
   "?xml":{
      "@version":"1.0",
      "@encoding":"utf-8"
   },
   "root":{
      "uri":{
         "#cdata-section":"https://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"
            },
			{
			   "@amount":"3.25",
			   "@class":"start",
			   "@name":"Clipper START"
      }
   }
}

Notes

Usage

XML: https://api.bart.gov/api/sched.aspx?cmd=fare&orig=12th&dest=embr&date=today&key=INSERT-KEY
JSON: https://api.bart.gov/api/sched.aspx?cmd=fare&orig=12th&dest=embr&date=today&key=INSERT-KEY&json=y