ByCrawl API
統一的社群媒體資料 API,支援 6 個平台:Threads、Facebook、X/Twitter、Reddit、TikTok 和 LinkedIn。
什麼是 ByCrawl?
ByCrawl 提供單一、一致的 API,可從多個社群媒體平台取得貼文、使用者資料、動態消息和搜尋結果。無需分別處理各平台的 API,只需一個統一介面即可完成。
支援平台
| 平台 | 貼文 | 使用者 | 搜尋 | 動態 |
|---|---|---|---|---|
| Threads | Yes | Yes | Yes | Yes |
| Yes | Yes | Yes | — | |
| X / Twitter | Yes | Yes | Yes | — |
| Yes | Yes | Yes | — | |
| TikTok | Yes | Yes | — | Categories |
| Limited | Limited | Jobs | Companies |
API 位址
https://api.bycrawl.com官方 Python SDK
安裝官方 SDK,享受型別完整、Pythonic 風格的開發體驗,內建自動分頁、重試邏輯及非同步支援:
pip install bycrawlfrom bycrawl import ByCrawl
client = ByCrawl(api_key="sk_byc_xxx")
user = client.threads.get_user("zuck")
print(user.data.follower_count)完整說明請參閱 Python SDK 文件。
認證
所有資料端點皆需透過 x-api-key 標頭傳遞 API 金鑰:
cURL
curl -H "x-api-key: sk_byc_xxx" https://api.bycrawl.com/threads/users/zuck快速範例
cURL
# Get a Threads user profile
curl -H "x-api-key: sk_byc_xxx" \
https://api.bycrawl.com/threads/users/zuck
# Search X/Twitter posts
curl -H "x-api-key: sk_byc_xxx" \
"https://api.bycrawl.com/x/posts/search?q=bitcoin&count=5"
# Get a Reddit subreddit
curl -H "x-api-key: sk_byc_xxx" \
https://api.bycrawl.com/reddit/subreddits/programming