Sand AISand AI MAGI-2MAGI-2 ist jetzt auf SandBase: 1080p-Video mit nativem AudioJetzt testen

FRED category

API-Dokumentation
https://api.sandbase.ai/v1/api/fred/category

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

Preis
$0.00001USD / Aufruf
Methode
POST
Antwort
JSON
Parameter
0 erforderlich · 2 optional

Playground

Eingabe
The id for a category. integer, default: 0 (root category)
Response format. Only json is supported.
AusgabeBereit

Ihre Ausgabe wird hier angezeigt

Vervollständigen Sie die Eingaben und klicken Sie dann auf Ausführen.

API-README

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.

Mehr entdecken

Verwandte APIs

Alle APIs
APIPreisAntwort
FRED categoryDiese API
FRED
$0.00001 pro AufrufJSON
FRED$0.00001 pro AufrufJSON
FRED$0.00001 pro AufrufJSON
FRED$0.00001 pro AufrufJSON
FRED$0.00001 pro AufrufJSON
FRED$0.00001 pro AufrufJSON

Fragen

FAQ

Wie verwende ich die FRED category API?

Senden Sie eine POST-Anfrage an https://api.sandbase.ai/v1/api/fred/category mit Ihrem SandBase API-Schlüssel im Authorization-Header (Bearer) und den Parametern als JSON-Body. Sie können das auch ohne Code direkt auf dieser Seite im Playground testen.

Was kostet die FRED category API?

$0.00001 pro Aufruf, abgerechnet von Ihrem SandBase-Guthaben. Es werden nur die von Ihnen getätigten Aufrufe berechnet; es gibt kein Abo.

Welche Parameter akzeptiert die FRED category API?

Es sind keine Parameter erforderlich. Optional: category_id (integer) und file_type (eines von json). Die Parametertabelle und der Playground auf dieser Seite listen jedes Feld auf.

Was gibt die FRED category API zurück?

Eine JSON-Antwort, die in derselben HTTP-Anfrage zurückgegeben wird (synchron). Die README auf dieser Seite enthält eine Beispielantwort.

Benötige ich ein FRED-Entwicklerkonto oder einen API-Schlüssel?

Nein. FRED category läuft über SandBase, daher deckt ein SandBase API-Schlüssel diesen Endpunkt und jede andere API sowie jedes Modell im Katalog ab. Sie müssen keinen separaten Zugang für FRED API beantragen.