Economic Data API for AI Agents: FRED, BLS, World Bank & IMF in One Call

FRED's API is excellent — and US-centric, series-ID-driven, and one of several macro sources you'll end up needing. Here's an economic-data endpoint that fuses FRED, BLS, World Bank, and IMF behind one natural-language call for macro-aware agents.
L'essentiel
- •Macro context is the layer most AI agents skip — and the reason their financial answers feel naive. Rates, inflation, employment, and GDP frame every thesis.
- •FRED is the gold standard for US series but you query by cryptic series IDs; global coverage, labor detail, and IMF cross-country data live in separate APIs (World Bank, BLS, IMF).
- •API Pick Economic Data Search fuses FRED, BLS, World Bank, IMF, USAspending, and Destatis behind one POST endpoint — 50 credits/call, only-on-success — queryable in natural language.
- •The win for agents: ask 'US unemployment rate over two years' or 'World Bank GDP per capita for India' without learning each provider's ID scheme and auth.
- •Pair Economic with Markets and News to ground a portfolio-commentary or macro-briefing agent.
The layer agents skip
Ask an AI agent whether a stock is attractive and it will happily answer without once considering interest rates. That's the tell of an ungrounded agent. Macro — rates, inflation, employment, GDP, the cycle — is the frame every financial thesis sits inside, and it's the data layer most agents never wire in.
FRED is great, and not enough
The St. Louis Fed's FRED API is the gold standard for US macro series — comprehensive, reliable, free. Two things make it awkward as the only macro source for an agent. First, you query by series ID (UNRATE, CPIAUCSL, GDP…), so a model has to know or look up the right code. Second, it's US-centric: global development indicators live in the World Bank API, granular labor data in BLS, and cross-country macro/financial data in the IMF's — each with its own auth and response shape.
Fused, in natural language
Economic Data Search fuses FRED, BLS, World Bank, IMF, USAspending, and Destatis behind one POST endpoint — 50 credits per call, only-on-success — and you query it the way an agent thinks:
import httpx, os
API, HEADERS = "https://api.apipick.com/v1", {"x-api-key": os.environ["APIPICK_KEY"]}
def economic(query: str):
return httpx.post(f"{API}/search/economic", headers=HEADERS,
json={"query": query}).json()["results"]
economic("US unemployment rate over the past two years")
economic("IMF inflation forecast for the eurozone")
economic("World Bank GDP per capita for India") # no series IDs to memorizeFRED-direct vs. fused
| FRED API direct | API Pick Economic | |
|---|---|---|
| Coverage | US series (deep) | FRED + BLS + World Bank + IMF + USAspending + Destatis |
| Query | By series ID | Natural language |
| Geography | US-centric | US + global |
| Providers to wire | 1 (plus others separately) | 1 |
| Billing | Free (US only) | 50 credits/call, only on success |
For deep US time-series at scale, FRED-direct is still ideal. For an agent that needs to reason across US and global indicators without learning every provider's ID scheme, the fused endpoint is the faster build.
Macro-aware agents
Combine Economic with Markets Search and News Search for portfolio commentary that accounts for the cycle, or a morning macro-briefing agent. It's also the macro leg of the investment-research agent. One key, natural-language queries, only-on-success. Start free with 100 credits, no card.
Questions fréquentes
Why not just use the FRED API directly?
FRED is superb for US macro series and worth using directly if that's all you need. Two frictions for agents: you query by exact series IDs (UNRATE, CPIAUCSL, GDP…), which a model has to know or look up; and FRED is US-centric, so global indicators (World Bank), granular labor data (BLS), and cross-country macro/financial data (IMF) live in other APIs with their own auth and shapes. A fused, natural-language endpoint removes the series-ID lookup and the multi-provider stitching.
What sources are fused, and is it US-only?
FRED (US Federal Reserve economic data), US Bureau of Labor Statistics, World Bank development indicators, IMF macro and financial indicators, US federal spending (USAspending), and German labor statistics (Destatis). So it spans US and global macro — not US-only — queried in parallel behind one endpoint.
Can I get a specific series or just summaries?
Pass a series name or a natural-language query ('US unemployment rate 2024', 'IMF inflation forecast for the eurozone', 'World Bank GDP per capita for India') and the endpoint ranks the most relevant records. For exact long time-series at scale, FRED-direct is still the tool; for an agent reasoning over indicators, the semantic endpoint is faster to wire.
How does macro data improve a finance agent?
It supplies the backdrop. 'Is this stock cheap' depends on rates; 'is this sector attractive' depends on the cycle. Without macro, an agent reasons in a vacuum and produces confident, context-free takes. Feeding current rates, inflation, and employment into the prompt grounds the synthesis in the environment the company actually operates in.
Is the output advice?
No. It's public economic data for research and agent grounding — informational only, not financial or policy advice.
APIs utilisées dans cet article
Sarah Choy est CEO d'API Pick. Elle écrit sur la création d'APIs prêtes pour la production destinées aux agents IA et aux workflows LLM.