Skip to main content

yt-dlp-threads

A yt-dlp extractor plugin for Threads (threads.com / threads.net).

yt-dlp has no built-in Threads extractor — support has been requested for years without a merged implementation (#7523, #10133, #12021) — and Threads serves anonymous clients a JavaScript login wall with no media in the HTML.

How it works

Meta server-renders the full post — including the CDN media URLs — for link-preview crawlers. This plugin fetches the post page with a Googlebot User-Agent to bypass the login wall, then extracts the progressive (muxed) mp4 URL(s) from the embedded JSON. Handles canonical @user/post/<id> links, /share/<code>/ short links, multi-video (carousel) posts, and posts whose video is embedded rather than uploaded: a text post with a linked Instagram reel, a repost, or a quote of a video post.

Caveat: this bypass is inherently fragile. If Meta stops serving crawlers the full payload or changes the embedded JSON keys, extraction will break. There is no cookie/auth support — only publicly viewable posts work.

Install

Requires yt-dlp with plugin support (2023.01.02+) and Python 3.10+.

As a pip package (installs into the same environment as yt-dlp):

pip install -U yt-dlp-threads
# or, if yt-dlp is a uv/pipx tool:
uv tool install yt-dlp --with yt-dlp-threads
pipx inject yt-dlp yt-dlp-threads

As a manual plugin (no install): drop the yt_dlp_plugins folder into a yt-dlp plugin directory, e.g.

mkdir -p ~/.config/yt-dlp/plugins/yt-dlp-threads
cp -r yt_dlp_plugins ~/.config/yt-dlp/plugins/yt-dlp-threads/

Usage

yt-dlp "https://www.threads.com/@someone/post/ABC123"
yt-dlp -F "https://www.threads.com/share/xxxxxxxx/"   # list formats (hd/sd)

Verify it loaded: yt-dlp --verbose <url> prints [debug] Extractor Plugins: ThreadsIE.

Notes

  • A Threads page embeds many posts (thread items, replies, recommendations). The extractor selects the one whose shortcode matches your URL; if that post isn't in the page data (deleted, private, login-gated) it raises an error rather than returning some other post's video.
  • duration is decoded from the CDN URL's efg parameter — Threads posts have no video_duration field.
  • Embedded media: when a post has no video of its own, the extractor tries, in order, a linked Instagram reel (text_post_app_info.linked_inline_media), a reposted post, then a quoted post. For a linked reel or a quote, the metadata (id, author, caption) is the Threads post's; for a repost it is the original post's. A line in the output names which one was downloaded.
  • Image-only and text-only posts are not supported (video only).

Development

python -m unittest discover -s tests -v   # offline tests, no network
ruff check .   # rule set is pinned in pyproject.toml; CI pins the ruff version

License

Unlicense (public domain).

Metadata

Release files for yt-dlp-threads 0.2.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 yt-dlp-threads 0.2.0
File Size Uploaded Provenance Actions
yt_dlp_threads-0.2.0.tar.gz 14.0 kB With provenance Details for yt_dlp_threads-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yt-dlp-threads 0.2.0
File Interpreter ABI Platform Actions
yt_dlp_threads-0.2.0-py3-none-any.whl Python 3 none any Details for yt_dlp_threads-0.2.0-py3-none-any.whl

Total release size: 23.2 kB

Release files / yt_dlp_threads-0.2.0.tar.gz

Download URL yt_dlp_threads-0.2.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1a62bcf2fc85da67e002a819c674ea77c473caea295e8a2f65edc87fbed9c72a
BLAKE2b-256 checksum
How to use checksums
e8c6cb9d6f134aac78fc15ac67085c7540798026c257fc4b30ec8d5154d1a592
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 22, 2026.

Transparency log

Release files / yt_dlp_threads-0.2.0-py3-none-any.whl

Download URL yt_dlp_threads-0.2.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b63049851c0947440ba82b49c78fe3982e0139be77fd5a0bbe1dc44abe84c66a
BLAKE2b-256 checksum
How to use checksums
2b357c7042d66c3b5293d06c53ad02afd1c4a122900b334e355dc15b47ead11f
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 22, 2026.

Transparency log

Security for yt-dlp-threads 0.2.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 yt_dlp_threads-0.2.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 22, 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.2.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