series_idstringwajib
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.
Output Anda akan muncul di sini
Lengkapi input, lalu klik Run.
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.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
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"
}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
series_idstringwajibThe 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
Default: "avg"
Nilai yang mungkin: avg, sum, eop
file_typestringResponse format. Only json is supported.
Default: "json"
Nilai yang mungkin: 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,
Nilai yang mungkin: 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
Default: 100000
observation_endstringThe end of the observation period. YYYY-MM-DD formatted string, optional, default: 9999-12-31 (latest available)
Default: "9999-12-31"
observation_startstringThe start of the observation period. YYYY-MM-DD formatted string, optional, default: 1776-07-04 (earliest available)
Default: "1776-07-04"
offsetintegernon-negative integer, optional, default: 0
Default: 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
Default: 1
Nilai yang mungkin: 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
Default: "asc"
Nilai yang mungkin: 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
Default: "lin"
Nilai yang mungkin: 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
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
Belum ada respons tersimpan yang dipublikasikan. Jalankan API di Playground untuk melihat responsnya.
Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
FRED Get Series ObservationsAPI ini FRED | $0.00001 per panggilan | JSON |
FRED | $0.00001 per panggilan | JSON |
FRED | $0.00001 per panggilan | JSON |
FRED | $0.00001 per panggilan | JSON |
FRED | $0.00001 per panggilan | JSON |
FRED | $0.00001 per panggilan | JSON |
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/fred/series-observations dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
$0.00001 per panggilan. Setiap organisasi mendapat 100 panggilan gratis per hari UTC, dibagi di seluruh API SandBase yang memenuhi syarat termasuk yang ini; setelah itu setiap panggilan ditagihkan dengan harga ini dari saldo SandBase Anda. Tidak ada langganan.
Wajib: series_id (string). Opsional: aggregation_method (salah satu dari avg, sum, eop), file_type (salah satu dari json), frequency (salah satu dari d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem), limit (integer), observation_end (string) dan observation_start (string) dan 7 lainnya. Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.
Tidak. FRED Get Series Observations berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API FRED secara terpisah.