### GET /v1/{format}/operationLine Source: https://docs.ekispert.com/v1/le/api/operationLine.html 指定された条件に基づいて運行路線情報を取得します。codeを指定して特定の路線を取得するか、nameやその他のパラメータで絞り込み検索が可能です。 ```APIDOC ## GET /v1/{format}/operationLine ### Description 「駅すぱあと」の保持する運行路線の情報(鉄道のみ)を取得します。codeを指定すると、指定した運行路線の情報を返します。nameを指定すると、運行路線の前方一致による絞り込みを行います。 ### Method GET ### Endpoint /v1/{format}/operationLine ### Parameters #### Path Parameters - **format** (string) - Required - レスポンスのデータ形式の指定 (xml または json) #### Query Parameters - **key** (string) - Required - アクセスキー - **code** (string) - Optional - 運行路線コード (nameと排他) - **name** (string) - Optional - 運行路線名 (codeと排他) - **nameMatchType** (string) - Optional - マッチング方式 (forward: 前方一致, partial: 部分一致) - **corporationCode** (string) - Optional - 会社コード (corporationNameと排他) - **corporationName** (string) - Optional - 会社名 (corporationCodeと排他) - **prefectureCode** (int) - Optional - 都道府県コード - **date** (int) - Optional - 日付 (YYYYMMDD) - **offset** (int) - Optional - データの取得開始位置 - **limit** (int) - Optional - データのブロック件数 (1-100) ### Response #### Success Response (200) - **ResultSet** (object) - レスポンスの最下部要素 - **ResultSet / apiVersion** (string) - WebAPIバージョン - **ResultSet / engineVersion** (string) - エンジンバージョン - **ResultSet / max** (string) - データの全件数 - **ResultSet / offset** (string) - データ開始位置のオフセット値 - **ResultSet / Corporation** (object) - 会社情報 - **ResultSet / Line** (object) - 運行路線情報 ``` -------------------------------- ### GET /v1/{format}/station/light Source: https://docs.ekispert.com/v1/le/api Retrieves simplified information about a station. ```APIDOC ## GET /v1/{format}/station/light ### Description Retrieves simplified information about a station. ### Method GET ### Endpoint /v1/{format}/station/light ### Parameters #### Path Parameters - **format** (string) - Required - The response format (e.g., xml, json). ``` -------------------------------- ### GET /v1/{format}/search/course/light Source: https://docs.ekispert.com/v1/le/api Generates a URL for the 駅すぱあと for web service. ```APIDOC ## GET /v1/{format}/search/course/light ### Description Generates a URL for the 駅すぱあと for web service. ### Method GET ### Endpoint /v1/{format}/search/course/light ### Parameters #### Path Parameters - **format** (string) - Required - The response format (e.g., xml, json). ``` -------------------------------- ### GET /{format}/search/course/light Source: https://docs.ekispert.com/v1/le/tools/api-tester Generates a URL for displaying 駅すぱあと for web search results. ```APIDOC ## GET /{format}/search/course/light ### Description 駅すぱあと for web探索結果を表示するためのURLを生成します。リクエストパラメータのredirectにtrueを指定すると、レスポンスを生成したURLへのリダイレクトとして返します。 ### Method GET ### Endpoint /{format}/search/course/light ### Parameters #### Path Parameters - **format** (string) - Required - レスポンスのデータ形式の指定 #### Query Parameters - **from** (string) - Optional - 出発駅(地)。駅コード、駅の名称を指定可能です。 - **to** (string) - Optional - 到着駅(地)。駅コード、駅の名称を指定可能です。 - **via** (string) - Optional - 経由駅(地)。駅コード、駅の名称を指定可能です。 - **date** (integer) - Optional - 探索日付 (Format: YYYYMMDD)。 - **time** (integer) - Optional - 探索時刻 (Format: HHMM)。 - **searchType** (string) - Optional - 探索種別 (departure, arrival, lastTrain, firstTrain)。 - **plane** (string) - Optional - 飛行機 (true, false)。 - **shinkansen** (string) - Optional - 新幹線 (true, false)。 - **limitedExpress** (string) - Optional - 特急 (true, false)。 - **redirect** (string) - Optional - 結果をリダイレクトするかどうか (true, false)。 - **contentsMode** (string) - Optional - 生成するURLの種類 (pc, sp)。 ### Response #### Success Response (200) - **200** - 正常レスポンス ``` -------------------------------- ### GET /v1/{format}/station/info Source: https://docs.ekispert.com/v1/le/api Retrieves additional information for a station. ```APIDOC ## GET /v1/{format}/station/info ### Description Retrieves additional information for a station. ### Method GET ### Endpoint /v1/{format}/station/info ### Parameters #### Path Parameters - **format** (string) - Required - The response format (e.g., xml, json). ``` -------------------------------- ### GET /{format}/station/light Source: https://docs.ekispert.com/v1/le/tools/api-tester Returns simplified information about stations matching the specified criteria. ```APIDOC ## GET /{format}/station/light ### Description 指定された条件に当てはまる駅の情報を返します。 ### Method GET ### Endpoint /{format}/station/light ``` -------------------------------- ### GET /v1/{format}/station Source: https://docs.ekispert.com/v1/le/api Retrieves detailed information about a station. ```APIDOC ## GET /v1/{format}/station ### Description Retrieves detailed information about a station. ### Method GET ### Endpoint /v1/{format}/station ### Parameters #### Path Parameters - **format** (string) - Required - The response format (e.g., xml, json). ``` -------------------------------- ### GET /v1/{format}/corporation Source: https://docs.ekispert.com/v1/le/api/corporation.html 会社の情報を取得します。oldNameに会社の旧名称を指定すると、新名称を取得できます。 ```APIDOC ## GET /v1/{format}/corporation ### Description 会社の情報を取得します。oldNameに会社の旧名称を指定すると、新名称を取得できます。 ### Method GET ### Endpoint /v1/{format}/corporation ### Parameters #### Path Parameters - **format** (string) - Required - レスポンスのデータ形式の指定 (xml または json) #### Query Parameters - **key** (string) - Required - アクセスキー - **code** (int) - Optional - 会社コード。prefectureCode, oldNameと排他。 - **name** (string) - Optional - 会社の名称(前方一致)。code, oldNameと排他。 - **prefectureCode** (int) - Optional - 都道府県コード。複数指定可。 - **oldName** (string) - Optional - 会社の旧名称。prefectureCode, typeと排他。 - **offset** (int) - Optional - データの取得開始位置。Default: 1 - **limit** (int) - Optional - データのブロック件数。1から100。Default: 100 ### Response #### Success Response (200) - **ResultSet** (object) - レスポンスの最下部要素 - **ResultSet / apiVersion** (string) - WebAPIバージョン - **ResultSet / engineVersion** (string) - エンジンバージョン - **ResultSet / max** (int) - データの全件数 - **ResultSet / offset** (int) - データ開始位置のオフセット値 - **ResultSet / Corporation** (array) - 会社を表す要素のリスト - **ResultSet / Corporation / code** (string) - 会社コード - **ResultSet / Corporation / Name** (string) - 会社の名称 - **ResultSet / Corporation / OldName** (string) - 会社の旧名称 (oldName指定時のみ) - **ResultSet / Corporation / Type** (string) - 交通種別 (train または plane) - **ResultSet / Corporation / Type / detail** (string) - 交通種別の詳細 ### Response Example { "ResultSet": { "apiVersion": "1.27.0.0", "max": "5", "offset": "1", "engineVersion": "201612_02a", "Corporation": [ { "code": "1", "Name": "JR", "Type": "train" } ] } } ``` -------------------------------- ### GET /v1/xml/station/info Source: https://docs.ekispert.com/v1/le/api/station/info.html Retrieves station information in XML format. ```APIDOC ## GET /v1/xml/station/info ### Description Retrieves detailed station information including operation lines, rail services, nearby rail, exits, and welfare facilities in XML format. ### Method GET ### Endpoint /v1/xml/station/info ### Parameters #### Query Parameters - **key** (string) - Required - Access key for the API. - **code** (string) - Required - The station code. - **type** (string) - Required - The information types to retrieve (e.g., operationLine, rail, nearrail, exit, welfare). ``` -------------------------------- ### GET /v1/json/station/info Source: https://docs.ekispert.com/v1/le/api/station/info.html Retrieves station information in JSON format. ```APIDOC ## GET /v1/json/station/info ### Description Retrieves detailed station information including operation lines, rail services, nearby rail, exits, and welfare facilities in JSON format. ### Method GET ### Endpoint /v1/json/station/info ### Parameters #### Query Parameters - **key** (string) - Required - Access key for the API. - **code** (string) - Required - The station code. - **type** (string) - Required - The information types to retrieve (e.g., operationLine, rail, nearrail, exit, welfare). ``` -------------------------------- ### GET /v1/{format}/operationLine Source: https://docs.ekispert.com/v1/le/api Retrieves information about operating lines. ```APIDOC ## GET /v1/{format}/operationLine ### Description Retrieves information about operating lines. ### Method GET ### Endpoint /v1/{format}/operationLine ### Parameters #### Path Parameters - **format** (string) - Required - The response format (e.g., xml, json). ``` -------------------------------- ### GET /{format}/station Source: https://docs.ekispert.com/v1/le/tools/api-tester Returns information about stations matching the specified criteria. ```APIDOC ## GET /{format}/station ### Description 指定された条件に当てはまる駅の情報を返します。 ### Method GET ### Endpoint /{format}/station ### Parameters #### Path Parameters - **format** (string) - Required - レスポンスのデータ形式の指定 #### Query Parameters - **name** (string) - Optional - 候補文字列。 - **oldName** (string) - Optional - 駅の旧名称。 - **code** (integer) - Optional - 駅コード。 - **corporationName** (string) - Optional - 会社。 - **railName** (string) - Optional - 駅すぱあとの平均路線名。 - **operationLineCode** (string) - Optional - 運行路線コード。 - **type** (string) - Optional - 駅の路線の交通種別 (train, plane)。 - **prefectureCode** (integer) - Optional - 都道府県コード。 - **offset** (integer) - Optional - データの取得開始位置。 - **limit** (integer) - Optional - データのブロック件数(最大100件)。 - **direction** (string) - Optional - 路線の停車駅取得方向 (up, down, none)。 - **corporationBind** (string) - Optional - 固定会社名。 - **gcs** (string) - Optional - 座標の測地系 (tokyo, wgs84)。 ### Response #### Success Response (200) - **200** - 正常レスポンス ``` -------------------------------- ### GET /{format}/station/info Source: https://docs.ekispert.com/v1/le/tools/api-tester Retrieves additional information for a specified station, such as connecting lines, welfare facilities, or exit signs. ```APIDOC ## GET /{format}/station/info ### Description 指定した駅の付加情報を取得します。 ### Method GET ### Endpoint /{format}/station/info ### Parameters #### Path Parameters - **format** (string) - Required - レスポンスのデータ形式の指定 (xml, json) #### Query Parameters - **code** (integer) - Required - 駅コード - **type** (string) - Optional - 情報種別 (operationLine, rail, nearrail, welfare, exit). 複数指定可。 ### Response #### Success Response (200) - **200** - 正常レスポンス ``` -------------------------------- ### GET /v1/{format}/rail Source: https://docs.ekispert.com/v1/le/api/rail.html 平均路線の情報を取得します。名称、旧名称、会社、または2点間の駅を指定して検索できます。 ```APIDOC ## GET /v1/{format}/rail ### Description 「駅すぱあと」の保持する平均路線の情報を取得します。name、oldName、corporationCode、corporationName、from、toなどのパラメータを使用して絞り込みが可能です。 ### Method GET ### Endpoint /v1/{format}/rail ### Parameters #### Path Parameters - **format** (string) - Required - レスポンスのデータ形式(xmlまたはjson) #### Query Parameters - **key** (string) - Required - アクセスキー - **name** (string) - Optional - 平均路線の名称(前方一致) - **oldName** (string) - Optional - 平均路線の旧名称 - **corporationCode** (int) - Optional - 会社コード - **corporationName** (string) - Optional - 会社の名称 - **from** (string) - Optional (△) - 駅コードまたは駅の名称(to指定時に必須) - **to** (string) - Optional (△) - 駅コードまたは駅の名称(from指定時に必須) - **prefectureCode** (int) - Optional - 都道府県コード - **date** (int) - Optional - 日付 (YYYYMMDD) - **type** (string) - Optional - 交通種別 (train, plane) - **offset** (int) - Optional - データの取得開始位置 - **limit** (int) - Optional - データのブロック件数(最大100) ``` -------------------------------- ### 駅簡易情報 XML 取得例 Source: https://docs.ekispert.com/v1/le/api/station/light.html XML形式で駅情報を取得するリクエストとレスポンスの例です。 ```http GET /v1/xml/station/light?key=アクセスキーを入力してください&name=東京 ``` ```xml 東京 train とうきょう 東京都 成田空港(東京) plane なりたくうこう 千葉県 羽田空港(東京) plane はねだくうこう 東京都 とうきょうスカイツリー train とうきょうすかいつりー 東京都 : ``` -------------------------------- ### 駅情報取得エンドポイント Source: https://docs.ekispert.com/v1/le/api/station.html 駅情報を取得するためのHTTP GETリクエストのパスです。 ```http GET /v1/{format}/station ``` -------------------------------- ### GET /v1/{format}/corporation Source: https://docs.ekispert.com/v1/le/api Retrieves information about a company. ```APIDOC ## GET /v1/{format}/corporation ### Description Retrieves information about a company. ### Method GET ### Endpoint /v1/{format}/corporation ### Parameters #### Path Parameters - **format** (string) - Required - The response format (e.g., xml, json). ``` -------------------------------- ### 運行路線情報 API エンドポイント Source: https://docs.ekispert.com/v1/le/api/operationLine.html 運行路線情報を取得するためのベースとなるリクエストパスです。 ```http GET /v1/{format}/operationLine ``` -------------------------------- ### 運行路線情報 XML 取得例 Source: https://docs.ekispert.com/v1/le/api/operationLine.html XML形式で運行路線情報を取得するリクエストとレスポンスの例です。 ```http GET /v1/xml/operationLine?key=アクセスキーを入力してください ``` ```xml JR JR北海道新幹線 じぇいあーるほっかいどうしんかんせん 010140013 JR東海道新幹線 じぇいあーるとうかいどうしんかんせん 001032197 : ``` -------------------------------- ### JSONにおけるテキストノードの変換 Source: https://docs.ekispert.com/v1/le/get-started/attention XMLのテキストノードのみ、または属性とテキストノードが混在する場合のJSON変換例。 ```xml train ``` ```json {"Type": "train"} ``` ```xml bus ``` ```json { "Type": { "detail": "local", "text": "bus" } } ``` -------------------------------- ### GET /v1/{format}/rail Source: https://docs.ekispert.com/v1/le/api Retrieves average route information. ```APIDOC ## GET /v1/{format}/rail ### Description Retrieves average route information. ### Method GET ### Endpoint /v1/{format}/rail ### Parameters #### Path Parameters - **format** (string) - Required - The response format (e.g., xml, json). ``` -------------------------------- ### Retrieve station information by code Source: https://docs.ekispert.com/v1/le/api/station.html Use the station code to fetch detailed station data. Replace the key parameter with your valid access key. ```http GET /v1/xml/station?key=アクセスキーを入力してください&code=22828 ``` ```xml 東京 train とうきょう 東京都 ``` ```http GET /v1/json/station?key=アクセスキーを入力してください&code=22828 ``` ```json { "ResultSet": { "apiVersion": "1.27.0.0", "engineVersion": "201612_02a", "Point": { "Station": { "code": "22828", "Name": "東京", "Type": "train", "Yomi": "とうきょう" }, "Prefecture": { "code": "13", "Name": "東京都" }, "GeoPoint": { "longi": "139.46.13.59", "lati": "35.40.41.9", "longi_d": "139.770444", "lati_d": "35.678083", "gcs": "tokyo" } } } } ``` -------------------------------- ### 詳細路線種別パラメータ指定 Source: https://docs.ekispert.com/v1/le/dictionary/detail-rail-type 詳細路線種別を指定するためのパラメータ形式と使用例です。 ```APIDOC ## 詳細路線種別パラメータ ### 説明 路線の詳細な交通種別を指定します。通常の交通種別に加え、列車の詳細な情報が存在する場合に使用します。 ### 値一覧 - **limitedExpress**: 有料特急 - **shinkansen**: 新幹線 - **sleeperTrain**: 寝台列車 - **liner**: ライナー(乗車整理券、ライナー券、普通車指定席券が必要な列車) ### 使用例 #### 単一指定 ``` type=train.limitedExpress ``` #### 複数指定 ``` type=train.limitedExpress:train.shinkansen ``` ``` -------------------------------- ### GET /{format}/operationLine Source: https://docs.ekispert.com/v1/le/tools/api-tester Retrieves information about railway operation lines maintained by Ekispert. ```APIDOC ## GET /{format}/operationLine ### Description 駅すぱあとの保持する運行路線の情報(鉄道のみ)を取得します。 ### Method GET ### Endpoint /{format}/operationLine ### Parameters #### Path Parameters - **format** (string) - Required - レスポンスのデータ形式の指定 (xml, json) #### Query Parameters - **code** (string) - Optional - 運行路線コード - **name** (string) - Optional - 運行路線名 - **nameMatchType** (string) - Optional - マッチング方式 (forward, partial). Default: forward - **corporationCode** (string) - Optional - 運行会社コード - **corporationName** (string) - Optional - 運行会社名 - **prefectureCode** (integer) - Optional - 都道府県コード - **date** (integer) - Optional - 日付 (YYYYMMDD) - **offset** (integer) - Optional - データの取得開始位置. Default: 1 - **limit** (integer) - Optional - データのブロック件数 (1-100). Default: 100 - **gcs** (string) - Optional - 座標の測地系 (tokyo, wgs84). Default: tokyo ### Response #### Success Response (200) - **200** - 正常レスポンス ``` -------------------------------- ### 駅簡易情報 JSON 取得例 Source: https://docs.ekispert.com/v1/le/api/station/light.html JSON形式で駅情報を取得するリクエストとレスポンスの例です。 ```http GET /v1/json/station/light?key=アクセスキーを入力してください&name=東京 ``` ```json { "ResultSet": { "apiVersion": "1.27.0.0", "engineVersion": "201612_02a", "Point": [ { "Station": { "code": "22828", "Name": "東京", "Type": "train", "Yomi": "とうきょう" }, "Prefecture": { "code": "13", "Name": "東京都" } }, { "Station": { "code": "29110", "Name": "成田空港(東京)", "Type": "plane", "Yomi": "なりたくうこう" }, "Prefecture": { "code": "12", "Name": "千葉県" } }, { "Station": { "code": "22827", "Name": "羽田空港(東京)", "Type": "plane", "Yomi": "はねだくうこう" }, "Prefecture": { "code": "13", "Name": "東京都" } }, { "Station": { "code": "22859", "Name": "とうきょうスカイツリー", "Type": "train", "Yomi": "とうきょうすかいつりー" }, "Prefecture": { "code": "13", "Name": "東京都" } }, { : } ] } } ``` -------------------------------- ### XML形式でのURL生成リクエストとレスポンス Source: https://docs.ekispert.com/v1/le/api/search/course/light.html XML形式で探索結果URLをリクエストし、取得する例です。 ```http GET /v1/xml/search/course/light?key=アクセスキーを入力してください&from=22828&to=25853 ``` ```xml https://roote.ekispert.net/result?arr=%E5%A4%A7%E9%98%AA&arr_code=25853&connect=true&dep=%E6%9D%B1%E4%BA%AC&dep_code=22828&highway=true&hour&limitedExpress=true&liner=true&local=true&minute&plane=true&shinkansen=true&ship=true&sleep=false&sort=time&surcharge=3&type=dep&via1=&via1_code=&via2=&via2_code= ``` -------------------------------- ### 駅簡易情報APIのリクエスト例 Source: https://docs.ekispert.com/v1/le/get-started/guide 駅簡易情報APIを利用して駅情報を取得するHTTPリクエストの例です。アクセスキーをクエリパラメータとして指定する必要があります。 ```http GET /v1/xml/station/light?key=アクセスキーを入力してください&name=東京 ``` -------------------------------- ### GET /{format}/corporation Source: https://docs.ekispert.com/v1/le/tools/api-tester Retrieves information about transportation companies. You can search by company code, name, prefecture, or old name. ```APIDOC ## GET /{format}/corporation ### Description Retrieves company information. If an old name is provided, the new name can be retrieved. ### Method GET ### Endpoint /{format}/corporation ### Parameters #### Path Parameters - **format** (string) - Required - Response data format (xml or json) #### Query Parameters - **code** (integer) - Optional - Company code. Mutually exclusive with prefectureCode and oldName. - **name** (string) - Optional - Company name (prefix match). Mutually exclusive with code and oldName. - **prefectureCode** (integer) - Optional - Prefecture code. Multiple values allowed. Invalid when oldName is specified. - **oldName** (string) - Optional - Old company name. Mutually exclusive with prefectureCode and type. - **offset** (integer) - Optional - Data retrieval start position. Default: 1. Invalid when oldName is specified. - **limit** (integer) - Optional - Number of data blocks. Range: 1-100. Default: 100. Invalid when oldName is specified. ### Response #### Success Response (200) - **200** - Normal response ``` -------------------------------- ### JSONにおけるindexと配列の変換例 Source: https://docs.ekispert.com/v1/le/get-started/attention XMLのindex属性がJSONでは配列に変換される際の構造比較。 ```xml 東京 JR新幹線のぞみ 新大阪 JR東海道本線・西明石行 大阪 ``` ```json "Route": { "Point": [ { "Station": { "Name": "東京", } }, { "Station": { "Name": "新大阪", } }, { "Station": { "Name": "大阪", } } ], "Line": [ { "Name": "JR新幹線のぞみ", }, { "Name": "JR東海道本線・西明石行", } ], } ``` -------------------------------- ### GET /v1/{format}/rail Source: https://docs.ekispert.com/v1/le/api/rail.html Retrieves railway line information. You can filter by corporation name or search for a new name using an old name. ```APIDOC ## GET /v1/{format}/rail ### Description Retrieves a list of railway lines based on the provided query parameters. Supports filtering by corporation name or resolving old line names to current ones. ### Method GET ### Endpoint /v1/{format}/rail ### Parameters #### Query Parameters - **key** (string) - Required - Access key for the API. - **corporationName** (string) - Optional - The name of the corporation to filter railway lines. - **oldName** (string) - Optional - The old name of a railway line to retrieve the current name. ### Response #### Success Response (200) - **ResultSet** (object) - The root element of the response containing API version, engine version, and line data. ``` -------------------------------- ### URL生成API エンドポイント Source: https://docs.ekispert.com/v1/le/api/search/course/light.html 探索結果URL生成のためのベースパスです。formatにはxmlまたはjsonを指定します。 ```http GET /v1/{format}/search/course/light ``` -------------------------------- ### GET /v1/json/station Source: https://docs.ekispert.com/v1/le/api/station.html Retrieves station information based on a specific station code or an old station name. The response format can be requested as XML or JSON. ```APIDOC ## GET /v1/json/station ### Description Retrieves station information by specifying either a station code or an old station name. The API returns details such as the station name, type, prefecture, and geographic coordinates. ### Method GET ### Endpoint /v1/json/station ### Parameters #### Query Parameters - **key** (string) - Required - Access key for the API. - **code** (string) - Optional - The unique station code to look up. - **oldName** (string) - Optional - The old station name to look up. ### Response #### Success Response (200) - **ResultSet** (object) - Contains the station information, prefecture details, and geographic coordinates. #### Response Example { "ResultSet": { "apiVersion": "1.27.0.0", "engineVersion": "201612_02a", "Point": { "Station": { "code": "22828", "Name": "東京", "Type": "train", "Yomi": "とうきょう" }, "Prefecture": { "code": "13", "Name": "東京都" }, "GeoPoint": { "longi": "139.46.13.59", "lati": "35.40.41.9", "longi_d": "139.770444", "lati_d": "35.678083", "gcs": "tokyo" } } } } ``` -------------------------------- ### 駅簡易情報 API エンドポイント Source: https://docs.ekispert.com/v1/le/api/station/light.html 駅簡易情報を取得するための基本リクエストパスです。 ```http GET /v1/{format}/station/light ``` -------------------------------- ### 会社情報取得エンドポイント Source: https://docs.ekispert.com/v1/le/api/corporation.html 会社情報を取得するための基本リクエストパスです。 ```http GET /v1/{format}/corporation ``` -------------------------------- ### 駅簡易情報APIのレスポンス例 Source: https://docs.ekispert.com/v1/le/get-started/guide 駅簡易情報APIから返されるXML形式のレスポンス例です。 ```xml 東京 train とうきょう 東京都 成田空港(東京) plane なりたくうこう 千葉県 羽田空港(東京) plane はねだくうこう 東京都 : ```