series_idstringbắt buộc
The FRED series_id you want to request maps data for. Not all series that are in FRED have geographical data. string, required
https://api.sandbase.ai/v1/api/fred/geo-series-dataGeoFRED Series Data from FRED. Returns the official FRED API response unchanged.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Returns map data for a FRED series that has geographic values, such as per-state figures for one date. You pass a series_id like WIPCPI, and you can add date or start_date to pick the time period.
curl -X POST "https://api.sandbase.ai/v1/api/fred/geo-series-data" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"series_id": "WIPCPI", "file_type": "json"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
series_id | string | Yes | The FRED series_id you want to request maps data for. Not all series that are in FRED have geographical data. string, required |
date | string | No | The date you want to request series group data from. YYYY-MM-DD formatted string, optional |
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 |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"meta": {
"data": {
"2025-01-01": [
{
"code": "01",
"region": "Alabama",
"series_id": "ALPCPI",
"value": 59754
}
]
},
"frequency": "Annual",
"region": "state",
"seasonality": "Not Seasonally Adjusted",
"title": "2025 Per Capita Personal Income by State (Dollars)",
"units": "Dollars"
}
}
| Field | Meaning |
|---|---|
meta.title | Name of the data set, including the year, the measure and the region type. |
meta.units | Unit of the values, such as Dollars. |
meta.frequency / meta.seasonality | How often the series is published (for example Annual) and whether it is seasonally adjusted. |
meta.region | Type of geographic region the values cover, such as state. |
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, such as Alabama. |
meta.data.*[].code | Short region code. For states it looks like a two-digit string such as 01. |
meta.data.*[].series_id | FRED series ID for that region's own series, such as ALPCPI. |
meta.data.*[].value | Value for that region on that date, in the units given by meta.units. |
series_id is required. Not every FRED series has geographic data.date to request one date, or start_date to pull a range. Both use YYYY-MM-DD format.series_id. Pass it to FRED Get Series Observations to get that region's history.$0.00001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/fred/geo-series-data" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_type": "json",
"series_id": "WIPCPI"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
series_idstringbắt buộcThe FRED series_id you want to request maps data for. Not all series that are in FRED have geographical data. string, required
datestringThe date you want to request series group data from. YYYY-MM-DD formatted string, optional
file_typestringResponse format. Only json is supported.
Mặc định: "json"
Giá trị có thể dùng: 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
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
FRED GeoFRED Series DataAPI này FRED | $0.00001 mỗi lần gọi | JSON |
FRED | $0.00001 mỗi lần gọi | JSON |
FRED | $0.00001 mỗi lần gọi | JSON |
FRED | $0.00001 mỗi lần gọi | JSON |
FRED | $0.00001 mỗi lần gọi | JSON |
FRED | $0.00001 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/fred/geo-series-data với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.00001 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: series_id (string). Tùy chọn: date (string), file_type (một trong số json) và start_date (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. FRED GeoFRED Series Data chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của FRED.