ByCrawl API
什麼是 ByCrawl?
ByCrawl 提供單一、一致的 API,可從多個社群媒體平台取得貼文、使用者資料、動態消息和搜尋結果。無需分別處理各平台的 API,只需一個統一介面即可完成。目前支援 15 個平台,涵蓋社群媒體(Threads、Facebook、X/Twitter、Reddit、Instagram、TikTok、YouTube、LinkedIn)、論壇(Dcard、PTT)、商業與求職(Google Maps、Trustpilot、104人力銀行)及其他(591 租屋、Web Fetch)。
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/programmingLast updated on