Trawl Python SDK
The official Python SDK for the Trawl API — extract transcripts from YouTube, podcasts, TikTok, earnings calls, SEC filings, news, and academic papers.
Install
pip install trawl
Quick Start
from trawl import TrawlClient
client = TrawlClient(api_key="trawl_your_key")
# Search YouTube
results = client.search.youtube("machine learning tutorial", max_results=5)
for video in results.results:
print(f"{video.title} — {video.channel}")
# Extract a transcript
transcript = client.transcripts.extract("https://youtube.com/watch?v=dQw4w9WgXcQ")
print(f"{len(transcript.segments)} segments extracted")
# Preview without auth (free)
preview = client.transcripts.preview("https://youtube.com/watch?v=dQw4w9WgXcQ")
# Bulk download as ZIP
zip_bytes = client.bulk.download(["dQw4w9WgXcQ", "9bZkp7q19f0"], format="jsonl")
All Resources
client = TrawlClient(api_key="trawl_your_key")
# YouTube
client.search.youtube(query, max_results=10)
client.transcripts.extract(url, language=None)
client.transcripts.preview(url) # No auth needed
client.transcripts.download(id, format="txt")
client.bulk.download(video_ids, format="txt") # No auth needed
# Podcasts
client.search.podcasts(query, max_results=20)
client.podcasts.episodes(podcast_id)
client.podcasts.transcribe(audio_url)
# Earnings Calls
client.earnings.search("AAPL")
client.earnings.get_transcript("AAPL", 2026, 1)
client.earnings.get_chunks("AAPL", 2026, 1)
# SEC Filings
client.filings.search("AAPL", form_type="10-K")
# News (GDELT)
client.news.search("Federal Reserve", language="en")
client.news.get_article_text("https://example.com/article")
# Academic Papers
client.papers.search("transformer architecture")
client.papers.extract(arxiv_id="2301.08745")
# AI Analysis
client.ai.summarize(transcript_id)
client.ai.topics(transcript_id)
client.ai.entities(transcript_id)
client.ai.preview_summarize("Raw text to summarize") # No auth
# Jobs
client.jobs.get(job_id)
client.jobs.list()
Error Handling
from trawl.exceptions import (
TrawlError,
AuthenticationError, # 401
NotFoundError, # 404
RateLimitError, # 429
ValidationError, # 422
)
try:
transcript = client.transcripts.extract("invalid-url")
except ValidationError as e:
print(f"Bad request: {e}")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
except AuthenticationError:
print("Invalid API key")
Context Manager
with TrawlClient(api_key="trawl_your_key") as client:
results = client.search.youtube("python")
# client.close() called automatically
Requirements
- Python 3.10+
- httpx
Links
Metadata
Release files for trawl-sdk 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trawl_sdk-0.1.4.tar.gz | 10.2 kB | With provenance | Details for trawl_sdk-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trawl_sdk-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for trawl_sdk-0.1.4-py3-none-any.whl |
Total release size: 18.7 kB
Release files / trawl_sdk-0.1.4.tar.gz
| Download URL | trawl_sdk-0.1.4.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf983bdc9a389282f03d441fe2be29dd8dcf7c9d4d9c4a95a76d7c6540eb9ba2
|
|
BLAKE2b-256 checksum How to use checksums |
b53e4ed4ecbaeda873347279c2c88d06aa1300d6b27c0dca35706efccbff5be0
|
| 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 7, 2026.
Transparency logRelease files / trawl_sdk-0.1.4-py3-none-any.whl
| Download URL | trawl_sdk-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9151ed7da98e7a9289e3fd0bb746100bb3b6d40a4c611c6f4e6e5cf16770e057
|
|
BLAKE2b-256 checksum How to use checksums |
d9c4c8425843fb487cec2728fa543191fcfa63cfeb4fb343a9764fef6163ffb6
|
| 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 7, 2026.
Transparency logSecurity for trawl-sdk 0.1.4
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for trawl_sdk-0.1.4.tar.gz
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 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.