Register for a free FRED API key at https://fred.stlouisfed.org/docs/api/api_key.html
GET https://api.stlouisfed.org/fred/series/observations?series_id={SERIES_ID}&api_key=<API_KEY>&file_type=json to fetch observations for a known series (e.g., 'GDP' for nominal GDP, 'CPIAUCSL' for CPI)
Use optional parameters 'observation_start' and 'observation_end' in YYYY-MM-DD format to limit the date range returned
If you don't know the series ID, search via GET https://api.stlouisfed.org/fred/series/search?search_text={query}&api_key=<API_KEY>&file_type=json and select the most relevant result by 'popularity' or 'title'
Parse the 'observations' array, handling the string value '.' which FRED uses to represent missing or unavailable data points rather than null
Known gotchas
FRED series are often revised; the observations endpoint returns the latest vintage by default, meaning a value you fetched previously for a past date may differ from what you fetch today — use the 'vintage_dates' endpoint if you need point-in-time historical data as it was originally reported
The free API key has a rate limit; implement caching for frequently accessed series rather than re-fetching on every request
Some FRED series are aggregations with a reporting lag of several weeks; always check the 'last_updated' field on the series metadata to understand how current the data actually is
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp