In short.
x-tweet-fetcher is a Python tool for developers and AI agents that retrieves X content, but reliable collection depends on external services and several implementation limits. Version 3.1.0 includes single-post retrieval, timelines, search, replies, Lists, article extraction, mentions monitoring and SQLite archiving. The captured code qualifies the documentation's broad claims: single-post output uses a different schema, browser fallback still depends on Nitter for several modes, and the Playwright driver returns a different text format from the one its parsers expect. Current availability, completeness and performance are unknown; nothing was executed for this report.
Researched and written by an AI model and checked by a second AI model. How it works
The scope is the complete selected default-branch repository snapshot at e1a668d2ae2d19f8c628ad437b7a4223b3c24b94, captured on 2026-11-14. It includes packaging, source modules, the compatibility script, documentation, SKILL.md, fixtures, tests, CI, development records and the MIT LICENSE notice. Original source acquisition is through [https://github.com/ythx-101/x-tweet-fetcher]; captured file addresses identify the exact revision. Linked pages and external projects are excluded. Static code findings do not establish successful installation, live backend availability, browser compatibility, collection completeness, performance or production readiness. Those behaviors were not executed or independently verified.
The overview
Identity
x-tweet-fetcher, also called xtf, is an MIT-licensed Python command-line application and importable library maintained in ythx-101/x-tweet-fetcher [https://github.com/ythx-101/x-tweet-fetcher]. The captured package declares version 3.1.0 and Python 3.10 or newer. It supplies retrieved content to scripts and AI agents; any AI summarization or interpretation requires a separate system.
Practical assessment
Its clearest fit is occasional retrieval for an agent or script, followed by a small local archive. Single posts use FxTwitter without an X API key, while the library centralizes routing, parsing and many error cases.
The broader promise of interchangeable backends needs qualification. Output shapes differ between single-post and list modes, the optional Playwright driver appears to return plain page text rather than the snapshot format the browser parsers expect, and an empty parse does not trigger fallback. Treat retrieved material as potentially incomplete rather than as an exhaustive record of X activity.
Who it suits
Developers can import Router or call xtf and parse its JSON. Agents that can execute command-line tools can use the included SKILL.md as a command reference. Beginners can start with a single post, but timelines and search require understanding how to configure a separate Nitter service. Experienced developers gain configurable backends and local storage, while retaining responsibility for schema handling and data validation.
Capabilities
Implemented modes retrieve single posts, profiles, user timelines, search results, replies, Lists and standalone X Articles. Mentions monitoring establishes a local baseline and subsequently reports newly encountered URLs. Single-post responses can also reconstruct article content when FxTwitter supplies article blocks.
The ledger archives single posts, timelines, searches, Lists and returned reply records. It supports offline text substring queries and aggregate statistics. Standalone article, profile and monitor modes do not invoke archiving. Collection is bounded: Nitter search and Lists stop after at most ten pages, while browser timelines allow six pages and browser Lists ten.
Using it
Requirements
The core package declares no runtime dependencies beyond Python's standard library. Network retrieval still requires reachable upstream services. Timelines, search and direct-HTTP replies or Lists need a working Nitter instance. The README describes a Nitter configuration file and separately running Redis or Valkey; complete deployment requirements belong to the external Nitter project and are not established here.
Browser modes use a running Camofox service, defaulting to localhost port 9377, or optional Playwright with an available Chromium executable. Full standalone X Article text is documented as requiring an authenticated X browser session. The captured Playwright implementation creates fresh contexts and shows no persistent-login or session-import configuration.
How it works
Single posts use FxTwitter. Profiles try FxTwitter and then Nitter. Automatic timeline and reply routing tries Nitter before the browser, while Lists explicitly use that order. Standalone Articles use the browser. Although search can enter the browser fallback chain, BrowserBackend does not implement search. Mentions monitoring chooses its path separately and does not switch to the browser after a Nitter search failure.
Direct HTTP requests retry transient failures with exponential backoff. Routing responds to specified exceptions, not empty results. Timeline, reply and List CLI calls also attempt to fill zero view counts through up to fifty extra FxTwitter requests; views_supplemented indicates that this step was attempted, not that every count was obtained. Requests therefore leave the local machine even when results are archived locally.
Setup
The captured README says the package is not published on PyPI. Obtain the repository, then install from its directory with pip install . to expose the xtf command. The snapshot described here is [https://github.com/ythx-101/x-tweet-fetcher/tree/e1a668d2ae2d19f8c628ad437b7a4223b3c24b94]. The compatibility entry point python3 scripts/fetch_tweet.py uses the same CLI implementation.
Set XTF_NITTER to a reachable Nitter base URL; its default is [http://127.0.0.1:8788], and comma-separated instances enable failover. Use --lang en for English messages because Chinese is the default. The documented Playwright extra is installed from the clone with pip install ".[playwright]"; browser binaries and an authenticated article session are additional requirements whose working setup is not demonstrated by these instructions.
Example use
For a first request, use xtf --url POST_URL --lang en --pretty, replacing POST_URL with an existing X post address. The CLI constructs an envelope containing the requested URL, username and post ID, followed by either a tweet object or error information. No particular returned content or availability is established here.
After configuring Nitter, xtf --user HANDLE --limit 20 --ledger ./tweets.db --lang en requests a small timeline and archives eligible records; replace HANDLE with the account name. Then xtf --ledger ./tweets.db --query "parser" searches stored text, and xtf --ledger ./tweets.db --stats returns archive statistics. Inspect the ledger counts and ledger_error field separately from retrieval success.
Assessment & evidence
Limitations
The advertised unified schema has exceptions. Single-post dictionaries use author as a display name, screen_name for the handle, replies_count and a structured media object. Timeline and search Tweet objects instead use author as the handle, author_name, replies and a list of media URLs. Direct Nitter conversion also omits quote and repost attribution supported by the browser model.
The Playwright driver returns ordinary body text, or HTML when text extraction raises an error, while browser parsers expect structured snapshot lines identifying links, headings and text. This is an apparent format mismatch; usable Playwright collection is not demonstrated. The driver also launches Chromium with its sandbox disabled. Browser timelines, replies and Lists still visit Nitter, and their URLs force HTTPS even when the configured instance uses HTTP.
Reply structure needs particular care. A fixture test explicitly preserves a browser-parser quirk that places the next reply's text inside the preceding reply's thread_replies. That parser also excludes the original author's handle. Direct Nitter parsing has separate support for author self-replies, so thread coverage varies by backend.
Article completeness is inferred from text length: is_partial is true below 100 characters. Longer text is not proof of a complete article. Similarly, a successful empty parse does not cause another backend attempt and does not prove that no posts or replies exist.
Archiving ignores existing tweet IDs rather than refreshing their content or engagement figures, and skips records without a usable ID or nonempty text. Timeline, search and List Tweet objects omit created_at and language, leaving corresponding archive fields and statistics incomplete. raw_json stores the supplied record, which may already be normalized, rather than necessarily preserving the upstream response.
Error handling is not uniformly JSON-based: monitor failures and several argument-validation failures go to stderr. Monitor exit code 1 means new mentions were found, whereas ordinary fetch modes use it for errors. The CLI accepts --timeout without forwarding it to the backend configuration, and Lists use their explicit backend chain despite the general --backend setting.
Why these trade-offs matter
The useful combination is retrieval adapters, a scriptable interface and local deduplication in one package. This reduces integration work for small reading tasks. However, shared field names do not guarantee shared information, retries do not establish completeness, and duplicate suppression does not maintain a current mirror. These design choices support occasional collection more clearly than exhaustive research datasets or dependable production monitoring.
Alternatives
The README positions the official X API as the alternative for write access or an official production relationship, and account-based scrapers as another approach to larger collection. Their current prices, quotas, support commitments and terms are unknown here. For narrower needs, using FxTwitter or Nitter directly would remove xtf's routing and ledger convenience while requiring integration with those services' own interfaces. This is an architectural comparison, not a performance comparison.
Evidence and confidence
The repository contains fixture-based parser tests, mocked routing and HTTP tests, CLI subprocess tests and SQLite tests. CI is configured to run linting and pytest on Python 3.10 and 3.12. These files establish intended assertions and automation, not a current passing CI result. Fixed fixtures cannot establish compatibility with upstream pages that have since changed.
A repository integration note dated 2026-08-09 reports five archived posts, cross-backend duplicate detection, keyword queries, statistics and duplicate suppression on a repeated fetch. Those are author-reported historical outcomes for a narrow Nitter/FxTwitter path. No installation, code, tests, browser session or network request was executed for this report; current end-to-end behavior and performance remain unassessed.
Access & freshness
Costs
The MIT licence permits use of the software without charge. Running it can still require hosting, storage, bandwidth and browser resources, plus any separate agent or model service used to process results. These operating costs are unknown. The repository establishes neither guaranteed free upstream access nor service quotas, throughput, latency or a cost per retrieved post.
Licence and content rights
The repository's MIT licence, copyright 2026 ythx-101, permits use, modification, redistribution and sale of the software and associated documentation. Copies or substantial portions must retain the copyright and permission notice. The software is supplied without warranty.
That software licence does not establish permission to republish fetched X posts, media, articles or linked documents. The repository includes third-party post content in fixtures, but separate permissions for that content are not established. X access terms and the terms of external backend services were not assessed.
Version and freshness
The repository snapshot was captured on 2026-11-14 at 15:56:23.339 UTC and identifies commit e1a668d2ae2d19f8c628ad437b7a4223b3c24b94. VERSION, package metadata and the Python export declare 3.1.0. The changelog dates that release to 2026-08-09 and also lists unreleased changes to HTTP Lists, author self-replies, messages and documentation. Consequently, the version number alone does not identify every captured change. Upstream service availability and changes after this snapshot are unknown.
Before adopting it
Start with the retrieval mode your work actually needs and compare a few returned records with their source posts, including replies, quotes and media. Handle single-post and list schemas separately. For collection modes, distinguish an empty result from an established absence of content, and inspect backend metadata and errors.
If archiving matters, check inserted, duplicate and skipped counts, ledger_error, timestamps and language coverage. Require concrete browser output before depending on Playwright or full Article extraction. Monitoring integrations must interpret exit codes by mode. Preserve the exact source revision when building an integration so later upstream or parser changes can be distinguished.
