Install
pip install supacrawlxAuthenticate
Grab a key from your dashboard and pass it once when you create the client:
import os
from supacrawlx import Client
client = Client(api_key=os.environ["SUPACRAWLX_API_KEY"])Transcripts
# Auto-detects the platform from the URL
yt = client.youtube.transcript(url="https://youtu.be/dQw4w9WgXcQ")
tiktok = client.transcript(url="https://www.tiktok.com/@user/video/730...")Metadata, search, and channels
meta = client.metadata(url="https://youtu.be/dQw4w9WgXcQ")
results = client.youtube.search(query="vector databases", limit=25)
channel = client.youtube.channel(handle="@exampledev")Web extraction
page = client.web.scrape(url="https://example.com") # clean Markdown
sitemap = client.web.map(url="https://example.com") # all URLs
job = client.web.crawl(url="https://example.com", limit=200)Video analysis
summary = client.video.analyze(
url="https://youtu.be/your_video",
prompt="Summarize the key takeaways as bullet points.",
)Handle errors cleanly
Every failure raises a typed APIError with a status code and machine-readable code:
from supacrawlx import APIError
try:
client.youtube.transcript(url=bad_url)
except APIError as e:
print(e.status_code, e.code, e.message)Read credit usage straight from the response headers (X-Credits-Used,X-Credits-Remaining) to build cost dashboards without a second API call.
Production checklist
- Store your key in an environment variable or secret manager — never in source.
- Set a sensible
timeoutand retry idempotent reads on 429/5xx. - Cache transcripts and metadata; they rarely change.