This repository was archived by the owner on Jun 15, 2025. It is now read-only.
World Capitals
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