Utilities
Fetch article URLs and keep the clean body text
Article body text plus title, author, date, and language from a URL list.
overview
What trafilatura does
You have an article URL or a file of URLs, and the next node needs the body text, not the chrome. Set --url for one page or --urls-file for a list. The wrapper fetches HTML, runs Trafilatura, and writes articles.jsonl plus results.jsonl. Each row keeps title, author, date, language, and the cleaned body.
--min-chars drops extractions shorter than N characters. Default is 200, which can drop example.com. Set --min-chars 1 when you want a short public page. --max-chars truncates a long body. --concurrency and --timeout bound the fetch. --include-tables and --fail-empty are booleans; leave them disconnected unless you mean to send the flag.
trafilatura reads the HTML the worker can download. It does not render JavaScript and it does not bypass a login wall. Use browser-fetch when the page is empty without Chromium. Use rss-read when the source is a feed, not a page.
source github.com/adbar/trafilatura
use cases
Where trafilatura fits
Extract one article
Set --url and --min-chars 1 if the page is short. articles.jsonl holds title and body.
Extract a list of URLs
Pass --urls-file. --max-urls caps the batch.
Keep table text
Connect --include-tables only when you want table cells in the body.
Fail if nothing extracted
Connect --fail-empty when an empty articles.jsonl should fail the node.
reference
trafilatura inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| url | STRING | --url | Single article URL. |
| urls-file | FILE | --urls-file | File of article URLs. |
| min-chars | STRING | --min-chars | Drop extractions shorter than N characters. Default 200. |
| in | FOLDER | --indir | Upstream folder holding URLs. |
Showing key inputs. trafilatura exposes 12 inputs in total.
Full flag reference (12 inputs)
| Name | Type | Flag | Description |
|---|---|---|---|
| in | FOLDER | --indir | Upstream folder holding URLs (JSONL with a url field, JSON array, or one URL per line) |
| url | STRING | --url | Single article URL |
| urls-file | FILE | --urls-file | File of article URLs (JSONL / JSON array / one per line) |
| urls-text | STRING | --urls-text | Inline URL list. Avoid unquoted '|' in values. |
| concurrency | STRING | --concurrency | Parallel fetches (default: 8) |
| timeout | STRING | --timeout | Per-URL download timeout in seconds (default: 25) |
| min-chars | STRING | --min-chars | Drop extractions shorter than N characters (default: 200) |
| max-chars | STRING | --max-chars | Truncate body text at N characters (default: 20000) |
| max-urls | STRING | --max-urls | Cap URLs processed this run (0 = no cap) |
| user-agent | STRING | --user-agent | Override HTTP User-Agent |
| include-tables | BOOLEAN | --include-tables | Keep table content in the extracted text |
| fail-empty | BOOLEAN | --fail-empty | Exit non-zero when no article was extracted |
example
Run trafilatura
trafilatura-fetch --url https://example.com --min-chars 1 --outdir /hive/out{"url": "https://example.com", "title": "Example Domain", "lang": "en", "text": "Example Domain\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\nLearn more", "text_chars": 127}guidance
Choosing trafilatura
Use trafilatura when the page is static HTML and you want the article body. Use browser-fetch when the HTML is empty without Chromium. Use rss-read when the source is a feed.
browser-fetch
Renders the URL in headless Chromium. Use it when trafilatura gets an empty or interstitial page.
rss-read
Parses a public feed. Use it when you have an RSS URL, not an article URL.
wget
Downloads the raw response. It does not extract title and body.
faq
trafilatura questions
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
Run trafilatura yourself
https://example.com feeds trafilatura. articles.jsonl is from a completed run.
Facts on this page come from the live Trickest tool library.