GET /economics/compare/:indicator
并排比较多个国家的特定经济指标。在 URL 中提供指标键,以逗号分隔的国家代码列表作为参数。返回每个国家的最新值,便于构建比较柱状图、排名表和跨国经济分析工具。例如,比较挪威、美国、德国和爱沙尼亚的人均 GDP。
indicator
必填
Indicator key
countries
必填
Comma-separated country codes
| 名称 | 必填 | 默认值 | 描述 |
|---|---|---|---|
indicator |
是 | - | Indicator key |
countries |
是 | - | Comma-separated country codes |
curl "https://nordapi.ee/api/v1/economics/compare/gdp_per_capita?countries=NO,US,DE,EE"
curl "https://nordapi.ee/api/v1/economics/compare/gdp_per_capita?countries=NO,US,DE,EE"
curl "https://nordapi.ee/api/v1/economics/compare/inflation?countries=US,GB,DE,FR,JP,CA,IT"
curl "https://nordapi.ee/api/v1/economics/compare/unemployment?countries=NO,SE,DK,FI"
{
"data": [
{
"country": "NO",
"value": 86785.4334,
"year": 2024
},
{
"country": "US",
"value": 84534.0408,
"year": 2024
},
{
"country": "DE",
"value": 56103.7323,
"year": 2024
},
{
"country": "EE",
"value": 31428.3548,
"year": 2024
}
],
"indicator": "gdp_per_capita",
"indicator_name": "GDP per capita (current US$)",
"success": true
}
{"success":true,"data":[{"country":"NO","value":86785.43},{"country":"US","value":84534.04}]}