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.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก 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.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform 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 key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ 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 นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
FRED Get Series ObservationsAPI นี้ FRED | $0.00001 ต่อการเรียก | JSON |
FRED | $0.00001 ต่อการเรียก | JSON |
FRED | $0.00001 ต่อการเรียก | JSON |
FRED | $0.00001 ต่อการเรียก | JSON |
FRED | $0.00001 ต่อการเรียก | JSON |
FRED | $0.00001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/fred/series-observations โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.00001 ต่อครั้ง ทุกองค์กรจะได้รับคำขอฟรี 100 ครั้งต่อวัน UTC โดยใช้ร่วมกันใน SandBase APIs ที่เข้าเงื่อนไขรวมถึงรายการนี้ หลังจากนั้นแต่ละคำขอจะคิดค่าบริการตามราคานี้จากยอดคงเหลือ 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 ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น FRED Get Series Observations ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง FRED API แยกต่างหาก