← 返回
开发者工具 中文

Country Info

Retrieve detailed country data including population, capital, languages, currencies, flag, and regional info using the REST Countries API.
使用 REST Countries API 获取详细的国家数据,包括人口、首都、语言、货币、国旗及地区信息。
picaye
开发者工具 clawhub v1.0.0 1 版本 99883.6 Key: 无需
★ 0
Stars
📥 858
下载
💾 8
安装
1
版本
#latest

概述

Country Info

Get country data — population, languages, currencies, capital, flag, and more using REST Countries API.

Category: education

API Key Required: No

When to use

  • User asks about a country (population, capital, language, currency)
  • User wants to compare countries
  • User asks "what currency does X use?" or "what language do they speak in X?"

How it works

Base URL: https://restcountries.com/v3.1

1. Search by name

curl -s "https://restcountries.com/v3.1/name/france"

2. Get by country code

curl -s "https://restcountries.com/v3.1/alpha/GB"

3. Filter specific fields (reduce response size)

curl -s "https://restcountries.com/v3.1/name/japan?fields=name,capital,population,currencies,languages,flags"

4. Search by currency

curl -s "https://restcountries.com/v3.1/currency/eur"

5. Search by language

curl -s "https://restcountries.com/v3.1/lang/spanish"

6. Get all countries in a region

curl -s "https://restcountries.com/v3.1/region/europe?fields=name,capital,population"

Regions: africa, americas, asia, europe, oceania.

Examples

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.

Constraints

  • Free, no key needed, no strict rate limit
  • Country names are flexible (partial matches work)
  • Some fields are deeply nested — parse carefully

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 17:35 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Cron Scheduler

picaye
使用简化的cron语法创建、列出、修改和删除定时任务以自动化系统任务,并管理输出日志。
★ 4 📥 6,240
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,768
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,983