経路検索API(α版)

経路検索を行うことのできる経路検索APIです。

平日ダイヤ、最短所要時間の経路を検索できます。

なお、この機能はα版であり、今後、仕様が大幅に変更される可能性があります。

また、予告なく終了する可能性があります。


経路探索を行う

【version 3】

出発駅・到着駅を基に、経路探索を行います。2020年4月15日現在、平日ダイヤのみの対応です。

〔例〕https://api-v3.workerstep.work/?query=routesearch_title_response_title_v3&start_node=鶴見&end_node=中野新橋&start_time=9:00


レスポンス例

[{"route":[{"trip_id:":"wait","stop_times":[{"stop_id":"odpt.Station:JR-East.KeihinTohokuNegishi.Tsurumi","departure_time":"9:01","title":"鶴見","odpt_sameas":"odpt.Station:JR-East.KeihinTohokuNegishi.Tsurumi"},{"stop_id":"odpt.Station:JR-East.KeihinTohokuNegishi.Tsurumi","departure_time":"9:01","title":"鶴見","odpt_sameas":"odpt.Station:JR-East.KeihinTohokuNegishi.Tsurumi"},{"stop_id":"odpt.Station:JR-East.KeihinTohokuNegishi.Tsurumi","departure_time":"9:06","title":"鶴見","odpt_sameas":"odpt.Station:JR-East.KeihinTohokuNegishi.Tsurumi"}]},{"trip_id:":"odpt.TrainTimetable:JR-East.KeihinTohokuNegishi.942A.Weekday","stop_times":[{"stop_id":"odpt.Station:JR-East.KeihinTohokuNegishi.Tsurumi","departure_time":"9:06","title":"鶴見","odpt_sameas":"odpt.Station:JR-East.KeihinTohokuNegishi.Tsurumi"},{"stop_id":"odpt.Station:JR-East.KeihinTohokuNegishi.Kawasaki","departure_time":"9:10","title":"川崎","odpt_sameas":"odpt.Station:JR-East.KeihinTohokuNegishi.Kawasaki"}]},{"trip_id:":"walk","stop_times":[{"stop_id":"odpt.Station:JR-East.KeihinTohokuNegishi.Kawasaki","departure_time":"9:10","title":"川崎","odpt_sameas":"odpt.Station:JR-East.KeihinTohokuNegishi.Kawasaki"},{"stop_id":"odpt.Station:JR-East.Tokaido.Kawasaki","departure_time":"9:11","title":"川崎","odpt_sameas":"odpt.Station:JR-East.Tokaido.Kawasaki"}]},{"trip_id:":"odpt.TrainTimetable:JR-East.Tokaido.1564E.Weekday","stop_times":[{"stop_id":"odpt.Station:JR-East.Tokaido.Kawasaki","departure_time":"9:11","title":"川崎","odpt_sameas":"odpt.Station:JR-East.Tokaido.Kawasaki"},{"stop_id":"odpt.Station:JR-East.Tokaido.Shinagawa","departure_time":"9:22","title":"品川","odpt_sameas":"odpt.Station:JR-East.Tokaido.Shinagawa"},{"stop_id":"odpt.Station:JR-East.Tokaido.Shimbashi","departure_time":"9:27","title":"新橋","odpt_sameas":"odpt.Station:JR-East.Tokaido.Shimbashi"}]},{"trip_id:":"walk","stop_times":[{"stop_id":"odpt.Station:JR-East.Tokaido.Shimbashi","departure_time":"9:27","title":"新橋","odpt_sameas":"odpt.Station:JR-East.Tokaido.Shimbashi"},{"stop_id":"odpt.Station:TokyoMetro.Ginza.Shimbashi","departure_time":"9:31","title":"新橋","odpt_sameas":"odpt.Station:TokyoMetro.Ginza.Shimbashi"}]},{"trip_id:":"odpt.TrainTimetable:TokyoMetro.Ginza.A911.Weekday","stop_times":[{"stop_id":"odpt.Station:TokyoMetro.Ginza.Shimbashi","departure_time":"9:31","title":"新橋","odpt_sameas":"odpt.Station:TokyoMetro.Ginza.Shimbashi"},{"stop_id":"odpt.Station:TokyoMetro.Ginza.Toranomon","departure_time":"9:33","title":"虎ノ門","odpt_sameas":"odpt.Station:TokyoMetro.Ginza.Toranomon"},{"stop_id":"odpt.Station:TokyoMetro.Ginza.TameikeSanno","departure_time":"9:35","title":"溜池山王","odpt_sameas":"odpt.Station:TokyoMetro.Ginza.TameikeSanno"},{"stop_id":"odpt.Station:TokyoMetro.Ginza.AkasakaMitsuke","departure_time":"9:37","title":"赤坂見附","odpt_sameas":"odpt.Station:TokyoMetro.Ginza.AkasakaMitsuke"}]},{"trip_id:":"walk","stop_times":[{"stop_id":"odpt.Station:TokyoMetro.Ginza.AkasakaMitsuke","departure_time":"9:37","title":"赤坂見附","odpt_sameas":"odpt.Station:TokyoMetro.Ginza.AkasakaMitsuke"},{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.AkasakaMitsuke","departure_time":"9:38","title":"赤坂見附","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.AkasakaMitsuke"}]},{"trip_id:":"odpt.TrainTimetable:TokyoMetro.Marunouchi.A967.Weekday","stop_times":[{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.AkasakaMitsuke","departure_time":"9:38","title":"赤坂見附","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.AkasakaMitsuke"},{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.Yotsuya","departure_time":"9:41","title":"四ツ谷","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.Yotsuya"},{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.YotsuyaSanchome","departure_time":"9:43","title":"四谷三丁目","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.YotsuyaSanchome"},{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.ShinjukuGyoemmae","departure_time":"9:45","title":"新宿御苑前","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.ShinjukuGyoemmae"},{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.ShinjukuSanchome","departure_time":"9:46","title":"新宿三丁目","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.ShinjukuSanchome"},{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.Shinjuku","departure_time":"9:48","title":"新宿","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.Shinjuku"},{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.NishiShinjuku","departure_time":"9:50","title":"西新宿","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.NishiShinjuku"},{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.NakanoSakaue","departure_time":"9:52","title":"中野坂上","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.NakanoSakaue"}]},{"trip_id:":"walk","stop_times":[{"stop_id":"odpt.Station:TokyoMetro.Marunouchi.NakanoSakaue","departure_time":"9:52","title":"中野坂上","odpt_sameas":"odpt.Station:TokyoMetro.Marunouchi.NakanoSakaue"},{"stop_id":"odpt.Station:TokyoMetro.MarunouchiBranch.NakanoSakaue","departure_time":"9:54","title":"中野坂上","odpt_sameas":"odpt.Station:TokyoMetro.MarunouchiBranch.NakanoSakaue"}]},{"trip_id:":"odpt.TrainTimetable:TokyoMetro.MarunouchiBranch.A977.Weekday","stop_times":[{"stop_id":"odpt.Station:TokyoMetro.MarunouchiBranch.NakanoSakaue","departure_time":"9:54","title":"中野坂上","odpt_sameas":"odpt.Station:TokyoMetro.MarunouchiBranch.NakanoSakaue"},{"stop_id":"odpt.Station:TokyoMetro.MarunouchiBranch.NakanoShimbashi","departure_time":"9:57","title":"中野新橋","odpt_sameas":"odpt.Station:TokyoMetro.MarunouchiBranch.NakanoShimbashi"}]}]}]


経路検索クエリを投げる

平日ダイヤにおける最短所要時間の経路を検索できます。

http://annai-test-api.workerstep.work/testsearchquery/[出発駅]/[目的地駅]/[出発時間]/[APIキー]

〔例〕http://annai-test-api.workerstep.work/testsearchquery/odpt.Station:TokyoMetro.MarunouchiBranch.NakanoShimbashi/odpt.Station:Toei.Oedo.HongoSanchome/9:00/testapikey


※ APIキーは、テスト用に「testapikey」をご利用ください。
レスポンス例
{"qid":"niqoalfwbalwemak","message":"startquery"}

発行されたqidを、下記の結果参照用APIに渡します。

経路検索結果を取得する

上記APIで発行したクエリIDを基に、経路検索結果を取得できます。

【version 2】

http://annai-test-api.workerstep.work/testqueryresponsev2/[qid]

〔例〕http://annai-test-api.workerstep.work/testqueryresponsev2/qsbqnnshptufbmac

[{"route":[{"trip_id:":"start","stop_times":[{"stop_id":"odpt.Station:JR-East.Yamanote.Tokyo","departure_time":"16:40"},{"stop_id":"odpt.Station:JR-East.Yamanote.Tokyo","departure_time":"16:40"}]},{"trip_id:":"odpt.Train:JR-East.Yamanote.1513G","stop_times":[{"stop_id":"odpt.Station:JR-East.Yamanote.Tokyo","departure_time":"16:40"},{"stop_id":"odpt.Station:JR-East.Yamanote.Yurakucho","departure_time":"16:42"},{"stop_id":"odpt.Station:JR-East.Yamanote.Shimbashi","departure_time":"16:44"},{"stop_id":"odpt.Station:JR-East.Yamanote.Hamamatsucho","departure_time":"16:46"},{"stop_id":"odpt.Station:JR-East.Yamanote.Tamachi","departure_time":"16:49"},{"stop_id":"odpt.Station:JR-East.Yamanote.Shinagawa","departure_time":"16:52"},{"stop_id":"odpt.Station:JR-East.Yamanote.Osaki","departure_time":"16:55"}]},{"trip_id:":"walk","stop_times":[{"stop_id":"odpt.Station:JR-East.Yamanote.Osaki","departure_time":"16:55"},{"stop_id":"odpt.Station:JR-East.ShonanShinjuku.Osaki","departure_time":"16:56"}]},{"trip_id:":"wait","stop_times":[{"stop_id":"odpt.Station:JR-East.ShonanShinjuku.Osaki","departure_time":"16:56"},{"stop_id":"odpt.Station:JR-East.ShonanShinjuku.Osaki","departure_time":"16:57"}]},{"trip_id:":"odpt.Train:JR-East.ShonanShinjuku.4536Y","stop_times":[{"stop_id":"odpt.Station:JR-East.ShonanShinjuku.Osaki","departure_time":"16:57"},{"stop_id":"odpt.Station:JR-East.ShonanShinjuku.Ebisu","departure_time":"17:01"},{"stop_id":"odpt.Station:JR-East.ShonanShinjuku.Shibuya","departure_time":"17:03"}]},{"trip_id:":"walk","stop_times":[{"stop_id":"odpt.Station:JR-East.ShonanShinjuku.Shibuya","departure_time":"17:03"},{"stop_id":"odpt.Station:Keio.Inokashira.Shibuya","departure_time":"17:08"}]}]}]

【version 1】

http://annai-test-api.workerstep.work/testqueryresponse/[qid]

〔例〕http://annai-test-api.workerstep.work/testqueryresponse/niqoalfwbalwemak

[{"qid":"niqoalfwbalwemak","cost":"3166","costs":[{"place":"odpt.Station:Toei.Oedo.HongoSanchome","time":"9:51","way":"odpt.Train:Toei.Oedo.ODPT1149","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.Kasuga","time":"9:50","way":"wait","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.Kasuga","time":"9:49","way":"odpt.Train:Toei.Oedo.ODPT1149","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.Iidabashi","time":"9:47","way":"odpt.Train:Toei.Oedo.ODPT1149","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.UshigomeKagurazaka","time":"9:45","way":"odpt.Train:Toei.Oedo.ODPT1149","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.UshigomeYanagicho","time":"9:43","way":"wait","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.UshigomeYanagicho","time":"9:42","way":"odpt.Train:Toei.Oedo.ODPT1149","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.WakamatsuKawada","time":"9:41","way":"odpt.Train:Toei.Oedo.ODPT1149","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.HigashiShinjuku","time":"9:39","way":"wait","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.HigashiShinjuku","time":"9:38","way":"odpt.Train:Toei.Oedo.ODPT1149","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.ShinjukuNishiguchi","time":"9:36","way":"odpt.Train:Toei.Oedo.ODPT1149","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.Tochomae","time":"9:34","way":"wait","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.Tochomae","time":"9:32","way":"odpt.Train:Toei.Oedo.ODPT0817","delay":"-1"},{"place":"odpt.Station:Toei.Oedo.Shinjuku","time":"9:30","way":"walk","delay":"-1"},{"place":"odpt.Station:Keio.Keio.Shinjuku","time":"9:28","way":"wait","delay":"-1"},{"place":"odpt.Station:Keio.Keio.Shinjuku","time":"9:25","way":"odpt.Train:Keio.Keio.0010","delay":"-1"},{"place":"odpt.Station:Keio.Keio.Meidaimae","time":"9:19","way":"odpt.Train:Keio.Keio.0010","delay":"-1"},{"place":"odpt.Station:Keio.Keio.Chofu","time":"9:05","way":"wait","delay":"-1"},{"place":"odpt.Station:Keio.Keio.Chofu","time":"9:02","way":"start","delay":"-1"}]}]

使い方詳細などは、後日追記致します。