Sand AISand AI MAGI-2MAGI-2 est maintenant sur SandBase : vidéo 1080p avec audio natifEssayer maintenant

FRED category

Docs API
https://api.sandbase.ai/v1/api/fred/category

category from FRED. Returns the official FRED API response unchanged.

Prix
$0.00001USD / appel
Méthode
POST
Réponse
JSON
Paramètres
0 obligatoires · 2 facultatifs

Bac à sable

Entrée
The id for a category. integer, default: 0 (root category)
Response format. Only json is supported.
SortiePrêt

Votre sortie apparaîtra ici

Complétez les entrées, puis cliquez sur Exécuter.

README de l'API

FRED category API

Returns the name and parent of one FRED category. It takes an optional category_id, and the default 0 returns the root category.

Use cases

  • Look up the name of a FRED category when you only have its numeric id.
  • Walk up the FRED category tree by following parent_id from a known category.
  • Confirm that a category_id exists before you request its child categories or series.

Request

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.

Parameters

NameTypeRequiredDescription
category_idintegerNoThe id for a category. integer, default: 0 (root category)
file_typestringNoResponse format. Only json is supported.

Example response

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
    }
  ]
}

Response fields

FieldMeaning
categories[]List of matching categories. It holds one item for the requested category_id.
categories[].idNumeric id of the category. The root category has id 0.
categories[].nameDisplay name of the category. The root category is named Categories.
categories[].parent_idId of the parent category. The root category shows 0 as its own parent.

Notes

Pricing

$0.00001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Explorer plus

APIs associées

Toutes les APIs
APIPrixRéponse
FRED categoryCette API
FRED
$0.00001 par appelJSON
FRED$0.00001 par appelJSON
FRED$0.00001 par appelJSON
FRED$0.00001 par appelJSON
FRED$0.00001 par appelJSON
FRED$0.00001 par appelJSON

Questions

FAQ

Comment utiliser l’API FRED category ?

Envoyez une requête POST à https://api.sandbase.ai/v1/api/fred/category 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.

Combien coûte l’API FRED category ?

$0.00001 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.

Quels paramètres l’API FRED category accepte-t-elle ?

Aucun paramètre n’est requis. Facultatif : category_id (integer) et file_type (l’un de json). Le tableau des paramètres et le Playground sur cette page listent tous les champs.

Que renvoie l’API FRED category ?

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.

Ai-je besoin d’un compte développeur ou d’une clé API FRED ?

Non. FRED category 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.