Koleksiyon
GET/v1/cosmos/cluster1 kredi
Bir Cosmos koleksiyonunu döndürür: ad, açıklama, kapak görseli, gönderi ve takipçi sayıları, sahibi ve alt koleksiyonları.
01Sorgu parametreleri
| Ad | Tür | Açıklama |
|---|---|---|
| urlzorunlu | string | Koleksiyon URL'si, örneğin `https://www.cosmos.so/design/the-best-band-posters`. |
02İstek
curl "https://api.scrapesocial.ai/v1/cosmos/cluster?url=https%3A%2F%2Fwww.cosmos.so%2Fdesign%2Fthe-best-band-posters" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Yanıtlar
API'nin gerçek yanıtları. Listeler 2 öğeye kısaltılmıştır.
GET /v1/cosmos/cluster?url=https%3A%2F%2Fwww.cosmos.so%2Fdesign%2Fthe-best-band-posters
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"id": 1632840802,
"name": "the best band posters",
"slug": "the-best-band-posters",
"description": "have you seen one of these in a room before?",
"url": "https://www.cosmos.so/design/the-best-band-posters",
"cover_image_url": "https://cdn.cosmos.so/images/b3964bde-a6d7-418d-91a6-09b1b7b6b9aa?rect=0,0,736,736",
"post_count": 46,
"follower_count": 1156,
"owner": {
"id": 234172146,
"username": "design",
"full_name": "Design",
"avatar_url": "https://cdn.cosmos.so/e39a4934-53ae-4536-95a3-18ccd4d052a0"
},
"subcollections": []
}Tüm uç noktalarda ortak
Her rota bunları döndürebilir: eksik ya da hatalı anahtar, biten kredi, yanıt vermeyen platform ya da bizim tarafımızdaki bir hata. Hiçbiri kredi harcamaz.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}04Notlar
Koleksiyon alanları yanıtın en üst seviyesindedir; alt koleksiyonlar `subcollections` listesindedir. Bilinmeyen bir koleksiyon ücretsiz 404 döner; Cosmos koleksiyonu olmayan bir URL ücretsiz 400 döner.
05Hatalar ve krediler
Her hatada success: false ve gerçek bir HTTP durum kodu döner; kredi düşmez.
400missing_parameter
Zorunlu bir parametre eksik veya geçersiz.
403private_account
Hesap gizli ya da yaş kısıtlamalı.
404not_found
Böyle bir hesap yok.
503upstream_error
Platform şu an cevap vermiyor; tekrar deneyin.