Skip to main content

langchain-importly

A LangChain document loader for video and audio links. Give it links from YouTube, TikTok, X, Instagram, a podcast or 1,000+ other sites, and get transcript Documents with the title, duration, source URL and per-chunk timestamps.

It runs on the Importly API, so it keeps working once your app is deployed: from servers, serverless functions, Hugging Face Spaces and agent sandboxes, where video sites usually block downloads. Free to try, no card required.

Install

pip install -U langchain-importly
export IMPORTLY_API_KEY=...   # https://www.importly.io/login?mode=signup&utm_source=langchain&utm_medium=package&utm_campaign=guerrilla-2026-11

Use

from langchain_importly import ImportlyLoader

loader = ImportlyLoader(
    [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://www.tiktok.com/@scout2015/video/6718335390845095173",
    ],
    transcript_format="chunks",   # "text" (default), "chunks" or "segments"
    chunk_size_seconds=60,
)
docs = loader.load()             # or: await loader.aload(), loader.lazy_load()

docs[0].metadata
# {'source': 'https://www.youtube.com/watch?v=jNQXAC9IVRw', 'url': '...', 'job_id': '...',
#  'language': 'en', 'transcript_source': 'platform_captions', 'duration': 19.0,
#  'title': 'Me at the zoo', 'thumbnail': '...', 'chunk_index': 0,
#  'start_seconds': 1.2, 'end_seconds': 14.367, 'start_timestamp': '00:00:01', 'end_timestamp': '00:00:14'}

Then split, embed and store them like any other documents. With "chunks", every piece keeps its start and end time, so your app can cite or link to the moment an answer came from.

Options

Option Default What it does
transcript_format "text" One Document per link, per ~chunk_size_seconds window, or per caption segment
chunk_size_seconds 120 Window length for "chunks" (segments are never split)
language captions' default Two-letter code, e.g. "es"
provider None "importly" turns on speech-to-text for media without captions (billed per minute)
max_cost_dollars None Cap per link for speech-to-text
include_metadata True Adds title and thumbnail (one extra $0.003 call per link)
continue_on_failure False Log and skip links that fail (private, removed, no captions) instead of raising
max_concurrency 4 Links processed at once in aload / alazy_load
api_key IMPORTLY_API_KEY

By default transcripts come from the media's captions ($0.003 per link). For media without captions, the loader raises importly.TranscriptionProviderRequiredError with a price quote; set provider="importly" to transcribe the audio instead.

Need the file or full metadata too? The same key works with the importly SDK: Importly().import_media(url) returns a download link.

MIT licensed.

Metadata

Release files for langchain-importly 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-importly 0.1.0
File Size Uploaded Provenance Actions
langchain_importly-0.1.0.tar.gz 8.0 kB With provenance Details for langchain_importly-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 15.4 kB

Release files / langchain_importly-0.1.0.tar.gz

Download URL langchain_importly-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
181d6869c24774b3a9671e821d2ba65434ce44407705da9707470cf0d3eab83b
BLAKE2b-256 checksum
How to use checksums
d760526f1b929ce3d1ef11d49375c43e7a4509241d6d9ce70777f1fe66dd19dc
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 Nov 29, 2026.

Transparency log

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

Download URL langchain_importly-0.1.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd2a829f1d4dc275da5a2e1d8ecc0e7d06f2f10a81f9456a9966bdc9bac90c13
BLAKE2b-256 checksum
How to use checksums
ed025c0b083fdcb0139ccb7eacc941d7a2a05028c3178243c7bbbe3423c2a307
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 Nov 29, 2026.

Transparency log

Security for langchain-importly 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_importly-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 Nov 29, 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