series_idstring必須
The id for a series. string, required
https://api.sandbase.ai/v1/api/fred/series-observationsGet Series Observations from FRED. Returns the official FRED API response unchanged.
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
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.
GNPCA to chart it or load it into a spreadsheet.units such as pch or pc1 to get percent changes without calculating them yourself.frequency and aggregation_method.vintage_dates or realtime_start and realtime_end to test models on the data known at that time.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.
| Name | Type | Required | Description |
|---|---|---|---|
series_id | string | Yes | The id for a series. string, required |
aggregation_method | string | No | 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', 'e |
file_type | string | No | Response format. Only json is supported. |
frequency | string | No | 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 s |
limit | integer | No | The maximum number of results to return. integer between 1 and 100000, optional, default: 100000 |
observation_end | string | No | The end of the observation period. YYYY-MM-DD formatted string, optional, default: 9999-12-31 (latest available) |
observation_start | string | No | The start of the observation period. YYYY-MM-DD formatted string, optional, default: 1776-07-04 (earliest available) |
offset | integer | No | non-negative integer, optional, default: 0 |
output_type | integer | No | 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 = Observat |
realtime_end | string | No | 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 |
realtime_start | string | No | 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_order | string | No | Sort results is ascending or descending observation_date order. One of the following strings: 'asc', 'desc'. optional, default: asc |
units | string | No | 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 transformat |
vintage_dates | string | No | 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 in |
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"
}
| Field | Meaning |
|---|---|
count | Total number of observations that match the request. In the example it is 97. |
observations[].date | Date of the observation in YYYY-MM-DD format. For this annual series each date is January 1 of a year. |
observations[].value | Value of the observation as a string. Convert it to a number before you calculate with it. |
observations[].realtime_start / observations[].realtime_end | Start and end of the real-time period in which this value was the current one. Both are YYYY-MM-DD dates. |
observation_start / observation_end | Observation date range used for the request. The defaults 1776-07-04 and 9999-12-31 mean no limit. |
units | Transformation applied to the values. lin means levels with no transformation. |
sort_order / order_by | Sort direction and the field used to sort the observations. The example uses asc and observation_date. |
limit / offset | Page size and starting position used for this response. Use them to page through long series. |
output_type | Output type used for the response. The example uses 1, which is observations by real-time period. |
series_id is required. To find an ID, use FRED Search Series.limit (1 to 100000) and offset. Compare offset plus the number of returned rows with count to know when to stop.$0.00001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
curl -X POST "https://api.sandbase.ai/v1/api/fred/series-observations" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 100000,
"units": "lin",
"offset": 0,
"file_type": "json",
"series_id": "GNPCA",
"sort_order": "asc",
"output_type": 1,
"observation_end": "9999-12-31",
"observation_start": "1776-07-04",
"aggregation_method": "avg"
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
series_idstring必須The id for a series. string, required
aggregation_methodstringA 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
デフォルト: "avg"
指定可能な値: avg, sum, eop
file_typestringResponse format. Only json is supported.
デフォルト: "json"
指定可能な値: json
frequencystringAn 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,
指定可能な値: d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem
limitintegerThe maximum number of results to return. integer between 1 and 100000, optional, default: 100000
デフォルト: 100000
observation_endstringThe end of the observation period. YYYY-MM-DD formatted string, optional, default: 9999-12-31 (latest available)
デフォルト: "9999-12-31"
observation_startstringThe start of the observation period. YYYY-MM-DD formatted string, optional, default: 1776-07-04 (earliest available)
デフォルト: "1776-07-04"
offsetintegernon-negative integer, optional, default: 0
デフォルト: 0
output_typeintegerAn 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
デフォルト: 1
指定可能な値: 1, 2, 3, 4
realtime_endstringThe 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_startstringThe 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_orderstringSort results is ascending or descending observation_date order. One of the following strings: 'asc', 'desc'. optional, default: asc
デフォルト: "asc"
指定可能な値: asc, desc
unitsstringA 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
デフォルト: "lin"
指定可能な値: lin, chg, ch1, pch, pc1, pca, cch, cca, log
vintage_datesstringA 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の保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
保存済みレスポンスはまだ公開されていません。PlaygroundでAPIを実行し、レスポンスを確認してください。
さらに探索
| 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 |
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/fred/series-observations に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.00001。各組織には UTC 日ごとに 100 回の無料呼び出しが付与され、この API を含む対象の SandBase API 全体で共有されます。それ以降は、各呼び出しが SandBase 残高からこの料金で課金されます。サブスクリプションはありません。
必須: 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 に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。FRED Get Series Observations は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。FRED の API アクセスを別途申請する必要はありません。