Skip to main content

Trafilatura Core

Trafilatura Core extracts main content from supplied HTML

Trafilatura Core playground

Clean supplied HTML, adjust extraction settings, or generate TypeScript and Python examples.

HTML to clean

Boilerplate mode
Images
Links
Tables
Comments

What to do:

What is Trafilatura Core?

Trafilatura Core extracts main content by removing boilerplate from HTML documents.

  • Two language versions β€” TypeScript and Python: available as a TypeScript library on npm and a Python library on PyPI.
  • Trafilatura Core is an open-source extraction engine based on Trafilatura, implemented in TypeScript and Python. Its TypeScript engine ports the original Python code with go-trafilatura as a DOM translation aid; its native Python engine translates that port.
  • The Core in its name means it is reduced to one task: extracting main content by removing boilerplate. An optional Source URL supplies metadata and image-resolution context; it is never fetched. Use Turndown for Markdown conversion and Markdownee for crawling live websites.
  • Compared with Mozilla Readability, Trafilatura and Trafilatura Core use layered structural and content heuristics with fallback and recall escalation, rather than centering extraction on the candidate scoring inherited from Arc90’s original readability.js article extractor; Trafilatura Core also offers configuration options for boilerplate removal.