Twinkle HubTwinkle Hub

美聯儲 FRED 時序觀測值 (單一 series)

us_get_fred_series_observations

🇺🇸 미국읽기 전용

關鍵字 / Keywords: 美聯儲 經濟數據 觀測值 時間序列 GDP 失業率 CPI 通膨 利率 FRED observations values time series data macro UNRATE GDP CPIAUCSL FEDFUNDS T10Y2Y quarterly monthly

Scope: US Federal Reserve Economic Data (FRED) · one series' per-period values, optionally date-sliced.

Endpoint: https://api.stlouisfed.org/fred/series/observations?series_id=…

Args: series_id: FRED series id — human-memorable, stable strings. Common anchors: "GDP" · US Gross Domestic Product (quarterly) "UNRATE" · Unemployment Rate (monthly) "CPIAUCSL" · Consumer Price Index (monthly, SA) "FEDFUNDS" · Effective Federal Funds Rate "T10Y2Y" · 10-Year vs 2-Year Treasury Spread Discover via us_search_fred_series first. observation_start / observation_end: YYYY-MM-DD inclusive bounds. Omit for full history. limit: max observations returned (default 1000, hard cap 100000). sort_order: "asc" (default · oldest first) or "desc". units: optional FRED transform code applied server-side — "lin" (raw · default), "chg" (change), "ch1" (change over 1 year), "pch" (% change), "pc1" (% change over 1 year), "pca" (annualized % change), "cch" (continuously compounded), "cca", "log". frequency: optional aggregation frequency ("d","w","bw","m", "q","sa","a"). Only if you want re-aggregation different from the series' native frequency. aggregation_method: "avg" (default), "sum", "eop" (end-of-period). Only meaningful with frequency.

Returns dict with series_id, series_title, units, frequency, seasonal_adjustment, copyright (from the series' notes field — OECD/Eurostat/ISM/private-source attribution lives here), count, observations: [{date, value, missing, realtime_start, realtime_end}, ...].

Values arrive as strings (FRED convention); "." denotes missing — pre-flagged via missing=True for convenience.

Requires US_FRED_API_KEY. License warning per FRED terms — third-party series carry origin-jurisdiction copyright; the response's copyright field surfaces the per-series notice so agents can check before redistributing.

파라미터

이름타입설명
series_id *string
observation_startstring
observation_endstring
limitinteger
sort_orderstring
unitsstring
frequencystring
aggregation_methodstring
원본 JSON schema
{
  "properties": {
    "series_id": {
      "title": "Series Id",
      "type": "string"
    },
    "observation_start": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Observation Start"
    },
    "observation_end": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Observation End"
    },
    "limit": {
      "default": 1000,
      "title": "Limit",
      "type": "integer"
    },
    "sort_order": {
      "default": "asc",
      "title": "Sort Order",
      "type": "string"
    },
    "units": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Units"
    },
    "frequency": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Frequency"
    },
    "aggregation_method": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Aggregation Method"
    }
  },
  "required": [
    "series_id"
  ],
  "title": "us_get_fred_series_observationsArguments",
  "type": "object"
}

호출 방법

스타터 — 파라미터는 위 표 참조
us_get_fred_series_observations({ series_id: "…" })