経路の生成

特急列車時刻表鉄道駅時刻表区間時刻表の結果から取得できる列車等を特定するコードを利用した経路生成機能です。

駅、列車、日付、時刻を正しく設定することにより、任意の経路を生成できます。

<出発駅>(出発日時)−[列車]−(到着時刻)<到着駅>

経路の生成に必要な情報には上記のようなものがあり、

viaList=出発駅:到着駅&fixedTrainList=列車&fixedTimeList=発時刻:着時刻&fixedDateList=出発日(運行日)

これらを上記のように指定します。

GET /v1/{format}/course/create

parameters

※ Requiredの「△」は、特定の条件においてそのパラメータが必須になることを示します。詳しくはパラメータのDescriptionを参照してください。

Name Type Required Description
format string レスポンスのデータ形式の指定。必須
指定できる値:
- xml: xml形式のデータ
- json: json形式のデータ
※クエリパラメータではなくパスに値を指定します。
key string アクセスキー。必須
viaList string 駅コードまたは駅の名称のリスト。必須。複数指定
fixedTrainList string 特急列車時刻表鉄道駅時刻表区間時刻表の結果から取得できる列車等を特定するコード。必須。複数指定
平均路線情報で取得できる列車等を特定するコードとは互換性がありません。
fixedDateList string 列車運行日。必須
Format: YYYYMMDD
fixedTimeList string 列車の発着時刻。必須。複数指定
Format: HHMM

response

経路探索と同等

example

GET /v1/xml/course/create?key=アクセスキーを入力してください&viaList=25077:28283&fixedTrainList=22898&fixedDateList=20140424&fixedTimeList=0620:0941
<?xml version="1.0" encoding="UTF-8"?>
<ResultSet apiVersion="1.14.0.0" engineVersion="201404_01a">
  <Course dataType="onTimetable">
    <Route index="1" timeOnBoard="201" timeWalk="0" timeOther="0" transferCount="0" distance="8089" exhaustCO2="15369" exhaustCO2atPassengerCar="135895">
      <Point index="1">
        <Prefecture code="23">
          <Name>愛知県</Name>
        </Prefecture>
        <Station code="25077">
          <Name>名古屋</Name>
          <Yomi>なごや</Yomi>
          <Type>train</Type>
        </Station>
      </Point>
      <Line index="1" fareIndex="1" chargeIndex="2" timeOnBoard="201" distance="8089" stopStationCount="7" exhaustCO2="15369" exhaustCO2atPassengerCar="135895">
        <Name>JR新幹線のぞみ</Name>
        <Type detail="shinkansen">train</Type>
        <Number>95</Number>
        <Color>051102255</Color>
        <DepartureState no="17">
          <Type>normal</Type>
          <Datetime operation="today">2014-04-24T06:20:00+09:00</Datetime>
        </DepartureState>
        <ArrivalState no="15">
          <Type>normal</Type>
          <Datetime operation="today">2014-04-24T09:41:00+09:00</Datetime>
        </ArrivalState>
        <TimeReliability>onTimetable</TimeReliability>
        <Destination>博多</Destination>
      </Line>
      <Point index="2">
        <Prefecture code="40">
          <Name>福岡県</Name>
        </Prefecture>
        <Station code="28283">
          <Name>博多</Name>
          <Yomi>はかた</Yomi>
          <Type>train</Type>
        </Station>
      </Point>
    </Route>
    <Price kind="FareSummary">
      <Oneway>11120</Oneway>
      <Round>20000</Round>
    </Price>
    <Price kind="Fare" index="1" fromLineIndex="1" toLineIndex="1" fareRevisionStatus="none" selected="true">
      <Oneway>11120</Oneway>
      <Round>20000</Round>
      <Type>Fare</Type>
    </Price>
    <Price kind="ChargeSummary">
      <Oneway>6380</Oneway>
      <Round>12760</Round>
    </Price>
    <Price kind="Charge" index="1" fromLineIndex="1" toLineIndex="1" fareRevisionStatus="none" selected="false">
      <Oneway>7420</Oneway>
      <Round>14840</Round>
      <Name>指定席</Name>
      <Type>Reserved</Type>
      <Rate area="Main">Regular</Rate>
    </Price>
    <Price kind="Charge" index="2" fromLineIndex="1" toLineIndex="1" fareRevisionStatus="none" selected="true">
      <Oneway>6380</Oneway>
      <Round>12760</Round>
      <Name>自由席</Name>
      <Type>Free</Type>
    </Price>
    <Price>
    :
    </Price>
    <SerializeData>SHlUczAxLjAwLjA0rAQBAAAAJFEzAQIAAQAAAAEAAgAAAAgAAQAAAgAAAwAAAAAAAAABAPVhAAB7bgAAAAAAAAoAgQAAAFlyAAEACYhRMwF8AQAARQIAAAIAAQABAAIAAQABAAAAAAABAAEAAgAAAA**--T3221233232319:F3321122120:A23121141:--a84feb55a98be4f6c492a143ad63b0676d1319b6</SerializeData>
  </Course>
</ResultSet>
GET /v1/json/course/create?key=アクセスキーを入力してください&viaList=25077:28283&fixedTrainList=22898&fixedDateList=20140424&fixedTimeList=0620:0941
{
  "ResultSet": {
    "apiVersion": "1.14.0.0",
    "engineVersion": "201404_01a",
    "Course": {
      "dataType": "onTimetable",
      "Route": {
        "timeOnBoard": "201",
        "timeWalk": "0",
        "timeOther": "0",
        "transferCount": "0",
        "distance": "8089",
        "exhaustCO2": "15369",
        "exhaustCO2atPassengerCar": "135895",
        "Point": [
          {
            "Prefecture": {
              "code": "23",
              "Name": "愛知県"
            },
            "Station": {
              "code": "25077",
              "Name": "名古屋",
              "Yomi": "なごや",
              "Type": "train"
            }
          },
          {
            "Prefecture": {
              "code": "40",
              "Name": "福岡県"
            },
            "Station": {
              "code": "28283",
              "Name": "博多",
              "Yomi": "はかた",
              "Type": "train"
            }
          }
        ],
        "Line": {
          "fareIndex": "1",
          "chargeIndex": "2",
          "timeOnBoard": "201",
          "distance": "8089",
          "stopStationCount": "7",
          "exhaustCO2": "15369",
          "exhaustCO2atPassengerCar": "135895",
          "Name": "JR新幹線のぞみ",
          "Type": {
            "text": "train",
            "detail": "shinkansen"
          },
          "Number": "95",
          "Color": "051102255",
          "DepartureState": {
            "no": "17",
            "Type": "normal",
            "Datetime": {
              "text": "2014-03-24T06:20:00+09:00",
              "operation": "today"
            }
          },
          "ArrivalState": {
            "no": "15",
            "Type": "normal",
            "Datetime": {
              "text": "2014-03-24T09:41:00+09:00",
              "operation": "today"
            }
          },
          "TimeReliability": "onTimetable",
          "Destination": "博多"
        }
      },
      "Price": [
        {
          "kind": "FareSummary",
          "Oneway": "10820",
          "Round": "19460"
        },
        {
          "kind": "Fare",
          "index": "1",
          "fromLineIndex": "1",
          "toLineIndex": "1",
          "fareRevisionStatus": "none",
          "selected": "true",
          "Oneway": "10820",
          "Round": "19460",
          "Type": "Fare"
        },
        {
          "kind": "ChargeSummary",
          "Oneway": "6200",
          "Round": "12400"
        },
        {
          "kind": "Charge",
          "index": "1",
          "fromLineIndex": "1",
          "toLineIndex": "1",
          "fareRevisionStatus": "none",
          "selected": "false",
          "Oneway": "7410",
          "Round": "14820",
          "Name": "指定席",
          "Type": "Reserved",
          "Rate": {
            "text": "High",
            "area": "Main"
          }
        },
        {
          "kind": "Charge",
          "index": "2",
          "fromLineIndex": "1",
          "toLineIndex": "1",
          "fareRevisionStatus": "none",
          "selected": "true",
          "Oneway": "6200",
          "Round": "12400",
          "Name": "自由席",
          "Type": "Free"
        },
        {
          :
        }
      ],
      "SerializeData": "SHlUczAxLjAwLjA0rAQBAAAAJFEzAQIAAQAAAAEAAgAAAAgAAQAAAgAAAwAAAAAAAAABAPVhAAB7bgAAAAAAAAoAgQAAAFlyAAEACSRRMwF8AQAARQIAAAIAAQABAAIAAQABAAAAAAABAAEAAgAAAA**--T3221233232319:F3321122120:A23121141:--0fdafe82092b49d357277625df3357b3c4ccb0d2"
    }
  }
}
ページ上部へ