Skip to main content

langchain-transcriptfetch

A LangChain document loader for TranscriptFetch: transcripts of YouTube, TikTok and Instagram videos, from a single link to whole channels, playlists and searches, split server-side into embedding-sized chunks with a link to the moment each one starts.

pip install -U langchain-transcriptfetch
export TRANSCRIPTFETCH_API_KEY="tf_live_..."   # free key: https://transcriptfetch.com

Load a few videos

from langchain_transcriptfetch import TranscriptFetchLoader

docs = TranscriptFetchLoader([
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://www.tiktok.com/@user/video/7428000000000000000",
]).load()

One Document per video. metadata holds source (the video URL), title, channel, platform, duration, language and transcript_source (captions or audio).

A whole channel, chunked for RAG

docs = TranscriptFetchLoader(channel="@3blue1brown", max_videos=20, chunks=True).load()

docs[0].metadata
# {'source': 'https://www.youtube.com/watch?v=aircAruvnKk&t=4s',
#  'video_url': 'https://www.youtube.com/watch?v=aircAruvnKk',
#  'chunk_index': 0, 'start': 4.22, 'end': 114.23, 'tokens': 400,
#  'title': 'But what is a neural network? | Deep learning chapter 1', ...}

With chunks=True the transcript is split by the API between caption lines (never mid-word), with a small overlap, so you can skip the text splitter. source links to the exact moment, which makes citations in answers clickable. Tune the size with chunk_tokens (100 to 2000, default 500) and chunk_overlap (0 to 200, default 50).

from langchain_core.vectorstores import InMemoryVectorStore
from langchain_openai import OpenAIEmbeddings

store = InMemoryVectorStore.from_documents(docs, OpenAIEmbeddings())
hits = store.similarity_search("what does a neuron hold?", k=3)
for h in hits:
    print(h.metadata["source"], h.page_content[:80])

Sources

Pass exactly one:

Argument What it loads
videos A URL or ID, or a list: YouTube, TikTok, Instagram, or a direct audio or video file URL
channel A YouTube channel (@handle, URL or ID), or a TikTok or Instagram profile URL
playlist A YouTube or TikTok playlist
search A keyword search; YouTube unless search_platform="tiktok" or "instagram"

Listings are capped at max_videos (default 25).

Options

  • mode="auto" (default) reads captions and transcribes the audio when a video has none, which most TikToks and Reels need. mode="captions" never transcribes, so captionless videos are skipped and cost nothing.
  • wait_for_audio=True (default) waits for audio transcriptions to finish (audio_timeout, default 900 seconds each).
  • continue_on_failure=True (default) logs and skips a video that fails instead of raising.
  • api_key and base_url override the environment.

lazy_load() streams Documents as they arrive. Transcripts are fetched 50 at a time.

Billing

A transcript or a listing page costs 1 credit, audio transcription 1 credit per started 5 minutes of audio, and failed requests are free. Every account gets 50 free credits a month, no card needed. See pricing.

License

MIT

Metadata

Release files for langchain-transcriptfetch 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-transcriptfetch 0.1.0
File Size Uploaded Provenance
langchain_transcriptfetch-0.1.0.tar.gz 8.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-transcriptfetch 0.1.0
File Interpreter ABI Platform
langchain_transcriptfetch-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / langchain_transcriptfetch-0.1.0.tar.gz

Download URL langchain_transcriptfetch-0.1.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
170b31823af93eb5155c18936fb180f08d75732881bfcfe9775f0ad2e723f239
BLAKE2b-256 checksum
How to use checksums
15a5e54494f1176be4a2b8c0c7c7440b21fef20d64ac7f8210cc3be7c7cb2a08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / langchain_transcriptfetch-0.1.0-py3-none-any.whl

Download URL langchain_transcriptfetch-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
638de64fbbe12bc9ea74e84dbf4b0adfe3b87e4445bcf198d8b3881f3053fcf0
BLAKE2b-256 checksum
How to use checksums
0e278d28b24ac48cf84269ae62227e3ef4a49d8cff00c789304854c9ffb1d252
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Security for langchain-transcriptfetch 0.1.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_transcriptfetch-0.1.0.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 Oct 28, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page