category_idinteger
The id for a category. integer, default: 0 (root category)
Par défaut : 0
https://api.sandbase.ai/v1/api/fred/category-childrenGet Category Children from FRED. Returns the official FRED API response unchanged.
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
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.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
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
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
category_idintegerThe id for a category. integer, default: 0 (root category)
Par défaut : 0
file_typestringResponse format. Only json is supported.
Par défaut : "json"
Valeurs possibles : 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
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
FRED Get Category ChildrenCette API FRED | $0.00001 par appel | JSON |
FRED | $0.00001 par appel | JSON |
FRED | $0.00001 par appel | JSON |
FRED | $0.00001 par appel | JSON |
FRED | $0.00001 par appel | JSON |
FRED | $0.00001 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/fred/category-children avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
$0.00001 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Aucun paramètre n’est requis. Facultatif : category_id (integer), file_type (l’un de json), realtime_end (string) et realtime_start (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Non. FRED Get Category Children fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API FRED séparément.