category_idinteger
The id for a category. integer, default: 0 (root category)
Predefinito: 0
https://api.sandbase.ai/v1/api/fred/categorycategory from FRED. Returns the official FRED API response unchanged.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Returns the name and parent of one FRED category. It takes an optional category_id, and the default 0 returns the root category.
parent_id from a known category.category_id exists before you request its child categories or series.curl -X POST "https://api.sandbase.ai/v1/api/fred/category" \
-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. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"categories": [
{
"id": 0,
"name": "Categories",
"parent_id": 0
}
]
}
| Field | Meaning |
|---|---|
categories[] | List of matching categories. It holds one item for the requested category_id. |
categories[].id | Numeric id of the category. The root category has id 0. |
categories[].name | Display name of the category. The root category is named Categories. |
categories[].parent_id | Id of the parent category. The root category shows 0 as its own parent. |
category_id or send 0 to get the root category.file_type accepts only json.$0.00001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
curl -X POST "https://api.sandbase.ai/v1/api/fred/category" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_type": "json",
"category_id": 0
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
category_idintegerThe id for a category. integer, default: 0 (root category)
Predefinito: 0
file_typestringResponse format. Only json is supported.
Predefinito: "json"
Valori possibili: json
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
FRED categoryQuesta API FRED | $0.00001 per chiamata | JSON |
FRED | $0.00001 per chiamata | JSON |
FRED | $0.00001 per chiamata | JSON |
FRED | $0.00001 per chiamata | JSON |
FRED | $0.00001 per chiamata | JSON |
FRED | $0.00001 per chiamata | JSON |
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/fred/category con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
$0.00001 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Nessun parametro richiesto. Facoltativi: category_id (integer) e file_type (uno tra json). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. FRED category funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API FRED.