Trafilatura
Extract main article text from HTML for content inventories and template quality checks.
Community support
Upvotes come from SearchEngineAnswer members. GitHub stars and reader reviews are counted separately.
Claim this tool if you maintain it.
- Best for
- Crawling
- Setup required
- Python 3.10 or later with pip. A saved HTML file works for a local first test.
- Costs to check
- No tool license fee. Large extraction jobs need compute, storage, and a permitted source of HTML.
- License in catalog
- Apache-2.0
Project screenshot
GitHub repository
- GitHub stars
- 7,111
- Forks
- 498
- Last push
- 2026-11-09
- Primary language
- Python
GitHub snapshot from . Stars count GitHub bookmarks. Reader ratings appear separately below.
How to install Trafilatura
-
Create and activate a Python environment that meets the supported Python version in the project documentation.
pip install trafilatura trafilatura --help - Install the package with pip and use the help command to confirm the CLI is available.
First tutorial for Trafilatura
-
Save a permitted article page as article.html. Include a known body sentence and a recognizable navigation label in the fixture.
trafilatura < article.html - Run the extraction below. Check that the output contains the body sentence, then look for navigation text that should have been left out.
Where Trafilatura fits
Use it to compare the body text extracted from a small group of editorial templates before turning a crawl into a content inventory.
- When to choose another tool
- Choose browser rendering first if the article body is populated by JavaScript after load or requires a signed-in session.
- First evaluation
- Save an article fixture that contains a known body sentence and a distinct navigation label. Extract the text and check whether the expected sentence remains.
- How to interpret the result
- Extraction is heuristic. Missing text may point to a template or extraction problem and does not establish what a search engine indexed.
Reviews and discussion
Reader reviews
Be the first to share your experience with this tool.
Discussion
Ask a question or share a setup tip.
Flag an outdated detail
Include the field that needs updating and a source link. Copy your draft, then use the corrections policy to contact the editorial team.
Write a review or join the discussion