Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

FRED Get Series Observations

API 文档
https://api.sandbase.ai/v1/api/fred/series-observations

Get Series Observations from FRED. Returns the official FRED API response unchanged.

价格
$0.00001美元 / 次调用
方法
POST
响应
JSON
参数
1 个必填 · 13 个可选
每天 100 次免费调用每天前 100 次调用免费(按组织共享)· UTC 00:00 重置。之后按次计费。

Playground

输入
The id for a series. string, required
A key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set. string, optional, default: avg One of the following values: 'avg', 'sum', 'eop' avg = Average sum = Sum eop = End of Period avg = Average sum = Sum eop = En
Response format. Only json is supported.
An optional parameter that indicates a lower frequency to aggregate values to. The FRED frequency aggregation feature converts higher frequency data series into lower frequency data series (e.g. converts a monthly data series into an annual data series). In FRED, the highest frequency data is daily,
The maximum number of results to return. integer between 1 and 100000, optional, default: 100000 范围:1 到 100000。
The end of the observation period. YYYY-MM-DD formatted string, optional, default: 9999-12-31 (latest available)
The start of the observation period. YYYY-MM-DD formatted string, optional, default: 1776-07-04 (earliest available)
non-negative integer, optional, default: 0 最小值:0。
An integer that indicates an output type. integer, optional, default: 1 One of the following values: '1', '2', '3', '4' 1 = Observations by Real-Time Period 2 = Observations by Vintage Date, All Observations 3 = Observations by Vintage Date, New and Revised Observations Only 4 = Observations, Initia
The end of the real-time period. For more information, see Real-Time Periods , vintage_dates . YYYY-MM-DD formatted string, optional, default: today's date
The start of the real-time period. For more information, see Real-Time Periods , vintage_dates . YYYY-MM-DD formatted string, optional, default: today's date
Sort results is ascending or descending observation_date order. One of the following strings: 'asc', 'desc'. optional, default: asc
A key that indicates a data value transformation. string, optional, default: lin (No transformation) One of the following values: 'lin', 'chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log' lin = Levels (No transformation) chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent
A comma separated string of YYYY-MM-DD formatted dates in history (e.g. 2000-01-01,2005-02-24). Vintage dates are used to download data as it existed on these specified dates in history. Vintage dates can be specified instead of a real-time period using realtime_start and realtime_end. Sometimes it
输出就绪

您的输出将显示在这里

完成输入,然后点击运行。

API README

FRED Get Series Observations API

Returns the observations (date and value pairs) for one FRED data series. It needs a series_id, such as GNPCA, and can filter by date range, change the units, or aggregate to a lower frequency.

Use cases

  • Pull the full history of a series such as GNPCA to chart it or load it into a spreadsheet.
  • Request units such as pch or pc1 to get percent changes without calculating them yourself.
  • Convert a monthly series to annual values with frequency and aggregation_method.
  • Fetch a series as it looked on past dates with vintage_dates or realtime_start and realtime_end to test models on the data known at that time.

Request

curl -X POST "https://api.sandbase.ai/v1/api/fred/series-observations" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"series_id": "GNPCA", "file_type": "json"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
series_idstringYesThe id for a series. string, required
aggregation_methodstringNoA key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set. string, optional, default: avg One of the following values: 'avg', 'sum', 'e
file_typestringNoResponse format. Only json is supported.
frequencystringNoAn optional parameter that indicates a lower frequency to aggregate values to. The FRED frequency aggregation feature converts higher frequency data series into lower frequency data series (e.g. converts a monthly data s
limitintegerNoThe maximum number of results to return. integer between 1 and 100000, optional, default: 100000
observation_endstringNoThe end of the observation period. YYYY-MM-DD formatted string, optional, default: 9999-12-31 (latest available)
observation_startstringNoThe start of the observation period. YYYY-MM-DD formatted string, optional, default: 1776-07-04 (earliest available)
offsetintegerNonon-negative integer, optional, default: 0
output_typeintegerNoAn integer that indicates an output type. integer, optional, default: 1 One of the following values: '1', '2', '3', '4' 1 = Observations by Real-Time Period 2 = Observations by Vintage Date, All Observations 3 = Observat
realtime_endstringNoThe end of the real-time period. For more information, see Real-Time Periods , vintage_dates . YYYY-MM-DD formatted string, optional, default: today's date
realtime_startstringNoThe start of the real-time period. For more information, see Real-Time Periods , vintage_dates . YYYY-MM-DD formatted string, optional, default: today's date
sort_orderstringNoSort results is ascending or descending observation_date order. One of the following strings: 'asc', 'desc'. optional, default: asc
unitsstringNoA key that indicates a data value transformation. string, optional, default: lin (No transformation) One of the following values: 'lin', 'chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log' lin = Levels (No transformat
vintage_datesstringNoA comma separated string of YYYY-MM-DD formatted dates in history (e.g. 2000-01-01,2005-02-24). Vintage dates are used to download data as it existed on these specified dates in history. Vintage dates can be specified in

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "count": 97,
  "file_type": "json",
  "limit": 100000,
  "observation_end": "9999-12-31",
  "observation_start": "1776-07-04",
  "observations": [
    {
      "date": "1929-01-01",
      "realtime_end": "2026-10-30",
      "realtime_start": "2026-10-30",
      "value": "1202.659"
    }
  ],
  "offset": 0,
  "order_by": "observation_date",
  "output_type": 1,
  "realtime_end": "2026-10-30",
  "realtime_start": "2026-10-30",
  "sort_order": "asc"
}

Response fields

FieldMeaning
countTotal number of observations that match the request. In the example it is 97.
observations[].dateDate of the observation in YYYY-MM-DD format. For this annual series each date is January 1 of a year.
observations[].valueValue of the observation as a string. Convert it to a number before you calculate with it.
observations[].realtime_start / observations[].realtime_endStart and end of the real-time period in which this value was the current one. Both are YYYY-MM-DD dates.
observation_start / observation_endObservation date range used for the request. The defaults 1776-07-04 and 9999-12-31 mean no limit.
unitsTransformation applied to the values. lin means levels with no transformation.
sort_order / order_bySort direction and the field used to sort the observations. The example uses asc and observation_date.
limit / offsetPage size and starting position used for this response. Use them to page through long series.
output_typeOutput type used for the response. The example uses 1, which is observations by real-time period.

Notes

  • series_id is required. To find an ID, use FRED Search Series.
  • Page through long series with limit (1 to 100000) and offset. Compare offset plus the number of returned rows with count to know when to stop.
  • To see the title, units and frequency of a series, call FRED Get Series.
  • To see the dates on which past values were revised, call FRED Get Series Vintage Dates.

Pricing

$0.00001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相关 APIs

全部 APIs
API价格响应
FRED$0.00001 每次调用JSON
FRED$0.00001 每次调用JSON
FRED$0.00001 每次调用JSON
FRED$0.00001 每次调用JSON
FRED$0.00001 每次调用JSON
FRED$0.00001 每次调用JSON

问题

常见问题

如何使用 FRED Get Series Observations API?

向 https://api.sandbase.ai/v1/api/fred/series-observations 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。

FRED Get Series Observations API 的价格是多少?

每次调用 $0.00001。每个组织在每个 UTC 日可获得 100 次免费调用,适用于包括此接口在内的所有符合条件的 SandBase APIs;超过后,每次调用将按此价格从您的 SandBase 余额中扣费。无需订阅。

FRED Get Series Observations API 接受哪些参数?

必填:series_id (string)。 可选:aggregation_method(avg, sum, eop 之一), file_type(json 之一), frequency(d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem 之一), limit (integer), observation_end (string) 和 observation_start (string) 以及另外 7 项。 Parameters 表和本页的 Playground 列出了每个字段。

FRED Get Series Observations API 返回什么?

在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。

我需要 FRED 开发者账户或 API key 吗?

不需要。FRED Get Series Observations 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 FRED API 访问权限。