datestringจำเป็น
The date you want to pull a series group data from. YYYY-MM-DD formatted string, required
https://api.sandbase.ai/v1/api/fred/geo-regional-dataGeoFRED Regional Data from FRED. Returns the official FRED API response unchanged.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns one value per region for a FRED GeoFRED series group on a single date. You pass a series_group ID, a region_type, a date, a frequency, a season and units.
value for each code.code and series_id of each region.curl -X POST "https://api.sandbase.ai/v1/api/fred/geo-regional-data" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date": "2023-01-01", "frequency": "a", "region_type": "state", "season": "NSA", "series_group": "882", "units": "Dollars", "file_type": "json"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
date | string | Yes | The date you want to pull a series group data from. YYYY-MM-DD formatted string, required |
frequency | string | Yes | Frequency automatically assigns the default frequency of the map when using the Request Wizard above. The parameter can be used as a frequency aggregation feature. The maps frequency aggregation feature converts higher f |
region_type | string | Yes | The region you want to pull data for. string, required One of the following values: bea msa frb necta state country county censusregion bea msa frb necta state country county censusregion |
season | string | Yes | The seasonality of the series group. string, required, five possible SA (Seasonally Adjusted), NSA (Not Seasonally Adjusted), SSA (Smoothed Seasonally Adjusted), SAAR (Seasonally Adjusted Annual Rate), or NSAAR (Not Seas |
series_group | string | Yes | The ID for a group of series found in FRED. string, required |
units | string | Yes | The units of the series you want to pull. string, required |
aggregation_method | string | No | 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 = End of Period |
file_type | string | No | Response format. Only json is supported. |
start_date | string | No | The start date you want to request series group data from. This allows you to pull a range of data YYYY-MM-DD formatted string, optional |
transformation | 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 |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"meta": {
"data": {
"2023-01-01": [
{
"code": "01",
"region": "Alabama",
"series_id": "ALPCPI",
"value": 54760
}
]
},
"frequency": "Annual",
"region": "state",
"seasonality": "Not Seasonally Adjusted",
"title": "2025 Per Capita Personal Income by State (Dollars)",
"units": "Dollars"
}
}
| Field | Meaning |
|---|---|
meta.title | Title of the map. It names the measure, the region level and the units. |
meta.data | Object keyed by date in YYYY-MM-DD format. Each key holds a list of regional values for that date. |
meta.data.*[].region | Name of the region, for example Alabama. |
meta.data.*[].code | Short code for the region. In this response it is a two-digit string for each state. |
meta.data.*[].series_id | FRED series ID for this region, for example ALPCPI. You can use it with other FRED APIs. |
meta.data.*[].value | Value of the series for the region on that date, in the units named in meta.units. |
meta.frequency / meta.seasonality | Frequency and seasonal adjustment of the data, written out in full, such as Annual and Not Seasonally Adjusted. |
meta.region / meta.units | Region type and units that were applied to the request. |
meta.data is the requested date. The * in a path stands for that date key.series_group values and their details.series_id from a row with FRED Get Series Observations to get the full history for one region.start_date to request a range of dates instead of a single date.$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/geo-regional-data" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date": "2023-01-01",
"units": "Dollars",
"season": "NSA",
"file_type": "json",
"frequency": "a",
"region_type": "state",
"series_group": "882",
"transformation": "lin",
"aggregation_method": "avg"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
datestringจำเป็นThe date you want to pull a series group data from. YYYY-MM-DD formatted string, required
frequencystringจำเป็นFrequency automatically assigns the default frequency of the map when using the Request Wizard above. The parameter can be used as a frequency aggregation feature. The maps frequency aggregation feature converts higher frequency data series into lower frequency data series (e.g. converts a monthly d
ค่าที่เป็นไปได้: d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem
region_typestringจำเป็นThe region you want to pull data for. string, required One of the following values: bea msa frb necta state country county censusregion bea msa frb necta state country county censusregion
ค่าที่เป็นไปได้: bea, msa, frb, necta, state, country, county, censusregion
seasonstringจำเป็นThe seasonality of the series group. string, required, five possible SA (Seasonally Adjusted), NSA (Not Seasonally Adjusted), SSA (Smoothed Seasonally Adjusted), SAAR (Seasonally Adjusted Annual Rate), or NSAAR (Not Seasonally Adjusted Annual Rate)
series_groupstringจำเป็นThe ID for a group of series found in FRED. string, required
unitsstringจำเป็นThe units of the series you want to pull. string, required
aggregation_methodstringstring, optional, default: avg One of the following values: 'avg', 'sum', 'eop' avg = Average sum = Sum eop = End of Period avg = Average sum = Sum eop = End of Period
ค่าเริ่มต้น: "avg"
ค่าที่เป็นไปได้: avg, sum, eop
file_typestringResponse format. Only json is supported.
ค่าเริ่มต้น: "json"
ค่าที่เป็นไปได้: json
start_datestringThe start date you want to request series group data from. This allows you to pull a range of data YYYY-MM-DD formatted string, optional
transformationstringA 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
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
FRED GeoFRED Regional DataAPI นี้ 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/geo-regional-data โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.00001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: date (string), frequency (หนึ่งใน d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem), region_type (หนึ่งใน bea, msa, frb, necta, state, country, county, censusregion), season (string), series_group (string) และ units (string). ตัวเลือก: aggregation_method (หนึ่งใน avg, sum, eop), file_type (หนึ่งใน json), start_date (string) และ transformation (หนึ่งใน lin, chg, ch1, pch, pc1, pca, cch, cca, log). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น FRED GeoFRED Regional Data ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง FRED API แยกต่างหาก