日本の公共交通の乗り換え・経路検索 API。読み取り専用・認証不要・CORS 開放で、どこからでも利用できます。
https://api.transit.ls8h.com# 駅やランドマークの座標から経路を検索(出発検索)
curl "https://api.transit.ls8h.com/api/v1/plan?from=geo:35.681,139.767&to=geo:35.690,139.700"
Journey search and guide-UI route options.
| GET | /api/v1/plan | Journey search (出発 / 到着 / 始発 / 終電) |
| GET | /api/v1/guidance/plan | Guidance plan: ranked options, comparison basis, map geometry |
Station, place and reverse-geocoding autocomplete.
| GET | /api/v1/locations/suggest | Station autocomplete (parent-station, multilingual prefix) |
| GET | /api/v1/places/suggest | Place autocomplete: stations, stops, facilities, addresses |
| GET | /api/v1/places/reverse | Nearby places for a picked map point |
Station detail and departure boards.
| GET | /api/v1/stations/{id} | Station detail: platforms and serving routes |
| GET | /api/v1/stations/{id}/departures | Departure board for a station |
Ingested feeds and operator branding/license metadata.
| GET | /api/v1/feeds | List ingested feeds with license attribution |
| GET | /api/v1/operators | List operator branding marks and logo/data licenses |
Map scene assets for guidance rendering.
| GET | /api/v1/map/3d-scene | Bounded 3D building scene layer URLs for a viewport |
Operational probes.
| GET | /api/health | Liveness probe |
OpenAPI から任意の言語のクライアントを生成できます(openapi-typescript / orval / openapi-generator など)。
# OpenAPI から型付きクライアントを生成
bunx openapi-typescript https://api.transit.ls8h.com/api/openapi.json -o transit-api.d.ts
import createClient from "openapi-fetch";
import type { paths } from "./transit-api";
const api = createClient<paths>({ baseUrl: "https://api.transit.ls8h.com" });
const { data } = await api.GET("/api/v1/plan", {
params: { query: { from: "geo:35.681,139.767", to: "geo:35.690,139.700" } },
});
GET。書き込みはありません。Access-Control-Allow-Origin: *)。ブラウザから直接呼べます。feedId:stopId)。地点は geo:<lat>,<lon>。