Pricing
from $10.00 / 1,000 results
Threads Post Scraper - Video url included
Given a threads.com post URL, extracts the direct CDN URL of the post's video, and of course relevant post info
Pricing
from $10.00 / 1,000 results
Rating
5.0
(1)
Developer
Actor stats
0
Bookmarked
3
Total users
2
Monthly active users
18 hours ago
Last modified
Categories
Share
Threads Video Scraper
Extracts direct video URLs and post metadata from Threads post URLs.
Auth
The scraper can run unauthenticated for public posts. For posts that Threads only serves to a logged-in session, use one of these auth methods.
Local CLI profile login
This only works for local CLI runs. Apify actors cannot run an interactive login flow.
Run once with a persistent browser profile and a visible browser:
$uv run python main.py --login --user-data-dir .threads-profile
Log in to Threads in the opened browser, then press Enter in the terminal.
Later runs with the same THREADS_USER_DATA_DIR reuse that session:
$THREADS_USER_DATA_DIR=.threads-profile uv run python main.py --print-only 'https://www.threads.com/@user/post/POST_ID'
You can also pass the profile path directly:
$uv run python main.py --user-data-dir .threads-profile --print-only 'https://www.threads.com/@user/post/POST_ID'
Cookies
For local CLI runs, provide cookies with THREADS_COOKIES or --cookies.
The value can be either a raw Cookie header:
$THREADS_COOKIES='sessionid=...; csrftoken=...; ds_user_id=...' uv run python main.py --print-only 'https://www.threads.com/@user/post/POST_ID'
or a JSON cookie export array:
[{"name":"sessionid","value":"...","domain":".threads.com","path":"/","secure":true}]
For Apify, cookies are not part of input_schema.json. The actor reads the
secret user_cookies environment variable instead. .actor/actor.json maps
that variable to the local Apify CLI secret @threadsCookies, which is uploaded
as an encrypted platform secret during apify push.
The Hermes daily deploy job refreshes threadsCookies from a persistent local
Chromium profile before running apify run --purge and apify push --force.
Initialize or repair that profile manually when it is logged out:
$uv run python main.py --login --user-data-dir .threads-profile
After login, the cron script extracts a fresh Cookie header from
.threads-profile, updates the local Apify secret, tests locally, and deploys:
$~/.hermes/profiles/apify-mgr/scripts/refresh_threads_scraper.sh
Do not use the local --login flow inside actor runs; it is only for preparing
the persistent local profile used by the cron job. Do not commit cookies or
profile directories.
