Japan Railway Station API — Stations, Lines & Interchanges
Pricing
from $1.00 / 1,000 station rows
Japan Railway Station API — Stations, Lines & Interchanges
Every railway station in Japan with coordinates, line, operator, prefecture and municipality code - plus the interchanges at that station. 9,059 stations, 597 lines, 178 operators, Shinkansen and tram flags. Government open data, no scraping.
Pricing
from $1.00 / 1,000 station rows
Rating
0.0
(0)
Developer
Shota Tatara
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
11 days ago
Last modified
Categories
Share
Every railway station in Japan: where it is, which lines serve it, who runs them, and what you can change to there.
{"stationName": "新宿","lineName": "山手線","operator": "東日本旅客鉄道","operatorType": "JR(在来線)","railwayClass": "普通鉄道(JR)","prefecture": "東京都","municipality": "新宿区","municipalityCode": "13104","latitude": 35.68843,"longitude": 139.698615,"interchangeCount": 6,"connectingLines": ["東京都 10号線新宿線","東京都 12号線大江戸線","東京地下鉄 4号線丸ノ内線","京王電鉄 京王線","小田急電鉄 小田原線","東日本旅客鉄道 中央線"]}
No scraping. No API keys. No rate limits. Compiled from Japanese government open data and shipped inside the Actor.
What is in it
| 9,059 stations | every station in Japan, from Shinkansen termini to single-platform tram stops |
| 10,160 station-line rows | one per station and line, because a station served by seven lines is seven facts |
| 597 lines · 178 operators | JR, private railways, subways, third-sector, municipal |
| 104 Shinkansen stations | flagged, not guessed from the name |
| Interchanges | which other lines serve the same physical station |
What it adds to the raw data
The source (国土数値情報 鉄道) ships one line-segment per station per line, with no station identity, no area and two numeric code columns whose meanings are easy to swap. This Actor:
- Places the station. Each feature is a stretch of track; the coordinate here is its centroid. Tokyo Station lands within 300 m of its real position — that is a regression test, not a claim.
- Reconstructs interchanges by grouping features that share 駅グループコード. That is what turns seven unrelated rows into "Shinjuku, served by these seven lines".
- Adds prefecture, municipality and the 5-digit municipality code, which the source does not contain at all, by matching each station to the nearest 位置参照情報 town centroid.
- Decodes the classification columns correctly.
N02_001is 鉄道区分 andN02_002is 事業者種別 — the opposite of what the column order suggests. Both were pinned against the real data: code 1 of 事業者種別 selects exactly the 104 Shinkansen rows, and 鉄道区分 25 selects exactly the Linimo maglev.
Use cases
- Rank property by transport access. Combine
nearwith a station'sinterchangeCountto score any address in Japan for connectivity. - Build a station picker or autocomplete. 9,059 names with coordinates, prefecture and municipality, in one download.
- Join transit to any other dataset.
municipalityCodeis the key used by every Japanese government statistic. - Answer "what is the nearest station". A radius search returns stations sorted by distance.
- Give an AI agent a Japan transit tool. It runs as an MCP tool: an agent can ask "which lines serve this station and what is nearby" and get typed rows back.
Input
{"stationNames": ["新宿", "渋谷"],"lineNames": ["山手"],"operators": ["東日本旅客鉄道"],"prefectures": ["東京都"],"near": { "latitude": 35.6812, "longitude": 139.7671, "radiusMeters": 800 },"shinkansenOnly": false,"minInterchangeCount": 3,"groupByStation": true,"maxResults": 100}
Every field is optional; an empty input returns the stations named 東京.
| Field | Meaning |
|---|---|
stationNames | Japanese station names, matched as substrings — 新宿 also finds 西新宿 |
lineNames | Line names as substrings — 山手 finds 山手線, 新幹線 finds every Shinkansen |
operators | Operator names as substrings — 東京地下鉄 for Tokyo Metro |
prefectures | With or without the suffix (東京 = 東京都) |
municipalityCodes | 5-digit 全国地方公共団体コード |
keyword | Substring across station, line, operator, prefecture and municipality |
near | {latitude, longitude, radiusMeters} — sorted by distance |
shinkansenOnly | Shinkansen stations only |
minInterchangeCount | Set to 3 or more to find the major hubs |
groupByStation | One row per physical station, with all its lines in a lines array |
maxResults | Hard cap on rows — this is what determines the cost of the run |
Output
One row per station and line by default, or one per station with groupByStation.
| Field | Description |
|---|---|
stationName, lineName, operator | As published, in Japanese |
operatorType | JR(新幹線)/ JR(在来線)/ 公営鉄道 / 民営鉄道 / 第三セクター |
railwayClass | 普通鉄道, 軌道, 鋼索鉄道, 懸垂式鉄道, 跨座式鉄道, 案内軌条式鉄道, 無軌条鉄道, 浮上式鉄道 |
isShinkansen, isTram, isMonorailOrAgt | Ready-made booleans for the common filters |
stationGroupCode | Shared by every line serving the same physical station |
prefecture, municipality, municipalityCode | Derived; the source has no area field |
latitude, longitude | Centroid of the station's track geometry, WGS84 |
interchangeCount, connectingLines | The other lines at the same station |
distanceMeters | Radius searches only |
Pricing
Pay per event: a small charge to start the run, plus a charge per row returned. No proxy costs, because there is nothing to proxy.
Data sources
| Source | Publisher | Licence |
|---|---|---|
| 国土数値情報 鉄道 (N02-23) | 国土交通省 | 公共データ利用規約 第1.0版 (PDL1.0) |
| 位置参照情報 大字・町丁目レベル | 国土交通省 | 公共データ利用規約 第1.0版 (PDL1.0) |
PDL1.0 permits commercial use and redistribution and requires the source credit plus a
statement that the data was edited. Reproduced here and in every run's RUN_SUMMARY:
「国土数値情報(鉄道)」(国土交通省)(https://nlftp.mlit.go.jp/ksj/)をもとに jp-data-engine が加工して作成
「位置参照情報ダウンロードサービス」(国土交通省)(https://nlftp.mlit.go.jp/isj/)をもとに jp-data-engine が加工して作成
Known limits
- Coordinates are the centroid of the track geometry, not the station building or a specific entrance. For a large station like Shinjuku that is a few hundred metres from some exits.
- No timetables, fares or platform data. This is the network, not the schedule.
- The municipality is inferred from the nearest town centroid rather than a boundary polygon. It is right for stations inside a built-up area; a station on a municipal border can fall on the wrong side.
- Names are Japanese only. The source publishes no romanisation. Feed them through Japan Address Normalizer, Geocoder & Romanizer if you need the coordinates turned into a romanised address.
- Freight-only lines and closed stations are not included; this is the passenger network as of the 2023 edition.
Local development
npm installnpm run build:data # downloads the government data and compiles the registry into data/npm test # 12 tests, including the code-mapping regressionsnpx apify run
Part of the jp-data-engine Japan data suite. See also Japan Land Price API — every survey site records its nearest station, so the two join directly.