LINK FOR API - https://japan-api.ninja/api/v1/
A Complete REST API about Prefectures of Japan using Python 3 and Flask
Currently there are 47 (All) prefectures and 20 fields (May add more)
Most of the data is taken from the Wikipedia,
Food data, Climate data
If you have noticed some mistakes or bugs, or maybe you have any suggestions please create an issue.
Site with docs is here https://japan-api.github.io/docs/
You can use this API to get detailed information aboout Japan
Japan API has only GET request method
Japan API has 54 endpoints
- All Prefectures of Japan (47)
- Japan itself
- All prefectures (including Japan)
- Find By ISO code, By population and area rank (Among all prefectures)
- Random Prefecture and Random Fact about Japan
area_rank, population_rank
- stands for local Japanese rank between all prefectures (47)
area_rank, population_rank, density_rank
In Japan endpoint means Worldwide rank
/api/v1/all
/api/v1/iso/int:prefecture_iso - Find by ISO code, list of codes | link > JP ISO codes
/api/v1/population_rank/int:population_rank - Find by population rank (Among all prefectures)
/api/v1/area_rank/int:area_rank - Find by area rank (Among all prefectures)
/api/v1/random_prefecture
/api/v1/random_fact
/api/v1/japan
/api/v1/hokkaido
/api/v1/aomori
/api/v1/iwate
/api/v1/miyagi
/api/v1/akita
/api/v1/yamagata
/api/v1/fukushima
/api/v1/ibaraki
/api/v1/tochigi
/api/v1/gunma
/api/v1/saitama
/api/v1/chiba
/api/v1/tokyo
/api/v1/kanagawa
/api/v1/niigata
/api/v1/toyama
/api/v1/ishikawa
/api/v1/fukui
/api/v1/yamanashi
/api/v1/nagano
/api/v1/gifu
/api/v1/shizuoka
/api/v1/aichi
/api/v1/mie
/api/v1/shiga
/api/v1/kyoto
/api/v1/osaka
/api/v1/hyogo
/api/v1/nara
/api/v1/wakayama
/api/v1/tottori
/api/v1/shimane
/api/v1/okayama
/api/v1/hiroshima
/api/v1/yamaguchi
/api/v1/tokushima
/api/v1/kagawa
/api/v1/ehime
/api/v1/kochi
/api/v1/fukuoka
/api/v1/saga
/api/v1/nagasaki
/api/v1/kumamoto
/api/v1/oita
/api/v1/miyazaki
/api/v1/kagoshima
/api/v1/okinawa
Just fetch data from the api using GET method
git clone https://github.com/japan-api/api
cd api
pip install requirements.txt OR python -m pip install -r requirements.txt
cd tests
python test_prefectures.py
cd ../api
set FLASK_APP=api.py
python -m flask run
Contributions, issues and feature requests are welcome! π
Feel free to check open issues.
- Searach for prefectures by the island (Honshu, Kyushu Shikoku, Hokkaido)
- Flask basics: routing, serving
- JSON
(c) 2021 Ilya Revenko. MIT License