Get country data — population, languages, currencies, capital, flag, and more using REST Countries API.
Category: education
API Key Required: No
Base URL: https://restcountries.com/v3.1
curl -s "https://restcountries.com/v3.1/name/france"
curl -s "https://restcountries.com/v3.1/alpha/GB"
curl -s "https://restcountries.com/v3.1/name/japan?fields=name,capital,population,currencies,languages,flags"
curl -s "https://restcountries.com/v3.1/currency/eur"
curl -s "https://restcountries.com/v3.1/lang/spanish"
curl -s "https://restcountries.com/v3.1/region/europe?fields=name,capital,population"
Regions: africa, americas, asia, europe, oceania.
User: "Tell me about Japan"
→ Query by name. Reply with capital, population, languages, currency, region, flag emoji.
User: "What countries use the Euro?"
→ Query by currency/eur. List the countries.
共 1 个版本