Macro (FRED / World Bank)
Two macro data sources, unified under the same find-then-fetch pattern:
- FRED (Federal Reserve Bank of St. Louis) — US and some international macro indicators (GDP, inflation, rates, housing, employment, etc.)
- World Bank — cross-country structural indicators (GDP per capita, life expectancy, CO₂ emissions, trade as % of GDP, etc.)
Both follow the same flow: call find to resolve a concept phrase to a series id, then call series/wb_series to retrieve the data.
FRED endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/ext/fred/find | Resolve a concept phrase to FRED series candidates |
GET | /v1/ext/fred/series | Fetch a FRED time series by id |
GET /v1/ext/fred/find
Resolve a natural-language concept to FRED series candidates. Use this to discover the series_id before fetching data.
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | ✅ | Concept phrase (e.g. "US inflation", "10-year treasury yield", "unemployment rate"). |
country | string | — | Bias results toward a country (ISO-2). |
limit | integer | — | Max candidates. Default 8. |
Find US inflation series
GET /v1/ext/fred/find?q=US+consumer+price+inflation
Find unemployment for Germany
GET /v1/ext/fred/find?q=unemployment+rate&country=DE
Response shape
{
"query": "US consumer price inflation",
"candidates": [
{
"series_id": "CPIAUCSL",
"title": "Consumer Price Index for All Urban Consumers: All Items",
"frequency": "Monthly",
"units": "Index 1982-1984=100",
"description": "..."
}
]
}
GET /v1/ext/fred/series
Fetch a FRED time series. Use series_id from find.
| Parameter | Type | Required | Description |
|---|---|---|---|
series_id | string | ✅ | FRED series identifier (e.g. CPIAUCSL, FEDFUNDS, DGS10). |
transform | string | — | Data transformation: pct_change, yoy, diff, log. Omit for raw levels. |
from | string | — | Start date YYYY-MM-DD. |
to | string | — | End date YYYY-MM-DD. |
freq | string | — | Frequency override: d (daily), w (weekly), m (monthly), q (quarterly), a (annual). |
10-year treasury yield, last 2 years
GET /v1/ext/fred/series?series_id=DGS10&from=2024-01-01
CPI YoY change
GET /v1/ext/fred/series?series_id=CPIAUCSL&transform=yoy
Fed funds rate (all history)
GET /v1/ext/fred/series?series_id=FEDFUNDS
World Bank endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/ext/wb/find | Resolve a concept phrase to World Bank indicator candidates |
GET | /v1/ext/wb/series | Fetch a World Bank indicator time series |
GET /v1/ext/wb/find
Resolve a natural-language concept to World Bank indicator candidates.
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | ✅ | Concept phrase (e.g. "GDP per capita", "CO2 emissions", "trade openness"). |
country | string | — | Bias results toward a country (ISO-2). |
limit | integer | — | Max candidates. Default 8. |
Find GDP per capita
GET /v1/ext/wb/find?q=GDP+per+capita+PPP
Find trade-related indicators for China
GET /v1/ext/wb/find?q=exports+of+goods+and+services&country=CN
GET /v1/ext/wb/series
Fetch a World Bank indicator time series. Use indicator from find.
| Parameter | Type | Required | Description |
|---|---|---|---|
indicator | string | ✅ | World Bank indicator id (e.g. NY.GDP.PCAP.PP.KD). |
country | string | — | ISO-2 country code (e.g. US, CN, DE). Omit for all countries. |
from | integer | — | Start year (e.g. 2010). |
to | integer | — | End year (e.g. 2023). |
database | string | — | World Bank database id. Defaults to the main Development Indicators database. |
US GDP per capita since 2000
GET /v1/ext/wb/series?indicator=NY.GDP.PCAP.PP.KD&country=US&from=2000
CO2 emissions — all countries, last 10 years
GET /v1/ext/wb/series?indicator=EN.ATM.CO2E.PC&from=2013
Compare China and US trade openness
GET /v1/ext/wb/series?indicator=NE.TRD.GNFS.ZS&country=CN,US
Common FRED series
| Series ID | Description |
|---|---|
FEDFUNDS | Federal Funds Effective Rate |
DGS10 | 10-Year Treasury Constant Maturity Rate |
DGS2 | 2-Year Treasury Constant Maturity Rate |
CPIAUCSL | CPI All Urban Consumers (monthly) |
PCEPI | PCE Price Index |
UNRATE | US Unemployment Rate |
GDP | Gross Domestic Product (quarterly) |
INDPRO | Industrial Production Index |
DEXUSEU | USD/EUR Exchange Rate |
VIXCLS | CBOE Volatility Index (VIX) |
MORTGAGE30US | 30-Year Fixed Mortgage Rate |