用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills --skill imf-data-api-guide命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
中英双语学术降 AIGC / bilingual academic de-AIGC skill. Removes AI-generated writing signatures from empirical papers in economics, management, and the social sciences — in both English and Chinese. Covers Turnitin AI, GPTZero, Originality.ai on the English side and 知网 AMLC, 万方, 维普 on the Chinese side. Uses a six-step loop (intake → audit → claim-evidence check → differentiated rewrite → five-dimension self-score → cold-reader recheck) with two pattern libraries (22 English + 17 Chinese patterns), section-by-section strategies for empirical papers, and hard protections that keep every number, coefficient, and citation intact.
Use when a research task needs reproducible Kaggle discovery, metadata inspection, bounded public-data downloads, competition or kernel discovery, model discovery, or an explicitly approved Kaggle write/delete operation through the official CLI.
基于 SOC 职业分类
正在显示 SKILL.md
| name | imf-data-api-guide |
| description | Retrieve IMF economic indicators, exchange rates, and country data |
| metadata | {"openclaw":{"emoji":"📊","category":"domains","subcategory":"economics","keywords":["imf","economics","macroeconomics","indicators","exchange-rates","gdp"],"source":"https://datahelp.imf.org/knowledgebase/articles/667681-using-json-restful-web-service"}} |
The International Monetary Fund (IMF) provides a free JSON-based REST API for accessing its extensive collection of macroeconomic and financial datasets. The API covers data from virtually every country and territory, spanning indicators such as GDP, inflation, trade balances, exchange rates, government finance statistics, and balance of payments.
For economics researchers, the IMF API is an essential tool for accessing authoritative international economic data without manual downloads. The data powers research in macroeconomics, development economics, international finance, and policy analysis. The API provides access to key datasets including the World Economic Outlook (WEO), International Financial Statistics (IFS), Balance of Payments Statistics (BOP), and the Direction of Trade Statistics (DOTS).
The API requires no authentication and returns JSON data. It uses a hierarchical structure of datasets, indicators, and country/time dimensions.
No authentication is required. The IMF Data API is completely free and open.
# No API key needed
curl "https://www.imf.org/external/datamapper/api/v1/NGDP_RPCH?periods=2024"
GET https://www.imf.org/external/datamapper/api/v1
curl -s "https://www.imf.org/external/datamapper/api/v1" | python3 -m json.tool
GET https://www.imf.org/external/datamapper/api/v1/indicators
GET https://www.imf.org/external/datamapper/api/v1/{indicator}?periods={year}
Common Indicators:
NGDP_RPCH: Real GDP growth (annual percent change)PCPIPCH: Inflation, consumer prices (annual percent change)BCA_NGDPD: Current account balance (percent of GDP)GGXWDG_NGDP: Government gross debt (percent of GDP)LUR: Unemployment rateExample: Get real GDP growth for all countries in 2024:
curl -s "https://www.imf.org/external/datamapper/api/v1/NGDP_RPCH?periods=2024" \
| python3 -m json.tool
For more granular data, use the Dataflow-based API:
GET http://dataservices.imf.org/REST/SDMX_JSON.svc/CompactData/{database}/{dimensions}?startPeriod={start}&endPeriod={end}
Example: Monthly CPI data for the US and China:
curl -s "http://dataservices.imf.org/REST/SDMX_JSON.svc/CompactData/IFS/M.US+CN.PCPI_IX?startPeriod=2020&endPeriod=2025" \
| python3 -m json.tool
import requests
DATAMAPPER_URL = "https://www.imf.org/external/datamapper/api/v1"
def get_indicator_data(indicator, periods=None):
"""Fetch IMF indicator data for all countries."""
url = f"{DATAMAPPER_URL}/{indicator}"
params = {}
if periods:
params["periods"] = ",".join(str(p) for p in periods)
resp = requests.get(url, params=params)
resp.raise_for_status()
return resp.json()
# Compare real GDP growth across G7 countries
data = get_indicator_data("NGDP_RPCH", periods=[2022, 2023, 2024])
values = data.get("values", {}).get("NGDP_RPCH", {})
g7_codes = ["USA", "GBR", "FRA", "DEU", "JPN", "CAN", "ITA"]
print("Country | 2022 | 2023 | 2024")
print("--------|--------|--------|-------")
for code in g7_codes:
country_data = values.get(code, {})
row = f"{code:7s}"
for year in ["2022", "2023", "2024"]:
val = country_data.get(year, "N/A")
if isinstance(val, (, )):
row +=
:
row +=
(row)
import requests
def get_exchange_rates(country_codes, start_year, end_year):
"""Fetch exchange rate data from IFS database."""
codes = "+".join(country_codes)
url = (
f"http://dataservices.imf.org/REST/SDMX_JSON.svc/"
f"CompactData/IFS/A.{codes}.ENDA_XDC_USD_RATE"
f"?startPeriod={start_year}&endPeriod={end_year}"
)
resp = requests.get(url)
resp.raise_for_status()
return resp.json()
data = get_exchange_rates(["BR", "IN", "ZA"], 2015, 2024)
series = data.get("CompactData", {}).get("DataSet", {}).get("Series", [])
for s in series:
country = s.get("@REF_AREA", "Unknown")
obs = s.get("Obs", [])
if isinstance(obs, dict):
obs = [obs]
print(f"\n{country} exchange rate (LCU per USD):")
for o in obs:
print(f" {o.get('@TIME_PERIOD')}: {o.get('@OBS_VALUE')}")
Cross-Country Panel Analysis: Retrieve indicator data for multiple countries and years to construct panel datasets for econometric analysis. Combine GDP growth, inflation, and trade data for gravity models or growth regressions.
Policy Impact Assessment: Track economic indicators before and after major policy changes or economic shocks. Compare indicator trajectories across treatment and control country groups.
Forecasting Benchmarks: Use IMF WEO projections as baseline forecasts to compare against model predictions. The IMF publishes projections for most indicators several years forward.
Development Economics: Access poverty, inequality, and structural indicators for developing economies to study convergence, aid effectiveness, and institutional quality.