category_idinteger
The id for a category. integer, default: 0 (root category)
Varsayılan: 0
https://api.sandbase.ai/v1/api/fred/categorycategory from FRED. Returns the official FRED API response unchanged.
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
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.
Geliştirmeye başlayın
Birleşik kimlik doğrulama ve kullanım takibi sunan Platform API uç noktası.
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
}'SandBase API anahtarınızı sunucu ortamınıza ayarlayın. İstekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarınızı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın.
category_idintegerThe id for a category. integer, default: 0 (root category)
Varsayılan: 0
file_typestringResponse format. Only json is supported.
Varsayılan: "json"
Olası değerler: json
Bu API için kaydedilmiş örnek yanıt; görüntülerken canlı istek yapılmaz.
Yayınlanmış bir kaydedilmiş yanıt yok. Yanıtını incelemek için API'yi Playground'da çalıştırın.
Daha fazlasını keşfedin
| API | Fiyat | Yanıt |
|---|---|---|
FRED categoryBu API FRED | $0.00001 çağrı başına | JSON |
FRED | $0.00001 çağrı başına | JSON |
FRED | $0.00001 çağrı başına | JSON |
FRED | $0.00001 çağrı başına | JSON |
FRED | $0.00001 çağrı başına | JSON |
FRED | $0.00001 çağrı başına | JSON |
Sorular
SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/fred/category adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
çağrı başına $0.00001, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.
Gerekli parametre yoktur. İsteğe bağlı: category_id (integer) ve file_type (json arasından biri). Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.
Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.
Hayır. FRED category, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. FRED API erişimi için ayrıca başvuru yapmanız gerekmez.