category_idinteger
The id for a category. integer, default: 0 (root category)
Default: 0
https://api.sandbase.ai/v1/api/fred/category-childrenGet Category Children from FRED. Returns the official FRED API response unchanged.
Output Anda akan muncul di sini
Lengkapi input, lalu klik Run.
Returns the child categories of a FRED category. Pass a category_id to list the children of that category. Leave it out to list the top-level categories under the root (0).
curl -X POST "https://api.sandbase.ai/v1/api/fred/category-children" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_type": "json"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
category_id | integer | No | The id for a category. integer, default: 0 (root category) |
file_type | string | No | Response format. Only json is supported. |
realtime_end | string | No | The end of the real-time period. For more information, see Real-Time Periods . 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 . YYYY-MM-DD formatted string, optional, default: today's date |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"categories": [
{
"id": 32991,
"name": "Money, Banking, & Finance",
"parent_id": 0
}
]
}
| Field | Meaning |
|---|---|
categories[] | List of child categories of the requested category. |
categories[].id | Numeric id of the child category. Pass it as category_id to get the next level down. |
categories[].name | Display name of the category, such as National Accounts. |
categories[].parent_id | Id of the parent category. It is 0 for top-level categories under the root. |
category_id to get the root's children, then use an id from the result as category_id in the next call.realtime_start and realtime_end take YYYY-MM-DD dates. file_type only accepts json.$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/category-children" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_type": "json",
"category_id": 0
}'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.
category_idintegerThe id for a category. integer, default: 0 (root category)
Default: 0
file_typestringResponse format. Only json is supported.
Default: "json"
Nilai yang mungkin: json
realtime_endstringThe end of the real-time period. For more information, see Real-Time Periods . 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 . YYYY-MM-DD formatted string, optional, default: today's date
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 Category ChildrenAPI 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/category-children 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, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Tidak ada parameter yang wajib. Opsional: category_id (integer), file_type (salah satu dari json), realtime_end (string) dan realtime_start (string). 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 Category Children 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.