---
source_url: "https://learn.engineering.vips.edu/frameworks/trafilatura?utm_source=openai"
title: "Trafilatura | VIPS Learn"
mirrored_at: 2026-08-08T01:00:58.766Z
host: learn.engineering.vips.edu
cited_in_42a: true
mirror_canonical: "https://index.42a.ai/learn.engineering.vips.edu/frameworks/trafilatura__q__utm_source_openai"
---

> **Original source:** https://learn.engineering.vips.edu/frameworks/trafilatura?utm_source=openai

Capability · Framework — rag

Trafilatura is a go-to library for turning raw HTML into clean text, Markdown, or XML. It combines boilerplate removal, language detection, and metadata extraction with a battle-tested extraction algorithm used across academic and industrial crawlers. It runs entirely offline — no API, no browser.

### Framework facts

Category

rag

Language

Python

License

Apache-2.0

Repository

https://github.com/adbar/trafilatura

## Install

```
pip install trafilatura
```

## Quickstart

```
import trafilatura

html = trafilatura.fetch_url('https://engineering.vips.edu/about')
text = trafilatura.extract(html, output_format='markdown', with_metadata=True)
print(text[:500])
```

## Alternatives

-   Readability.js / python-readability
-   Newspaper3k — article-focused
-   Goose3 — HTML to article text
-   Jina Reader — hosted Markdown API

## Frequently asked questions

Does Trafilatura render JavaScript?

No. It parses server-rendered HTML only. Pair it with Playwright or a rendering service for JS-heavy sites.

Is it suitable for large-scale crawls?

Yes. It's written in C-extensions where it matters and benchmarks at thousands of pages per second on a single core.

### Sources

1.  [Trafilatura — GitHub](https://github.com/adbar/trafilatura) — accessed 2026-04-20
2.  [Trafilatura — docs](https://trafilatura.readthedocs.io/) — accessed 2026-04-20