# Macroeconomic Data APIs — Official Sources and Aggregators

CPI, payrolls, GDP, rates and FX fixings over an API, from the agencies that publish them or one API over many. Vintages, licences and lag decide it.

*https://stockmarketstack.com/categories/macro-economic-data*

Four different readers end up here. A **researcher who needs one series** — CPI, the ten-year
yield, unemployment — should start at [FRED](https://stockmarketstack.com/tools/fred) and stop there unless something specific
pushes them on: it has the series, a free key and an Excel add-in. A **developer who needs many
countries behind one API** wants [DBnomics](https://stockmarketstack.com/tools/dbnomics), which is free, keyless and keeps
every provider's own series codes. Someone **backtesting a strategy that reacts to macro releases**
needs [vintages](https://stockmarketstack.com/glossary/point-in-time) — what the number was on the day — and that eliminates
most of the listing: FRED's ALFRED side, the ECB's `includeHistory` and the IMF's vintage
snapshots are the three free ones that document one, and [FXMacroData](https://stockmarketstack.com/tools/fxmacrodata) sells
the same question as its product, with a release timestamp on every row. Someone **outside the United States** should go to their own
statistical office or central bank first, then to the ECB, Eurostat, the OECD, the IMF or the World
Bank depending on how many countries and how fresh.

- **One US series, free, into a notebook or a spreadsheet** — [FRED](https://stockmarketstack.com/tools/fred).
- **CPI, payrolls and PPI with the agency's own preliminary flags** — [BLS Public Data API](https://stockmarketstack.com/tools/bls-api).
- **Repo, money-fund and hedge-fund aggregates, and a daily stress index** — [OFR Data](https://stockmarketstack.com/tools/ofr-data), keyless.
- **What a figure was on a past date** — [FRED](https://stockmarketstack.com/tools/fred) for US and much else; [ECB Data Portal](https://stockmarketstack.com/tools/ecb-data-portal) for the euro area.
- **When each number became public, for 22 currencies, with a calendar and COT** — FXMacroData, from $50 a month; the free tier is US only.
- **Dozens of national agencies behind one query shape** — [DBnomics](https://stockmarketstack.com/tools/dbnomics).
- **Euro reference rates, the euro yield curve and €STR, daily** — [ECB Data Portal](https://stockmarketstack.com/tools/ecb-data-portal).
- **EU prices, national accounts and labour** — [Eurostat](https://stockmarketstack.com/tools/eurostat).
- **Rich-country comparisons** — [OECD Data](https://stockmarketstack.com/tools/oecd-data).
- **Balance of payments, government finance, reserves, WEO projections** — [IMF Data](https://stockmarketstack.com/tools/imf-data).
- **Every economy, annual, under a licence you can build on** — [World Bank Open Data](https://stockmarketstack.com/tools/world-bank-open-data).
- **Model forecasts, 196 countries and a calendar, in a paid product** — [Trading Economics](https://stockmarketstack.com/tools/trading-economics), from $199 a month for API access.
- **Container-shipping indicators beside the macro series** — [EconDB](https://stockmarketstack.com/tools/econdb), €24.99 a month.

If you want the step-by-step version — which call, which parameter — that is
[how to pull an economic data series](https://stockmarketstack.com/how-to/pull-an-economic-data-series). This page is about
choosing the source.

Macro used to be a job inside [market data APIs](https://stockmarketstack.com/categories/market-data-apis) and moved out on
7 October 2026. Nothing listed here sells a price you can trade on, and a reader who typed "stock
market data API" was being shown Eurostat beside Databento.

## Official source or aggregator: who answers for the number

The two jobs in this category are not a quality ranking. They answer different questions.

**An official source** is the office that computes the series or the institution that publishes
it — the BLS, the OFR, the ECB, Eurostat, the IMF, the OECD, the World Bank. It owns the
definition, the seasonal adjustment and the errata. It is free, it is the first place the number
appears, and it covers its own patch and nothing else: the BLS is United States only, the ECB is
the euro area's monetary plumbing. The OFR — the Treasury bureau that collects data for the
Financial Stability Oversight Council — publishes funding-market and hedge-fund aggregates: its
own repo release, money market fund totals from Form N-MFP filings, Form PF hedge-fund series with
blanks left so no single filer is disclosed, and a daily Financial Stress Index that is a CSV
download, not part of either API. Some of what it serves is republished — New York Fed reference
rates, primary dealer statistics, Treasury yields — so it is an aggregator for part of its
catalogue.

**An aggregator** republishes other people's series behind one API. FRED belongs here, even though
a Federal Reserve Bank runs it: its 851,100 series come from 126 sources — the BLS, the BEA, the Census
Bureau, the EIA, the OECD, the BIS, a dozen central banks — under FRED's own series IDs. When a
FRED figure looks wrong, the fix is at the agency that published it, not in St. Louis.

What an aggregator buys you, and what it costs, comes down to four things.

**One query shape instead of six.** This is the real product. Every official source here speaks a
different dialect, and four of them are built on SDMX — a standard whose series keys are positional and
dataset-specific, and which answers a wrong key with a bare 400, or at the OECD with a 403 telling
you it expected 13 key values and got 12. Generic SDMX clients such as `sdmx1` work against the
ECB, Eurostat, the IMF and the OECD, which takes the sting out of the protocol but not out of
reading each dataset's structure first.

**Codes, kept or replaced.** DBnomics keeps each provider's own codes, so the ECB's daily dollar
rate is `EXR/D.USD.EUR.SP00.A` at the ECB and `ECB/EXR/D.USD.EUR.SP00.A` at DBnomics — a lookup
worked out on the agency's site transfers unchanged. FRED and EconDB assign their own: US CPI at
EconDB is `CPIUS`. Shorter, and nothing you learned at the source carries over.

**Lag of its own.** An aggregator refreshes on its own schedule, on top of the publisher's.
DBnomics runs each fetcher once a day and says new data should appear within 24 hours; on
14 September 2026 its copy of the ECB's daily rate ran through 4 September, and the project's own
FAQ says many fetchers sit in error status. EconDB's US CPI stopped at April 2026 when checked in
mid-September, while the BLS had August's reading out by 19 September. A quiet series and a broken
fetcher look identical until you check the last observation.

**A licence layered on a licence.** The aggregator's terms sit on top of the publisher's, never in
place of them — see below.

## A series count is not a coverage claim

Every source here quotes a large number, and none of them count the same thing.

FRED's 851,100 series come from 126 sources. DBnomics reports 1.73 billion series across 47,062
datasets from 93 providers. Trading Economics headlines 20 million indicators, and its own breakdown
puts 20 million of them in COMTRADE bilateral trade records and 20 thousand directly from national
sources. EconDB curates 5,170 named series over 13,834 raw datasets. FXMacroData counts 104 indicators and
484 currency-indicator pairs, 21 of them with no start date. The World Bank lists 29,544
indicator codes across 71 databases, of which World Development Indicators — the database people
mean — holds 1,498.

The size that matters is how much of the catalogue is still being refreshed, and the agencies are
not better at this than the vendors. Of Eurostat's 8,877 datasets, 4,066 stop at 2022 or earlier
and answer queries exactly as readily as the live ones. The World Bank's Doing Business database
was last updated in August 2021. At EconDB, 38.4% of all datasets had not synced in over a year.
Nothing in any of these responses says the series is dead.

## Revisions, vintages and release calendars

Macro series are revised, and a backtest that reads today's values is reading numbers nobody had at
the time. How much of the past a source lets you see decides whether you can fix that.

**Vintages on the ordinary endpoint.** [FRED](https://stockmarketstack.com/tools/fred)'s ALFRED is not a separate product: the
same key and the same `series/observations` endpoint return past vintages through `realtime_start`,
`realtime_end` and `vintage_dates`. The [ECB](https://stockmarketstack.com/tools/ecb-data-portal) does the same with
`includeHistory=true`, which returns previous versions of the data alongside the current one, and
`updatedAfter`, which returns only what was added, revised or deleted since a timestamp.

**Snapshots of a publication round.** The [IMF](https://stockmarketstack.com/tools/imf-data) publishes dated vintage dataflows
— 119 of its 222 — so a result built on one round stays reproducible. For the World Economic
Outlook, that history is the current round plus one predecessor.

**Release timestamps, sold.** FXMacroData is the paid aggregator built around the question. Every
row carries an `announcement_datetime`, the time the number became public, and revisions are kept
as separate entries rather than written over the first print, so a backtest can ask what was
known at 08:30 on release day. Not every timestamp was observed: where no official calendar
survives, the time is derived from the series' median publication lag, can land a few days off,
and is flagged per row — 997 of 1,349 US CPI rows in the vendor's own example. One derived row
turns a whole response's `point_in_time_safe` flag false, so a strict backtest filters row by row.

**Nothing at all.** The [BLS](https://stockmarketstack.com/tools/bls-api) request has no vintage parameter.
[Eurostat](https://stockmarketstack.com/tools/eurostat) states that its database always holds the latest version, with no
record of past ones. The [World Bank](https://stockmarketstack.com/tools/world-bank-open-data) restates history at every
quarterly refresh and publishes the list of changes after the fact. The OFR labels its Form PF
series "current vintage, as of last update" and corrected its stress index in place; only its
repo release keeps preliminary and final apart. From these, the only
point-in-time series is the one you saved yourself on release day.

How much moves is a property of the series, not the source. At the BLS, PPI is revised monthly for
four months after publication; payrolls arrive preliminary, are revised twice and then benchmarked
annually; unadjusted CPI is final on release, while seasonally adjusted CPI is restated for up to
five years. The BLS puts the preliminary flag in each observation's footnote — the reason to read it
at the source rather than second-hand.

**Poll the calendar, not the series.** These numbers change on known dates, and the sources say
when. FRED has `releases` and `releases/dates` endpoints for the publication calendar. Eurostat
refreshes at 11:00 and 23:00 CET when there is something new. The World Bank refreshed WDI on
27 January, 8 April and 1 July in 2026. Trading Economics shows an economic calendar on its website,
but its calendar API is not in any self-serve plan; FXMacroData's forward release calendar is in
its $50 one.

## Keys, limits, and "no published limit"

The official sources are free the way government statistics are free, not the way a freemium API
is: there is no paid tier to upgrade to, and what limits exist protect the server. They are still
worth knowing before you write a backfill.

- **FRED** — a free key from a free account, and 120 requests a minute before HTTP 429. The terms
  reserve the right to change that, so treat it as the current setting.
- **BLS** — keyless at 25 queries a day, 25 series and 10 years per query; a free registered key
  gives 500 a day, 50 series and 20 years. Both share 50 requests per 10 seconds, and the key
  expires every year.
- **OECD** — keyless, 60 data downloads an hour per IP, counting CSV exports from the browser on the
  same connection. VPN and anonymising traffic is not permitted, which matters for a cloud job.
- **OFR** — keyless; both API overviews say no tokens or registration are needed, and neither
  states a rate limit. Responses carry `access-control-allow-origin: *`, so a browser page can call
  it directly.
- **ECB, Eurostat, IMF, World Bank** — keyless, with no rate limit published. The limits that exist
  are per request: Eurostat queues anything between 500,000 and 5 million cells and refuses
  anything above with HTTP 413; the World Bank caps a page at 32,500 rows and a query at 60
  indicators.
- **DBnomics** — keyless, with a fair-use cap it does not quantify. The paid tiers lift it.
- **Trading Economics** — no free key; the old guest key answers HTTP 410. The $199 Standard plan
  carries 500 API requests a month, which is a research allowance, and the hard limit is 2 requests
  a second.
- **FXMacroData** — keyless for US data only: the trailing 90 days, each release held back 15
  minutes, 100 requests a day. The paid plans allow 1,000,000 requests a month at 300 a minute,
  and both start with a 14-day trial that needs a card.
- **EconDB** — a token issued without signup works on the older endpoints for about 24 hours; the
  v1 API answers 401 without a paid account's token.

**"No published rate limit" does not mean unlimited**, and on one card it means the opposite of
permission: the IMF's terms prohibit bulk download by automated technology without explicit
permission. Cache what you pull and pull it after a release, not on a timer.

**A login is not always a key.** The ECB portal account buys dashboards and notifications, not API
access. The IMF's sign-in gates its Swagger console, not the data. The BLS v2 endpoint answers
without a key and quietly drops the calculations and catalog metadata you asked for.

## Public data still comes with a licence

Statistics paid for by taxes are not automatically free to resell, and the conditions are specific
enough to break a product design. The [redistribution](https://stockmarketstack.com/glossary/redistribution) question is the
same one as for market data; the answers are different.

**Open, with attribution.** BLS data is public domain; the terms ask you to cite BLS and to state
that it cannot vouch for anything derived after the data left its site. World Bank datasets it
produces itself are CC BY 4.0 — the plainest licence in the category — with exceptions for some
third-party datasets. The OECD permits commercial reuse with citation but does not warrant that it
owns every right in every dataset. The OFR's own work, by federal employees, carries no copyright
and its legal notice asks only for credit — but several of its datasets are other publishers'
numbers, and for those the notice sends you to the copyright holder.

**Free, if you tell your buyers it is free.** The ECB requires that a sold document tell buyers,
before they pay and each time they access it, that the information is free from the ECB. The IMF
asks the same of anyone selling its data as a standalone product, then asks commercial reusers to
email for permission, and bars use of its content for training language models without it.

**Free, except for some rows.** Eurostat's commercial permission excludes data for countries outside
the EU, EFTA and the candidate list — its own examples are the United States, Japan and China. The
euro-area-against-the-US chart a macro dashboard most wants is exactly what that clause covers if
the dashboard is sold.

**Free container, owned contents.** FRED's legal notice says to contact the owner before using
third-party series beyond personal use, and the S&P 500 series prohibits reproduction without
written permission; copyrighted series carry the word Copyright in their notes. Any application
using the FRED API must also display a notice that it is not endorsed by the St. Louis Fed.
DBnomics publishes its datasets under the Open Database Licence and, in the same terms, leaves each
series subject to its original provider's terms.

**Paid, and narrower than the free sources.** Trading Economics grants a limited, personal licence
to analyse; redistribution is an Enterprise feature. EconDB publishes no terms of use at all, so
nothing is granted in writing either way. FXMacroData's plans licence internal and personal use
only; showing its numbers to anyone else is a $10-a-month add-on per block of 100 users or 1,000
public followers, for attributed display only, with raw downloads and API pass-through excluded
even then. Its terms name no jurisdiction.

## Outside the United States

Coverage is where the official sources differ most, and frequency falls as country count rises.

- **Euro area, daily and monthly** — the [ECB](https://stockmarketstack.com/tools/ecb-data-portal) for rates, FX reference
  rates and €STR, current to the previous business day; [Eurostat](https://stockmarketstack.com/tools/eurostat) for HICP,
  national accounts and labour across the EU27, EFTA and candidate countries, monthly at best.
- **OECD members, monthly at best** — [OECD Data](https://stockmarketstack.com/tools/oecd-data): 38 members and five Key
  Partners, thinning fast beyond them, with most datasets revised once or twice a year.
- **Most of the world, quarterly or annual** — [IMF Data](https://stockmarketstack.com/tools/imf-data) for balance of payments,
  government finance, reserves and the WEO; [World Bank Open Data](https://stockmarketstack.com/tools/world-bank-open-data) for
  217 economies, annual, and a year or more behind.
- **Many agencies, one API** — [DBnomics](https://stockmarketstack.com/tools/dbnomics) mirrors 93 providers, from INSEE and the
  Bank of England to Statistics Japan, the ECB, Eurostat and the IMF.
- **Breadth in a paid product** — [Trading Economics](https://stockmarketstack.com/tools/trading-economics) claims 196
  countries; [EconDB](https://stockmarketstack.com/tools/econdb) claims 242 geographies, though after the United States its
  best-covered countries are Poland, Sweden, Hungary, Denmark and Czechia.

Two traps on the cross-country sources. The IMF, the OECD and the World Bank publish the same
headline indicators under different revision rules, and their figures for one country and year
frequently disagree — pick a source per indicator and stay on it. And the IMF's WEO runs to 2031:
those later years are IMF staff projections in exactly the same shape as 1980, marked only by a
`LATEST_ACTUAL_ANNUAL_DATA` series attribute that the SDMX 2.1 CSV carries and the SDMX 3.0 CSV
drops.

## Old tutorials point at dead endpoints

Three of the official sources have moved or rebuilt their APIs since mid-2024, and most code you
find online predates the move.

- The IMF retired its legacy portal on 5 November 2025; `dataservices.imf.org` no longer resolves,
  so old code fails at DNS rather than with a 404, and International Financial Statistics no longer
  exists as a dataflow.
- The OECD took `stats.oecd.org` offline on 1 July 2024. The bare host still answers a 301, which
  makes a dead integration look half-alive; the data paths return 404.
- The World Bank retired API v1 in November 2018.
- Eurostat retires dataset codes in place: `prc_hicp_manr` still answers 200 and stops at December
  2025, and the live series moved to a dataflow with different dimension names.
- Trading Economics' guest key answers 410. Public API directories still say EconDB needs no
  authentication; both its endpoints answer 401.

The agencies ship no client libraries — not the BLS, the ECB, Eurostat, the IMF, the OECD, the World
Bank or FRED — so the Python package with the obvious name is somebody else's. `imf` on PyPI is an
unrelated stranger's stub. DBnomics and Trading Economics publish their own clients; EconDB's,
`prognosis`, still targets its legacy API.

## What "real-time" cannot mean here

Nothing in this category is market data, and the word has three meanings on these cards, none of
them the one a trader has in mind.

**Release lag.** Monthly headline series arrive two to three weeks after the month; real GDP for the
quarter that ended on 30 June 2026 first appeared on 26 August. The fastest official series are
daily and run to the previous business day — the ECB's reference rates, yield curve and €STR.

**A fixing, not a quote.** The ECB's daily euro reference rates are a 14:15 CET fixing published
for reference, and the ECB refuses liability for decisions taken on them. The euro yield curve is
fitted, not quoted. FRED's `SP500` is one daily close, no bid, no ask, no volume, and only ten
years of it.

**A vintage parameter.** FRED's `realtime_start` and `realtime_end` choose which published version
of a series you get. They are about history, not speed.

Where a vendor here does sell something live, it is market quotes on the side: Trading Economics
labels instruments Live, Daily or Delayed without quantifying the delay, and its streaming is
Enterprise-only. If you need a price that moves while you watch, that is
[market data APIs](https://stockmarketstack.com/categories/market-data-apis). If you want macro series beside equities and
fundamentals on one screen rather than in a notebook, that is a research platform such as
[Koyfin](https://stockmarketstack.com/tools/koyfin). And [OpenBB](https://stockmarketstack.com/tools/openbb) wraps FRED, the ECB, the IMF and the OECD
behind one Python interface without being a source itself.

## Cards

- [BLS Public Data API](https://stockmarketstack.com/tools/bls-api.md) — CPI, payrolls and PPI from the agency that computes them. Free, 500 calls a day.
- [DBnomics](https://stockmarketstack.com/tools/dbnomics.md) — Macro series from 93 statistics offices and central banks behind one open API.
- [ECB Data Portal API](https://stockmarketstack.com/tools/ecb-data-portal.md) — Euro reference rates, yield curves and €STR over keyless SDMX — with vintages.
- [EconDB](https://stockmarketstack.com/tools/econdb.md) — 5,170 macro series and container-shipping data behind one API and one subscription.
- [Eurostat API](https://stockmarketstack.com/tools/eurostat.md) — EU statistics, keyless and free — 8,877 datasets, and the codes move under you.
- [FRED](https://stockmarketstack.com/tools/fred.md) — The Fed's macro database — 851,100 series, a free key and 120 requests a minute.
- [FXMacroData](https://stockmarketstack.com/tools/fxmacrodata.md) — Release-timestamped macro data for 22 currencies, with a calendar and COT, from $50.
- [IMF Data](https://stockmarketstack.com/tools/imf-data.md) — Free, keyless SDMX access to IMF macro statistics — WEO included, forecasts and all.
- [OECD Data](https://stockmarketstack.com/tools/oecd-data.md) — Free, keyless macro statistics over SDMX — and SDMX is the price of admission.
- [OFR Data](https://stockmarketstack.com/tools/ofr-data.md) — Treasury's stress index, repo and hedge-fund series — keyless JSON, no rate limit stated.
- [Trading Economics](https://stockmarketstack.com/tools/trading-economics.md) — Macro data for 196 countries with its own forecasts. No free key; the API starts at $199.
- [World Bank Open Data](https://stockmarketstack.com/tools/world-bank-open-data.md) — Free, keyless macro indicators for 217 economies — annual, lagged, and CC BY 4.0.

## FAQ

### What is the best free API for economic data?

For US series and a good share of everyone else's, FRED — 851,100 series from 126 sources, a free key and 120 requests a minute, with vintages on the same endpoint. Go to the agency itself, such as the BLS or the ECB, when you need its own footnotes and preliminary flags, and to DBnomics when you need dozens of countries' agencies behind one keyless query shape.

### How do I get economic data as it was first published, before revisions?

Four sources here document a way to get old versions — FRED through its ALFRED vintages, the ECB through includeHistory=true, the IMF through dated vintage snapshots, which for the World Economic Outlook go back one round, and FXMacroData, a paid API that keeps revisions as separate rows stamped with the time each number was released, though many older timestamps are derived rather than observed. The BLS API has no vintage parameter, and Eurostat, the World Bank and most of the OFR's series overwrite history in place, so from those you have to snapshot the series yourself on every release.

### Is there a real-time economic data API?

Not in the sense a trader means. The fastest official series here are daily and current to the previous business day, monthly headline numbers like CPI and payrolls arrive two to three weeks after the month ends, and US real GDP for the quarter ending 30 June 2026 first appeared on 26 August. In FRED's own API, the realtime_start and realtime_end parameters select a vintage — which published version you get — and say nothing about latency. FXMacroData's paid plans push each release over a stream or a webhook as it comes out, which removes your polling delay and none of the agency's.

### Can I use government economic data in a commercial product?

Usually, and the conditions differ by publisher in ways that matter. BLS data is public domain and World Bank datasets are CC BY 4.0, while the ECB and the IMF require a paid product to tell buyers the numbers are free from them, and Eurostat's commercial permission excludes rows for countries outside the EU, EFTA and the candidate list. On an aggregator the original publisher's terms still apply underneath — FRED's legal notice says to contact the data owner before using third-party series beyond personal use.

### When is it worth paying for a macro data aggregator?

When you need something the free sources do not carry, not when you need the series. Trading Economics charges 199 dollars a month for the first plan with an API key and sells its own model forecasts and 196-country breadth, with the calendar API and redistribution only on Enterprise; EconDB charges 24.99 euros a month and its distinctive half is container-shipping data; FXMacroData charges 50 dollars a month for release timestamps, a forward calendar and COT positioning across 22 currencies. DBnomics' paid tiers, from 1,500 euros a year, are sponsorships that lift a fair-use cap and unlock no data.

### Which API covers economic data outside the United States?

For the euro area, the ECB for monetary and financial series and Eurostat for prices, national accounts and labour. For cross-country work the OECD covers 38 members and five Key Partners at monthly frequency at best, the IMF publishes balance of payments, government finance and the World Economic Outlook, and the World Bank covers 217 economies, annually. DBnomics puts 93 providers, from INSEE to Statistics Japan, behind one API.
