ByCrawl Python SDK
The official Python SDK for the ByCrawl social media data API.
Supports Threads, Facebook, X (Twitter), Instagram, Reddit, LinkedIn, TikTok, YouTube, Dcard, Google Maps, and 104.
Installation
pip install bycrawl
Quick Start
from bycrawl import ByCrawl
client = ByCrawl(api_key="sk_byc_...")
# Get a Threads post
post = client.threads.get_post("DQt-ox3kdE4")
print(post.data.text)
print(post.data.stats.likes)
Platform Examples
Threads
# User profile
user = client.threads.get_user("zuck")
print(f"{user.data.username} — {user.data.follower_count} followers")
# Search posts
results = client.threads.search_posts("AI")
X (Twitter)
user = client.x.get_user("elonmusk")
tweet = client.x.get_post("1234567890")
# Auto-paginate all posts
for post in client.x.iter_user_posts("elonmusk"):
print(post.text)
user = client.instagram.get_user("instagram")
print(user.data.follower_count)
TikTok
video = client.tiktok.get_video("7123456789")
user = client.tiktok.get_user("khaby.lame")
# Browse trending
trending = client.tiktok.get_categories()
sub = client.reddit.get_subreddit("python")
posts = client.reddit.get_subreddit_posts("python", sort="hot")
company = client.linkedin.get_company("google")
jobs = client.linkedin.search_jobs(query="software engineer", location="Taiwan")
# Auto-paginate jobs
for job in client.linkedin.iter_search_jobs(query="data scientist"):
print(job.title, job.location)
YouTube
video = client.youtube.get_video("dQw4w9WgXcQ")
channel = client.youtube.get_channel("@mkbhd")
results = client.youtube.search("machine learning", count=5)
transcript = client.youtube.get_video_transcription("dQw4w9WgXcQ", language="en")
Dcard
forum = client.dcard.get_forum("trending")
posts = client.dcard.get_forum_posts("trending", limit=10, popular=True)
results = client.dcard.search_posts("台大", limit=10)
Google Maps
results = client.gmaps.search("coffee shops in Tokyo", language="en")
place = client.gmaps.get_place("Blue Bottle Coffee Tokyo")
page = client.facebook.get_user("NASA")
posts = client.facebook.get_user_posts("NASA")
104 Jobs
jobs = client.job104.search_jobs(q="Python工程師")
company = client.job104.get_company("company_id")
Async Support
import asyncio
from bycrawl import AsyncByCrawl
async def main():
async with AsyncByCrawl(api_key="sk_byc_...") as client:
post = await client.threads.get_post("DQt-ox3kdE4")
print(post.data.text)
asyncio.run(main())
Rate Limit & Credit Info
Every response includes rate limit and credit usage:
resp = client.threads.get_post("DQt-ox3kdE4")
print(resp.rate_limit.remaining) # requests left
print(resp.credit.remaining) # credits left
Error Handling
from bycrawl import ByCrawl, NotFoundError, RateLimitError
try:
client.threads.get_post("invalid")
except NotFoundError:
print("Post not found")
except RateLimitError as e:
print(f"Rate limited, retry after {e.retry_after}s")
Environment Variable
You can set your API key as an environment variable instead of passing it directly:
export BYCRAWL_API_KEY="sk_byc_..."
client = ByCrawl() # picks up from env
Links
Release files for bycrawl 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bycrawl-0.3.0.tar.gz | 63.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bycrawl-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.9 kB
Release files / bycrawl-0.3.0.tar.gz
| Download URL | bycrawl-0.3.0.tar.gz |
|---|---|
| Size | 63.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
067d19bfeebfbecc1bfd428cd44dcabd43abbd068d0f6bc2bdf32dbe528306e8
|
|
BLAKE2b-256 checksum How to use checksums |
4fec2009147269467c059b1ad9803eda196d67eca7d37d0b6373b8a11c5bfc12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.
Transparency logRelease files / bycrawl-0.3.0-py3-none-any.whl
| Download URL | bycrawl-0.3.0-py3-none-any.whl |
|---|---|
| Size | 29.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb68750fada5b90b986f9c67ca967c4f897c597c850d00e7150dc0f85f434132
|
|
BLAKE2b-256 checksum How to use checksums |
7ebf458ae41aa61268e35d9ed6848d8b918949492392a8a383ab99b09513753c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.
Transparency log