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.
您的输出将显示在这里
完成输入,然后点击运行。
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.
开始构建
具备统一身份验证和使用情况跟踪的平台 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 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_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 保存的示例响应;查看时不会发起实时请求。
尚未发布已保存的响应。请在 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 |
问题
向 https://api.sandbase.ai/v1/api/fred/geo-regional-data 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 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 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。FRED GeoFRED Regional Data 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 FRED API 访问权限。