Economic Data in QuantumLayers: FRED, World Bank and IMF Connectors
A drop in average order value means one thing when inflation is at 2% and another when it is at 8%. QuantumLayers now ships with built-in REST API templates for three of the most widely used sources of economic data: the Federal Reserve Bank of St. Louis (FRED), the World Bank, and the International Monetary Fund. This guide covers what each source gives you, what you need to connect it, how to edit a template to pull exactly the series you want, and practical ways to put GDP, inflation, unemployment and interest rates next to your own numbers.
Why Your Business Data Needs a Macro Backdrop
Most business metrics are partly a reflection of the economy around them. A regional sales slowdown looks different once it is lined up against that country’s GDP growth. A rise in revenue looks less impressive when consumer prices rose faster. Without that context, analysts end up explaining macro effects as if they were product, pricing or marketing effects.
Until now, getting that context into QuantumLayers meant downloading a CSV from a statistics portal, cleaning it, and uploading it again every time the numbers changed. The new templates replace that loop with a live connection. Each one comes pre-configured with the endpoint URL and the path to the rows inside the response, so connecting one takes about a minute.
| Source | Coverage | Frequency | API key | Stand-out feature |
|---|---|---|---|---|
| FRED | United States, hundreds of thousands of series | Daily to quarterly | Free key required | Any series by ID, with built-in transformations |
| World Bank | About 200 economies plus regional and income aggregates | Annual | None | Long histories and development indicators |
| IMF | Major economies (World Economic Outlook) | Annual | None | Includes projections for coming years |
How the Templates Work
All three connectors live in the REST API connection form. Pick the service from the Service dropdown, then pick a template. The endpoint URL and the response path fill in for you. QuantumLayers then calls the API, finds the rows in the response, turns them into a table, and creates a dataset.
Two conventions apply across every template. If a template needs an API key in the URL, the URL contains a placeholder such as YOUR_FRED_API_KEY, and the form will not submit until you replace it. And every template is a starting point: you can edit the URL to change the series, countries or date range before you save.
Once the dataset exists, it behaves like any other connected dataset. It refreshes on a schedule, and it can be charted, merged, included in scheduled reports, watched by monitors, and queried by the AI agent or through the MCP server.
FRED: US Macro Series at Any Frequency
FRED is the St. Louis Fed’s database of economic time series. It is the standard place to get US data on output, prices, labor markets and interest rates, and it covers hundreds of thousands of series from dozens of sources. You need a free FRED API key, which takes a couple of minutes to request from the FRED website. Paste it in place of YOUR_FRED_API_KEY in the URL.
| Template | Series ID | Frequency | What you get |
|---|---|---|---|
| Real GDP | GDPC1 | Quarterly | US real GDP in chained 2017 dollars |
| Consumer Price Index | CPIAUCSL | Monthly | CPI for all urban consumers, seasonally adjusted |
| CPI inflation, year-over-year % | CPIAUCSL + units=pc1 | Monthly | Inflation rate computed by FRED, no math needed |
| Unemployment Rate | UNRATE | Monthly | US civilian unemployment rate |
| Federal Funds Rate | FEDFUNDS | Monthly | Effective federal funds rate |
| 10-Year Treasury Yield | DGS10 | Daily | Constant-maturity yield since 2015 |
| Series search | any keyword | n/a | Series IDs matching your keyword, to swap into another template |
Using any FRED series
Every observation template uses the same URL pattern with a series_id parameter. Change that ID and you can pull any FRED series: housing starts, retail sales, consumer sentiment, state-level unemployment, exchange rates. The response path (observations) stays the same, so nothing else needs editing. Use the Series search template to find the ID you want first.
FRED returns each observation with a date and a value. QuantumLayers recognises the date column, which means the time-series analysis runs automatically: trend tests, structural break detection, seasonality and forecasts.
World Bank: Annual Indicators for Every Country
The World Bank Indicators API covers about 200 economies plus regional and income-group aggregates, with annual data going back decades. No API key is required. All World Bank templates request the years 2000 to 2024. The “major economies” templates request the United States, China, Japan, Germany, India, the United Kingdom, France and Brazil.
| Template | Countries | Notes |
|---|---|---|
| GDP (current US$) | Every country and aggregate | Uses all in the URL |
| GDP per capita (current US$) | Major economies | |
| GDP growth (annual %) | Major economies | |
| Population | Every country and region | |
| Inflation, consumer prices (annual %) | Major economies | |
| Unemployment rate (% of labor force) | Major economies | ILO-modelled estimates |
| Life expectancy at birth | Every country and region |
Editing countries and years
Country codes are ISO3 codes separated by semicolons, for example USA;CAN;MEX. Use all to get every country and aggregate. The date parameter controls the range, written as 2000:2024. The indicator code, such as NY.GDP.MKTP.CD, can be replaced with any of the World Bank’s indicator codes.
When you use all, the result includes aggregates such as “World”, “Sub-Saharan Africa” and “High income” alongside individual countries. Filter them out, or keep them as benchmarks.
IMF: World Economic Outlook Figures, Including Projections
The IMF’s SDMX API serves the headline series from the World Economic Outlook. Its main difference from the other two sources is that it includes the IMF’s projections for the coming years, not only historical values. No API key is required.
| Template | Unit |
|---|---|
| Real GDP growth | % |
| Inflation, average consumer prices | % |
| Unemployment rate | % |
| Government gross debt | % of GDP |
| Current account balance | % of GDP |
| GDP per capita | Current US$ |
Each template requests the same eight major economies as the World Bank templates, from 1980 through the IMF’s latest projection year. Countries are listed in the URL as ISO3 codes joined with plus signs (USA+CHN+JPN...), followed by the indicator code and A for annual. Adding a country means adding its code to that list.
Response formats you do not have to think about
The World Bank returns a two-element response, where the first element is paging metadata and the second is the data, so the templates set the response path to 1. The IMF returns SDMX-JSON, a statistical format that stores each value as a set of index numbers pointing into separate lists of countries and years. QuantumLayers decodes it into a table with a TIME_PERIOD column and one column per country.
The IMF year column is recognised as a date, so the trend, structural break and forecasting tests run on it directly.
Which Source to Use
The three overlap, so the choice usually comes down to frequency and coverage.
| If you need | Use | Why |
|---|---|---|
| US data monthly, weekly or daily | FRED | The only one of the three with sub-annual frequency |
| A specific US series, such as a Treasury yield or a state indicator | FRED | Any of its series by ID |
| Many countries or long annual histories | World Bank | About 200 economies, no key |
| Development indicators beyond GDP | World Bank | Population, life expectancy and many more indicator codes |
| Forward-looking projections | IMF | World Economic Outlook includes coming years |
| Fiscal and external balances on a consistent basis | IMF | Debt and current account as % of GDP |
Five Practical Ways to Use Economic Data
Putting revenue next to inflation
Connect the FRED CPI inflation template and merge it with your monthly revenue dataset on the month. Charting the two together, and checking how closely they correlate, shows whether your growth is tracking prices or running ahead of them. Because both datasets refresh on their own, the merged view stays current.
In the example, revenue grows a steady 6 to 8 percent a year, which looks healthy on its own. Against inflation, the real picture is a business whose growth above prices shrank by more than half in a year. That is the conversation the macro backdrop starts.
Adding a macro driver to a forecast
If your sales are sensitive to interest rates, bring in the federal funds rate or the 10-year yield alongside them. The cross-correlation test in QuantumLayers looks for leading and lagging relationships between time series. If it finds that the rate leads your sales by a few months, the insight will say so and give you the lag.
Market sizing and expansion screening
Pull World Bank GDP per capita and population for a set of candidate markets, then chart them together. The ANOVA and correlation tests will show you which indicators actually separate the markets you already do well in from the ones you do not.
Monitoring for regime changes
Set up a monitor on the CPI inflation or unemployment dataset. Monitors re-run the insight detectors on a schedule and notify you by email, webhook or Slack when something changes statistically, such as a new structural break or a trend reversal. You hear about it when the data shifts, not when someone remembers to check.
Asking the agent
Once these datasets exist, the QuantumLayers agent can use them. A question such as “compare our quarterly revenue growth with US real GDP growth since 2019” works without you writing a query, and the same works from any MCP client connected to your account.
| Use case | Datasets | QuantumLayers feature |
|---|---|---|
| Revenue vs inflation | FRED CPI (pc1) + your revenue | Merge on month, correlation |
| Rate-sensitive sales | FEDFUNDS or DGS10 + your sales | Cross-correlation with lag |
| Expansion screening | World Bank GDP per capita + population | ANOVA and correlation |
| Regime alerts | FRED CPI or UNRATE | Monitors with structural break detection |
| Ad hoc questions | Any of the above | QL agent and MCP server |
Getting Started
Open the data connections page, choose REST API, and pick FRED, World Bank or IMF from the Service dropdown. For FRED, have your API key ready. For the other two, you can connect immediately.
To see what the analysis looks like on these sources before you connect them, read our Analyze This! posts on World Bank life expectancy data and IMF GDP growth.
This post is part of a series on the new data connectors in QuantumLayers. See also Energy Data Connectors: EIA and ENTSO-E and Weather, Climate and Agriculture Connectors. Try them on your own data at www.quantumlayers.com.
