Code Monkey home page Code Monkey logo

api's Introduction

Japan API 🎌

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.

Preview πŸ”

Docs πŸ“˜

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

List of endpoints πŸ“œ

/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

Usage πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Just fetch data from the api using GET method

Quick Start πŸš€

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

Contributing 🀝

Contributions, issues and feature requests are welcome! πŸ‘
Feel free to check open issues.

ToDo

  • Searach for prefectures by the island (Honshu, Kyushu Shikoku, Hokkaido)

What I Learned 🧠

  • Flask basics: routing, serving
  • JSON

License πŸ“‘

(c) 2021 Ilya Revenko. MIT License

api's People

Contributors

irevenko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.