Skip to main content

threads-dlp

Python 3.9+ Termux License GitHub stars

threads-dlp is a command-line tool for downloading videos from publicly viewable Threads posts. It runs on Linux, macOS, Windows, and Android through Termux. It uses Python and HTTP requests; Chrome, Selenium, and a Threads account are not required.

Features

  • Accepts Threads post links on threads.com and threads.net, including /t/ and /share/ links
  • Finds the video attached to the requested post and selects its highest-resolution progressive MP4
  • Streams downloads to disk and displays progress in an interactive terminal
  • Creates the output folder when needed and avoids overwriting existing files
  • Removes incomplete downloads when a network or disk error occurs

Only public posts are supported. Private, deleted, age-restricted, or otherwise unavailable posts cannot be downloaded. The tool does not log in or accept account credentials.

Requirements

  • Python 3.9 or newer
  • An internet connection

Install

Install from a repository checkout:

git clone https://github.com/nanaelie/threads-dlp.git
cd threads-dlp
python -m pip install .

Termux on Android

Install Python in Termux, create an isolated environment, and install the package:

pkg update
pkg install python git
git clone https://github.com/nanaelie/threads-dlp.git
cd threads-dlp
python -m venv .venv
. .venv/bin/activate
python -m pip install .

To save into Android shared storage, grant Termux storage access once and choose the Downloads folder:

termux-setup-storage
threads-dlp --url "https://www.threads.com/@username/post/POST_ID" --output ~/storage/downloads/Threads

Termux storage access is optional. You can also save to a folder inside Termux's private files.

Usage

threads-dlp --url "https://www.threads.net/@username/post/POST_ID"

Choose an output folder with --output or -o:

threads-dlp --url "https://www.threads.com/t/POST_ID" --output "./videos"

The saved filename uses the post ID, for example POST_ID.mp4. If that file already exists, the tool uses the next available name, such as POST_ID-1.mp4.

Show the available options or installed version:

threads-dlp --help
threads-dlp --version

Troubleshooting

  • No public video was found: check that the link points to a post containing a video and that it opens without signing in.
  • The video source returned an error: video links can expire. Run the command again to extract a fresh link.
  • Permission denied: choose a folder Termux can write to. For Android shared storage, run termux-setup-storage and use ~/storage/downloads.
  • Threads changed its page: extraction relies on data embedded in Threads' public web pages. A change to that page format can require an update to this tool.

Project layout

threads-dlp/
├── README.md
├── CONTRIBUTING.md
├── LICENSE
├── pyproject.toml
├── requirements.txt
└── threads_dlp/
    ├── __init__.py
    ├── __version__.py
    ├── cli.py
    ├── downloader.py
    ├── errors.py
    ├── extractor.py
    ├── http_client.py
    ├── make_out_path.py
    └── models.py

License

This project is licensed under the Apache License 2.0. See LICENSE.

Metadata

Release files for threads-dlp 2.0.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 threads-dlp 2.0.0
File Size Uploaded Provenance Actions
threads_dlp-2.0.0.tar.gz 14.3 kB Without provenance Details for threads_dlp-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 29.1 kB

Release files / threads_dlp-2.0.0.tar.gz

Download URL threads_dlp-2.0.0.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a7db9e2164e1d6e45ae836205b35b6089ba2ac9e5928dba5220b02019d2a1fbe
BLAKE2b-256 checksum
How to use checksums
4bf4873388dcdd56e35bb2bbe04a5e4d54b1cfece4f87f41a2eef238e31a461b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / threads_dlp-2.0.0-py3-none-any.whl

Download URL threads_dlp-2.0.0-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1005f6f40346b69819031e08abccb2f1b51f2aff68c8d04ae744a6c9dd30218
BLAKE2b-256 checksum
How to use checksums
e0e659be9109b4185f479cb5a95d7e636295307b366d2b4da19c004df179b6da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for threads-dlp 2.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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