barrios88/barrios-skills/api-data-fetcher
Claude Code and agent skill by barrios88/barrios-skills
- community
Checking that the SKILL.md file is still in the repository.
Fetch economic data from FRED, World Bank, and other APIs
Install
npx vskill@latest install barrios88/barrios-skills/api-data-fetcherSKILL.md
Barrios Skills — John Barrios's curated workflow for economists and accountants. Prioritize reproducible empirical work, clear identification language, and journal-ready output.
API Data Fetcher
Purpose
This skill helps economists fetch data from major economic data APIs including FRED (Federal Reserve Economic Data), World Bank, IMF, BLS, and OECD. It generates clean, documented Python code with proper error handling.
MCP first (interactive agents)
When the user is exploring indicators in Cursor/Claude and an economic-data MCP is configured, prefer live MCP tools over handwritten API code:
| Priority | MCP | Setup | |
|---|---|---|---|
| 1 | OpenEcon Data (FRED, World Bank, IMF, …) | install/openecon-data-mcp.md | |
| 2 | FRED MCP (FRED only, local API key) | install/external-mcps.md |
Still use this skill’s Python patterns when building a replication package or project script that must run offline with pinned series IDs. After any MCP pull, record series IDs, source URLs, and download dates in the project README.
For firm filings and XBRL, use `sec-edgar` — not FRED/OpenEcon.
When to Use
- Downloading macroeconomic indicators
- Building custom datasets from multiple sources
- Automating data updates for ongoing projects
- Fetching cross-country panel data
Instructions
Step 1: Identify Data Requirements
Ask the user:
- What data do you need? (GDP, unemployment, inflation, etc.)
- What time period and frequency?
- What countries/regions?
- Preferred output format? (CSV, DataFrame, etc.)
Step 2: Select Appropriate API
| Data Type | Best Source | Package | |
|---|---|---|---|
| US macro | FRED | fredapi | |
| Global development | World Bank | wbdata | |
| Labor statistics | BLS | bls | |
| Cross-country | OECD | pandasdmx | |
| Financial | Yahoo Finance | yfinance |
Step 3: Generate Clean Code
Include:
- API key handling (environment variables)
- Error handling for API failures
- Data cleaning and formatting
- Documentation of series definitions
Example Output
Requirements
Python Packages
API Keys
- FRED: Free key from https://fred.stlouisfed.org/docs/api/api_key.html
- World Bank: No key required
- BLS: Free key from https://www.bls.gov/developers/
Set environment variables:
Best Practices
- Store API keys in environment variables - never hardcode
- Add rate limiting for bulk downloads
- Cache data locally to avoid repeated API calls
- Document series definitions from the source
- Check for revisions in real-time data
Common Pitfalls
- ❌ Hardcoding API keys in scripts
- ❌ Not handling API rate limits
- ❌ Ignoring data vintages/revisions
- ❌ Mixing data frequencies without proper handling
References
Changelog
v1.0.0
- Initial release with FRED and World Bank support
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/research-tools/api-data-fetcher/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/barrios88/barrios-skills/api-data-fetcher)