category_idinteger
The id for a category. integer, default: 0 (root category)
Standard: 0
https://api.sandbase.ai/v1/api/fred/categorycategory from FRED. Returns the official FRED API response unchanged.
Ihre Ausgabe wird hier angezeigt
Vervollständigen Sie die Eingaben und klicken Sie dann auf Ausführen.
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.
Jetzt loslegen
Plattform-API-Endpunkt mit einheitlicher Authentifizierung und Nutzungsnachverfolgung.
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
}'Legen Sie Ihren SandBase API-Schlüssel in Ihrer Serverumgebung fest. Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie Ihren Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis.
category_idintegerThe id for a category. integer, default: 0 (root category)
Standard: 0
file_typestringResponse format. Only json is supported.
Standard: "json"
Mögliche Werte: json
Gespeicherte Beispielantwort für diese API; beim Anzeigen wird keine Live-Anfrage gesendet.
Es wurde keine gespeicherte Antwort veröffentlicht. Führen Sie die API in Playground aus, um die Antwort zu prüfen.
Mehr entdecken
| API | Preis | Antwort |
|---|---|---|
FRED categoryDiese API FRED | $0.00001 pro Aufruf | JSON |
FRED | $0.00001 pro Aufruf | JSON |
FRED | $0.00001 pro Aufruf | JSON |
FRED | $0.00001 pro Aufruf | JSON |
FRED | $0.00001 pro Aufruf | JSON |
FRED | $0.00001 pro Aufruf | JSON |
Fragen
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.
$0.00001 pro Aufruf, abgerechnet von Ihrem SandBase-Guthaben. Es werden nur die von Ihnen getätigten Aufrufe berechnet; es gibt kein Abo.
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.
Eine JSON-Antwort, die in derselben HTTP-Anfrage zurückgegeben wird (synchron). Die README auf dieser Seite enthält eine Beispielantwort.
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.