GnistAI GnistAI
Log in

FRED (Federal Reserve)

U.S. economic time series — GDP, inflation, interest rates, and 800k+ indicators.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 6 tools tools 6 6 type: api wrapper type type api wrapper api wrapper lifecycle: flagship lifecycle lifecycle flagship flagship Economics

Data source: Federal Reserve Economic Data

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/fred/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (6)

get_series

Get economic time series observations from FRED.

FRED (Federal Reserve Bank of St. Louis) hosts 800,000+ economic time
series from 100+ sources: BLS, BEA, Census, Federal Reserve, IMF, OECD,
World Bank, and more. This is the primary tool for fetching data when
you already know the series ID.

Common series IDs:
- FEDFUNDS — Federal Funds Rate (monthly, %)
- CPIAUCSL — CPI All Urban Consumers (monthly, index)
- UNRATE — Civilian Unemployment Rate (monthly, %)
- GDP — Gross Domestic Product (quarterly, billions USD)
- DGS10 — 10-Year Treasury Yield (daily, %)
- DGS2 — 2-Year Treasury Yield (daily, %)
- T10Y2Y — 10-Year minus 2-Year Treasury spread (daily, %)
- M2SL — M2 Money Stock (monthly, billions USD)
- MORTGAGE30US — 30-Year Fixed Mortgage Rate (weekly, %)
- DEXUSEU — USD/EUR exchange rate (daily)
- PAYEMS — Total Nonfarm Payrolls (monthly, thousands)

Args:
series_id: FRED series identifier (e.g. "FEDFUNDS", "UNRATE", "GDP").
observation_start: Start date (YYYY-MM-DD). If omitted, fetches from the series start.
observation_end: End date (YYYY-MM-DD). If omitted, fetches to the latest available observation.
frequency: Aggregate to lower frequency. Options: "d" (daily), "w" (weekly), "bw" (biweekly),
"m" (monthly), "q" (quarterly), "sa" (semiannual), "a" (annual).
aggregation_method: How to aggregate when changing frequency. Options: "avg" (default), "sum", "eop".
limit: Maximum observations to return (default 100, max 100000).

Returns:
series_id, title, units, frequency, seasonal_adjustment, last_updated,
observation_count, and observations list of {"date": "YYYY-MM-DD", "value": float}.

ParameterTypeRequiredDescription
series_idstringrequiredFRED series identifier (e.g. "FEDFUNDS", "UNRATE", "GDP").
observation_startanyoptionalStart date (YYYY-MM-DD). If omitted, fetches from the series start.
observation_endanyoptionalEnd date (YYYY-MM-DD). If omitted, fetches to the latest available observation.
frequencyanyoptionalAggregate to lower frequency. Options: "d" (daily), "w" (weekly), "bw" (biweekly), "m" (monthly), "q" (quarterly), "sa" (semiannual), "a" (annual).
aggregation_methodanyoptionalHow to aggregate when changing frequency. Options: "avg" (default), "sum", "eop".
limitintegeroptionalMaximum observations to return (default 100, max 100000). (default: 100)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_series",
    "arguments": {
      "series_id": "example"
    }
  }
}
search_series

Search FRED for economic time series matching a query.

Searches across series titles, notes, and tags. Returns ranked results
sorted by relevance. Use this when you don't know the series ID — then
use get_series() or get_series_info() with the returned series_id.

Example queries:
- "federal funds rate"
- "consumer price index urban"
- "unemployment rate"
- "GDP quarterly"
- "Norway GDP" (FRED includes international series from IMF/OECD/World Bank)
- "yield curve spread"
- "housing starts"

Args:
query: Search terms to match against FRED series names and notes.
limit: Maximum results to return (default 20, max 1000).

Returns:
count and list of matching series with series_id, title, frequency, units,
seasonal_adjustment, date range, last_updated, popularity, and a truncated notes field.

ParameterTypeRequiredDescription
querystringrequiredSearch terms to match against FRED series names and notes.
limitintegeroptionalMaximum results to return (default 20, max 1000). (default: 20)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_series",
    "arguments": {
      "query": "example"
    }
  }
}
get_series_info

Get metadata for a FRED series without fetching observations.

Useful for verifying a series ID and understanding its characteristics
before fetching data: units, frequency, date range, and whether it is
seasonally adjusted.

Args:
series_id: FRED series identifier (e.g. "FEDFUNDS", "UNRATE", "GDP").

Returns:
Full metadata: series_id, title, frequency, units, seasonal_adjustment,
observation_start, observation_end, last_updated, popularity, and notes.

ParameterTypeRequiredDescription
series_idstringrequiredFRED series identifier (e.g. "FEDFUNDS", "UNRATE", "GDP").
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_series_info",
    "arguments": {
      "series_id": "example"
    }
  }
}
get_category

Browse FRED's category hierarchy.

FRED organizes its 800,000+ series into a tree of categories covering
domains like Money, Banking & Finance; National Accounts; Prices; Labor
Market; International Data; and more. Use this tool to discover series
by topic area. category_id=0 returns the top-level categories.

Args:
category_id: Integer category ID. Default 0 returns the root categories.
Pass a child category ID to drill down. IDs for common
top-level categories:
- 32991: Money, Banking & Finance
- 10: National Accounts
- 9: Population, Employment, & Labor Markets
- 22: Prices
- 3008: U.S. Regional Data
- 32263: Business Cycles

Returns:
Category name, parent_id, children_count, and list of children each with id, name, parent_id.

ParameterTypeRequiredDescription
category_idintegeroptionalInteger category ID. Default 0 returns the root categories. Pass a child category ID to drill down. IDs for common top-level categories: - 32991: Money, Banking & Finance - 10: National Accounts - ... (default: 0)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_category",
    "arguments": {}
  }
}
compare_series

Fetch multiple FRED series aligned to a common time axis.

Retrieves all requested series and returns their observations aligned
by date — only dates where all series have a value are included.
Ideal for correlation analysis, charting, and comparing economic indicators.

Example use cases:
- compare_series(["FEDFUNDS", "DGS10", "DGS2"]) — Fed Funds vs. yield curve
- compare_series(["UNRATE", "CPIAUCSL"], frequency="q") — unemployment vs. CPI quarterly
- compare_series(["GDP", "PAYEMS"], observation_start="2020-01-01") — GDP vs. payrolls post-COVID

Args:
series_ids: List of 2–10 FRED series IDs to compare.
observation_start: Start date (YYYY-MM-DD) applied to all series.
observation_end: End date (YYYY-MM-DD) applied to all series.
frequency: Aggregate all series to this frequency before aligning (e.g. "q" for quarterly, "a" for annual).

Returns:
series metadata dict (title, units, frequency per series), aligned_observation_count,
and observations list where each row is {"date": "YYYY-MM-DD", "<series_id>": float, ...}.

ParameterTypeRequiredDescription
series_idslist[string]requiredList of 2–10 FRED series IDs to compare.
observation_startanyoptionalStart date (YYYY-MM-DD) applied to all series.
observation_endanyoptionalEnd date (YYYY-MM-DD) applied to all series.
frequencyanyoptionalAggregate all series to this frequency before aligning (e.g. "q" for quarterly, "a" for annual).
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "compare_series",
    "arguments": {
      "series_ids": [
        "example"
      ]
    }
  }
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/mcp/fred/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_series", "arguments": {"series_id": "example"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/fred/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_series",
    "arguments": {
      "series_id": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Economics)

Resources