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.

SourceCoverageFrequencyAPI keyStand-out feature
FREDUnited States, hundreds of thousands of seriesDaily to quarterlyFree key requiredAny series by ID, with built-in transformations
World BankAbout 200 economies plus regional and income aggregatesAnnualNoneLong histories and development indicators
IMFMajor economies (World Economic Outlook)AnnualNoneIncludes 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.

From template to living dataset What happens when you pick FRED, World Bank or IMF in the REST API form The only step that needs you: paste an API key (FRED only) and, optionally, edit series, countries or years. 1. Pick Service dropdown then a template 2. Prefill Endpoint URL + response path 3. Parse Find the rows, build a table 4. Dataset Ready to chart, merge and test Scheduled refresh Charts Merges Reports Monitors Agent + MCP

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.

TemplateSeries IDFrequencyWhat you get
Real GDPGDPC1QuarterlyUS real GDP in chained 2017 dollars
Consumer Price IndexCPIAUCSLMonthlyCPI for all urban consumers, seasonally adjusted
CPI inflation, year-over-year %CPIAUCSL + units=pc1MonthlyInflation rate computed by FRED, no math needed
Unemployment RateUNRATEMonthlyUS civilian unemployment rate
Federal Funds RateFEDFUNDSMonthlyEffective federal funds rate
10-Year Treasury YieldDGS10DailyConstant-maturity yield since 2015
Series searchany keywordn/aSeries 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.

The parts of the URL you edit Everything else in the template stays as it is URLs shortened for readability. Placeholders must be replaced before the form will submit. FRED …/observations?series_id= CPIAUCSL &units= pc1 &api_key= YOUR_FRED_API_KEY any FRED series ID % change from a year ago your free key World Bank …/v2/country/ USA;CHN;JPN /indicator/ NY.GDP.MKTP.CD ?format=json&date= 2000:2024 ISO3 codes or all indicator code year range

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.

TemplateCountriesNotes
GDP (current US$)Every country and aggregateUses all in the URL
GDP per capita (current US$)Major economies
GDP growth (annual %)Major economies
PopulationEvery country and region
Inflation, consumer prices (annual %)Major economies
Unemployment rate (% of labor force)Major economiesILO-modelled estimates
Life expectancy at birthEvery 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.

TemplateUnit
Real GDP growth%
Inflation, average consumer prices%
Unemployment rate%
Government gross debt% of GDP
Current account balance% of GDP
GDP per capitaCurrent 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.

Two awkward response shapes, handled for you What the World Bank and IMF send back, and what you get in QuantumLayers Values shown are placeholders to illustrate the structure. World Bank [0] { page: 1, pages: 3, total: 200 } metadata, skipped [1] [ {country, date, value}, {country, date, value}, … ] response path = 1 → the rows IMF (SDMX-JSON) countries: [USA, CHN, JPN …] years: [1980, 1981 …] “0:2” → 4.1 “1:2” → 5.3 TIME_PERIOD USA CHN JPN 1980 … … … 1981 … … … 1982 4.1 5.3 … one column per country, ready for a line chart

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 needUseWhy
US data monthly, weekly or dailyFREDThe only one of the three with sub-annual frequency
A specific US series, such as a Treasury yield or a state indicatorFREDAny of its series by ID
Many countries or long annual historiesWorld BankAbout 200 economies, no key
Development indicators beyond GDPWorld BankPopulation, life expectancy and many more indicator codes
Forward-looking projectionsIMFWorld Economic Outlook includes coming years
Fiscal and external balances on a consistent basisIMFDebt 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.

Is growth beating prices? Year-over-year revenue growth vs FRED CPI inflation (units=pc1) Illustrative data. Merge your monthly revenue with the FRED CPI template on the month to build this view. 0% 2% 4% 6% 8% 10% M1 M7 M13 M19 M24 Revenue growth CPI inflation real growth

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 caseDatasetsQuantumLayers feature
Revenue vs inflationFRED CPI (pc1) + your revenueMerge on month, correlation
Rate-sensitive salesFEDFUNDS or DGS10 + your salesCross-correlation with lag
Expansion screeningWorld Bank GDP per capita + populationANOVA and correlation
Regime alertsFRED CPI or UNRATEMonitors with structural break detection
Ad hoc questionsAny of the aboveQL 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.