Skip to content
This repository was archived by the owner on Jun 15, 2025. It is now read-only.

World Capitals

Choose a tag to compare

@rd1on rd1on released this 31 Dec 05:02
· 192 commits to main since this release
ed3249a

Third official API from AtPI!
World Capitals API has the name of the capital city of all 195 countries in the world, as well as an image for every one of them. The official endpoint URL: https://atpi.proj.sbs/api/world-capitals.json

Quick Example:

import requests
response = requests.get('https://atpi.proj.sbs/api/world-capitals.json')
data = response.json()
for country in data:
    if country["name"] == "Japan":
        print(country['capital'], country['image'])
Tokyo https://media.cntraveler.com/photos/63482b255e7943ad4006df0b/16:9/w_2560%2Cc_limit/tokyoGettyImages-1031467664.jpeg