Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access to FRED: Federal Reserve Economic Database

    My contact at the St Louis Fed verifies that programmatic FRED access now requires an authorized (free) API key. You can use a browser to describe a single series, but programmatic access to that page is not feasible using Stata, Python, or a combination thereof without an API key. I have worked with Claude today to verify that conclusion. Thus, the original freduse routine by David Drukker, which was updated by John Coglianese and Jacob Williams in 2024 to deal with a new HTML format, is no longer workable. The fredusex routine that I wrote when freduse was broken is also unworkable, and neither routine can be readily modified to use an API key. Thus, you should rely on Stata's official import fred command to access FRED data. Here is Claude's useful summary of the development of community-contributed FRED access.

    The search confirms the key date: FRED launched API Version 2 in November 2025 Stlouisfed, which is almost certainly when the strict API key requirement for programmatic access was imposed on the older /data/ endpoint as well. Before that, the flat-file endpoint at fred.stlouisfed.org/data/ was freely accessible without authentication, which is what freduseand fredusex relied on.

    So the complete timeline is:
    • 2006: Drukker writes freduse, scraping FRED's unauthenticated flat-file endpoint
    • 2012: FRED API v1 launches with optional key, but unauthenticated scraping still works so no one migrates
    • 2024: FRED changes their HTML page format, breaking freduse; Baum writes fredusex to adapt, still using the unauthenticated /data/ endpoint
    • Late 2024: Others rewrite freduse to restore functionality, also still unauthenticated
    • November 2025: FRED launches API v2 and simultaneously enforces API key requirements on the old endpoint, breaking all scraping-based approaches simultaneously
    • 2026: Only import fred (StataCorp) remains viable as a pure Stata solution
Working...
X