鉄道運行情報(レスキューナウ)

鉄道運行情報を取得します。
prefectureCodeを指定すると、都道府県から取得する運行情報を絞り込めます。
corporationCodeを指定すると、会社から取得する運行情報を絞り込めます。
operationLineCodeを指定すると、路線から取得する運行情報を絞り込めます。

取得できる情報はレスキューナウから提供された情報のみとなります。
なお、提供される運行情報には配信条件があります。詳しくは鉄道運行情報の提供元・配信基準をご確認ください。

GET /v1/{format}/operationLine/service/rescuenow/information

parameters

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

Name Type Required Description
format string レスポンスのデータ形式の指定。必須
指定できる値:
- xml: xml形式のデータ
- json: json形式のデータ
key string アクセスキー。必須
prefectureCode int --- 都道府県コード複数指定可。省略可。省略時は全ての地域が対象となります。operationLineCode指定時は無効。
corporationCode string --- 会社コード。複数指定可。省略可。省略時は全ての会社が対象となります。operationLineCode指定時は無効。
operationLineCode string --- 運行路線コード運行路線情報から取得できます。複数指定可。省略可。省略時は全ての路線が対象となります。

prefectureCode

レスポンスのResultSet / Information / Prefectureは、その運行情報(Information)の影響がある都道府県になります。
つまり、運行情報に影響区間を表す情報(ResultSet / Information / Section)が、
ある場合は、路線全体のうちの影響区間の範囲だけのすべての都道府県が返り、
ない場合は、路線全体を影響範囲とみなし、路線が通るすべての都道府県が返ります。


Ol service rescuenow info 01


リクエスト時のprefectureCodeは、運行情報(Information)に対しての都道府県の絞り込み条件になります。
例えば、prefectureCode=20と長野県を指定した場合、上の例の「JR中央本線(東京-塩尻)」の運行情報は返りません。

response

Name Description
ResultSet レスポンスの最下部を表す要素
ResultSet / apiVersion WebAPIバージョン
ResultSet / engineVersion エンジンバージョン
ResultSet / Corporation 会社を表す要素
ResultSet / Corporation / index インデックス
※ jsonデータ形式のレスポンスにインデックスは含まれません。JSON形式のレスポンスデータを利用する際の注意事項
ResultSet / Corporation / code 会社コード
ResultSet / Corporation / Name 名称を表す要素
ResultSet / Information 付加情報を表す要素
ResultSet / Information / provider 情報提供元
ResultSet / Information / status 運行状況
ResultSet / Information / Comment コメント文字列を表す要素
ResultSet / Information / Comment / status コメント文字列の長さを表す要素
ResultSet / Information / Datetime 情報提供元のデータ配信日時を表す要素
ResultSet / Information / Title 表題を表す要素
ResultSet / Information / Section 影響区間を表す要素
ResultSet / Information / Section / Point 地点 を表す要素
ResultSet / Information / Section / Point / Prefecture 都道府県を表す要素
ResultSet / Information / Section / Point / Prefecture / code 都道府県コード
ResultSet / Information / Section / Point / Prefecture / Name 都道府県の名称を表す要素
ResultSet / Information / Section / Point / Station を表す要素
ResultSet / Information / Section / Point / Station / code 駅コード
ResultSet / Information / Section / Point / Station / Name 駅の名称
ResultSet / Information / Section / Point / Station / Type 交通種別を表す要素
ResultSet / Information / Section / Point / Station / Type / detail 交通種別の詳細。 複数の場合は:区切り。
ResultSet / Information / Section / Point / Station / Yomi の読みかなを表す要素
ResultSet / Information / Line 運行路線を表す要素
ResultSet / Information / Line / corporationIndex ResultSet / Corporation / indexと紐づくインデックス
ResultSet / Information / Line / code 運行路線コード
ResultSet / Information / Line / Name 名称を表す要素
ResultSet / Information / Prefecture 都道府県を表す要素
※複数の都道府県に影響する情報の場合は、Prefectureが複数返ります。
ResultSet / Information / Prefecture / code 都道府県コード
ResultSet / Information / Prefecture / Name 都道府県の名称を表す要素

example

GET /v1/xml/operationLine/service/rescuenow/information?key=アクセスキーを入力してください
<?xml version="1.0" encoding="UTF-8"?>
<ResultSet apiVersion="1.27.0.0" engineVersion="">
    <Information provider="レスキューナウ" status="列車遅延">
        <Line corporationIndex="1" code="65"> 
            <Name>JR常磐線</Name>
        </Line>
        <Title>常磐線[上野〜水戸] 列車遅延</Title>
        <Section>
            <Point>
                <Station code="22528">
                    <Name>上野</Name>
                    <Type>train</Type>
                    <Yomi>うえの</Yomi>
                </Station>
                <Prefecture code="13">
                    <Name>東京都</Name>
                </Prefecture>
            </Point>
            <Point>
                <Station code="21663">
                    <Name>土浦</Name>
                    <Type>train</Type>
                    <Yomi>つちうら</Yomi>
                </Station>
                <Prefecture code="8">
                    <Name>茨城県</Name>
                </Prefecture>
            </Point>
        </Section>
        <Section>
            <Point>
                <Station code="21672">
                    <Name>友部</Name>
                    <Type>train</Type>
                    <Yomi>ともべ</Yomi>
                </Station>
                <Prefecture code="8">
                    <Name>茨城県</Name>
                </Prefecture>
            </Point>
            <Point>
                <Station code="21710">
                    <Name>水戸</Name>
                    <Type>train</Type>
                    <Yomi>みと</Yomi>
                </Station>
                <Prefecture code="8">
                    <Name>茨城県</Name>
                </Prefecture>
            </Point>
        </Section>
            :
        <Comment status="long">三河島〜南千住駅間で信号関係点検を行った影響で、現在も上野〜土浦駅間、友部〜水戸駅間の一部列車に遅れが出ています。</Comment>
        <Comment status="short">三河島〜南千住駅間で信号関係点検を行った影響で、現在も上野〜土浦駅間、友部〜水戸駅間の一部列車に遅れが出ています。</Comment>
        <Datetime>2017-09-20T13:40:00+00:00</Datetime>
        <Prefecture code="8">
            <Name>茨城県</Name>
        </Prefecture>
        <Prefecture code="12">
            <Name>千葉県</Name>
        </Prefecture>
        <Prefecture code="13">
            <Name>東京都</Name>
        </Prefecture>
    </Information>
        :
    <Corporation index="1" code="1">
        <Name>JR</Name>
    </Corporation>
    <Corporation index="2" code="18">
        <Name>東京地下鉄</Name> 
    </Corporation>
        :
</ResultSet>
GET /v1/json/operationLine/service/rescuenow/information?key=アクセスキーを入力してください
{
  "ResultSet": {
    "apiVersion": "1.27.0.0",
    "engineVersion": "",
    "Information": [
      {
        "provider": "レスキューナウ",
        "status": "列車遅延",
        "Line": {
          "code": "65",
          "corporationIndex": "1",
          "Name": "JR常磐線"
        },
        "Title": "常磐線[上野〜水戸] 列車遅延",
        "Section": [
          {
            "Point": [
              {
                "Station": {
                  "code": "22528",
                  "Name": "上野",
                  "Type": "train",
                  "Yomi": "うえの"
                },
                "Prefecture": {
                  "code": "13",
                  "Name": "東京都"
                }
              },
              {
                "Station": {
                  "code": "21663",
                  "Name": "土浦",
                  "Type": "train",
                  "Yomi": "つちうら"
                },
                "Prefecture": {
                  "code": "8",
                  "Name": "茨城県"
                }
              }
            ]
          },
          {
            "Point": [
              {
                "Station": {
                  "code": "21672",
                  "Name": "友部",
                  "Type": "train",
                  "Yomi": "ともべ"
                },
                "Prefecture": {
                  "code": "8",
                  "Name": "茨城県"
                }
              },
              {
                "Station": {
                  "code": "21710",
                  "Name": "水戸",
                  "Type": "train",
                  "Yomi": "みと"
                },
                "Prefecture": {
                  "code": "8",
                  "Name": "茨城県"
                }
              }
            ]
          },
          :
        ],
        "Comment": [
          {
            "text": "三河島〜南千住駅間で信号関係点検を行った影響で、現在も上野〜土浦駅間、友部〜水戸駅間の一部列車に遅れが出ています。",
            "status": "long"
          },
          {
            "text": "三河島〜南千住駅間で信号関係点検を行った影響で、現在も上野〜土浦駅間、友部〜水戸駅間の一部列車に遅れが出ています。",
            "status": "short"
          }
        ],
        "Datetime": "2017-09-20T13:40:00+00:00",
        "Prefecture": [
          {
            "code": "8",
            "Name": "茨城県"
          },
          {
            "code": "12",
            "Name": "千葉県"
          },
          {
            "code": "13",
            "Name": "東京都"
          }
        ]
      },
      :
    ],
    "Corporation": [
      {
        "code": "1",
        "Name": "JR"
      },
      {
        "code": "18",
        "Name": "東京地下鉄"
      },
      :
    ]
  }
}
ページ上部へ