快速開始
5 分鐘內開始使用 ByCrawl API。
1. 取得 API 金鑰
在 ByCrawl Dashboard 註冊帳號,並於 API Keys 頁面建立 API 金鑰。
您的金鑰格式如下:sk_byc_xxxxxxxxxxxx
2. 發送第一個請求
Python (SDK)
安裝官方 Python SDK:
pip install bycrawlfrom bycrawl import ByCrawl
client = ByCrawl(api_key="YOUR_API_KEY")
user = client.threads.get_user("zuck")
print(user.data.username, user.data.follower_count)回應:
{
"success": true,
"data": {
"id": "314216",
"username": "zuck",
"fullName": "Mark Zuckerberg",
"profilePic": "https://...",
"bio": "Building the future...",
"isVerified": true,
"followerCount": 3200000,
"followingCount": 450
}
}3. 探索 API
每個平台遵循相同的 URL 格式:
GET /{platform}/users/{username} # 使用者資料
GET /{platform}/users/{id}/posts # 使用者的貼文
GET /{platform}/posts/{id} # 單一貼文
GET /{platform}/posts/search?q=keyword # 搜尋貼文支援的平台:threads、facebook、x、reddit、tiktok、linkedin
回應格式
所有回應皆遵循一致的格式:
成功
{
"success": true,
"data": { ... }
}錯誤
{
"success": false,
"error": "Error message"
}速率限制
API 使用量依 API 金鑰追蹤。您可在帳單頁面 查看目前的使用狀況。
下一步
- 安裝 Python SDK,享受型別完整的 Pythonic 開發體驗
- 瀏覽 API 參考 查看詳細的端點文件
- 了解各平台特定功能
- 查看錯誤代碼以排除問題