Builds
xthread-agent: One X Link In, a Full Thread With Media and a JSON Manifest Out (No API Key)
xthread-agent turns one public X status URL into a reconstructed thread, downloaded media, and a schema-checked JSON manifest — no login or API key.

Last updated: November 20, 2026 · 6-minute read
One public X link goes in. What comes out is the whole thread — every post in order, authors, timestamps, quoted posts — plus every photo and video as files on disk, plus a threadmanifest.json that maps all of it. xthread-agent needs no login, no API key, and no browser, and it runs on the Python standard library alone. It is the second of my harvester builds, after igagent did the same job for Instagram.
The design problem is worth stating plainly, because it shaped every choice below. X guards its discovery APIs behind authentication, and the unofficial routes around that wall keep dying. A harvester built on one surviving route is a harvester with an expiry date — so this one is built to degrade honestly instead of failing silently.
Why the Obvious Routes Are Dead
The repo's endpoint matrix is the autopsy, checked endpoint by endpoint. As of the project's last full re-verification on September 24, 2026:
The pattern in that table is the architecture: X's authentication wall guards discovery, while its media CDN serves bytes to anyone holding a resolved URL. So the tool never touches x.com at all. It reads three public surfaces — an unrolling service for thread candidates, open link-decoder workers for per-tweet JSON, and the twimg CDN for media bytes.
The Pipeline, Stage by Stage
Normalize and validate
Any of 24 accepted URL forms — x.com or twitter.com, mobile and www hosts, /photo and /video suffixes, bare status IDs, t.co shortlinks expanded one hop — becomes one canonical status ID. Ten malformed forms are rejected with stable error codes instead of guesses.
Walk, then decode — with fallbacks for both
The walker reads the thread page from UnrollNow, with ThreadReaderApp as a fallback slot, and collects candidate post IDs, capped at 50. Each candidate is then decoded through api.fxtwitter.com, with api.vxtwitter.com as the fallback decoder: text, author, metrics, timestamps, media lists. Both stages are dual-homed because both stages depend on free third-party services that owe nobody uptime.
Reconstruct the real chain
This stage exists because of a bug the first versions shipped. UnrollNow pages embed recommendations — same-author posts that sit next to the thread but do not reply to it. Page order is not membership. So the walker output is treated strictly as candidates, and the true self-reply chain is rebuilt from each post's replyingtostatus field, walking up to the thread start and down through replies. Version 2 harvested recommendations as thread members; version 3 does not.
Download and deliver
Media comes from video.twimg.com and pbs.twimg.com only — an HTTPS host allowlist — streamed, checked against Content-Length, and written atomically (a .part file renamed on completion), so a truncated transfer cannot corrupt the output folder. Videos take the best mp4 variant; when the primary URL is HLS-only, the decoder's formats[] list usually still carries an mp4. The deliverable is the envelope: threadmanifest.json, schema version 3.0, validated against a bundled draft-07 JSON Schema, with a status of ok, partial, or empty and every degradation named in errors[] with a stable code.
Built for Agents to Operate
The contract is three commands: run with --json --quiet, read the manifest, check the exit code (0 = at least one post harvested, 1 = nothing, 2 = usage error). Logs stay on stderr; results stay on stdout, so pipes never mix the two. The repo ships agent.md as a complete operating manual — an agent reading only that file can run the tool end to end — and an MCP server wraps the same pipeline for agent hosts:
The MCP server reimplements nothing: each call shells out to the CLI with a hard timeout, so the CLI contract stays the single source of truth. Install is pip install xthread-agent (version 3.2.0, live on PyPI since September 27, 2026) or the zero-install route — copy the single file and run it. The PyPI package and the single file are byte-identical, enforced by a drift-guard test. 135 offline tests run in about a second against synthetic fixtures; CI covers Python 3.9 through 3.13 and deliberately never probes live endpoints.
TL;DR
- xthread-agent: one public X status URL in, reconstructed thread + media files + schema-checked JSON manifest out
- No login, no cookies, no API keys, no browser — it reads public unroller, decoder, and CDN surfaces and never touches x.com
- Dual fallbacks at the fragile stages: two walker slots, two decoder slots
- Chain reconstruction from replyingtostatus filters out the recommendations unroller pages embed
- stdlib-only Python 3.9+, one file or a PyPI install (3.2.0), plus a 4-tool MCP server
- Failure is a reported state, not a surprise: ok / partial / empty, stable error codes, fail-closed on protected content
Where It Falls Short
The repo's own limitations section is unusually direct, and this post keeps it that way.
- It stands on free third-party services. If UnrollNow or FixTweet gate datacenter IPs or shut down, harvests degrade to root-only or empty. Fallbacks reduce the risk; they do not remove it. Endpoint statuses were last fully re-verified on September 24, 2026 — services can have changed since.
- Linear self-reply chains only. Branching reply trees get the first-seen branch; cross-author reply trees are out of scope by design.
- Some videos stay undownloaded. Genuinely HLS-only videos are reported with downloadable: false and a reason — honest, but still a gap in the output folder.
- The platform question, plainly. X's Terms of Service restrict automated access to the service, and reaching public content through third-party surfaces is not access X officially supports or guarantees. The repo's own legal section says the same: using the tool is the operator's responsibility under X's terms, the third parties' terms, and copyright law; harvested posts and media belong to their authors, and nothing in the tool grants a licence to reuse them. For guaranteed, sanctioned access, the official X API is the route — it is also the route that charges and rate-limits, which is the entire reason tools like this exist.
- Nobody is using it yet, measurably. The repo sits at 0 stars as of November 7, 2026. It is a finished, tested build — and an unproven one in the only market sense that matters.
The Verdict
xthread-agent is a bet on a specific shape: when every door into a platform is unofficial, build for the doors closing. Dual slots, candidate filtering, atomic verified downloads, and a manifest that confesses its own degradations are what that bet looks like in code.
If you archive threads for research or feed them to an agent pipeline, the tool does the job today with nothing to sign up for. If your use case needs contractual certainty, it is the wrong tool and says so in its own README — take the official API and pay for the guarantee.
The sibling harvester is in the igagent post, and the rest of the family is on the projects page and in the blog archive.
---
Not affiliated with X Corp. Sources: xthread-agent GitHub repository, endpoint matrix, xthread-agent on PyPI, live demo site.