Trafilatura or Crawl4AI? The reply is dependent upon what you really want from an online web page. Each are open supply, each run regionally with out a cloud API, each can produce Markdown, and each carry the Apache-2.0 license. Regardless of that overlap, they resolve totally different issues. Choosing the unsuitable one means both empty output or a pile of noise across the textual content you really needed.
Key Takeaways:
- Trafilatura extracts clear article textual content from HTML you have already got; Crawl4AI opens the web page in a headless browser.
- On our check pages Trafilatura was 2–5× quicker and returned about half the textual content.
- Solely Crawl4AI obtained content material that seems after JavaScript runs.
- The strongest setup is usually each: render with Crawl4AI, extract with Trafilatura.
Internet Scrapers vs Content material Extractors: Two Completely different Lessons
An online scraper is a program or library that masses a web page, reads its HTML (and typically executes its JavaScript), and extracts the info you want, equivalent to textual content, hyperlinks, metadata, or tables, right into a structured format like JSON, CSV, or Markdown. Underneath that single label sit two totally different lessons of instruments:
| Class | What it does | Examples |
| Content material extractors | Take HTML that has already been downloaded and isolate the clear essential textual content of an article | Trafilatura, newspaper4k, goose3, readability-lxml, jusText, resiliparse |
| Crawlers / browser automation | Fetch pages, render JavaScript when wanted, observe hyperlinks throughout a web site | Crawl4AI, Crawlee, Scrapy, Playwright, Puppeteer, Scrapling, Katana, Selenium |
Trafilatura is without doubt one of the hottest instruments within the first-class. Crawl4AI is a crawler that additionally does some extraction. That one distinction explains nearly the whole lot else on this comparability.
Trafilatura vs Crawl4AI: Function of Every Instrument
The 2 instruments begin from reverse ends of the identical job. Trafilatura decides which a part of a web page is price preserving, whereas Crawl4AI makes positive the web page is loaded and prepared for a language mannequin to learn.
Trafilatura: the article extractor
Trafilatura exists to reply one query effectively: which a part of this HTML is the precise article? It fetches a web page with a plain HTTP request, or accepts HTML you have already got, and applies article heuristics just like jusText and Readability.

It strips navigation, footers, “learn additionally” blocks, promo playing cards and feedback, and returns the physique as textual content, Markdown, XML or JSON, optionally with metadata equivalent to creator, date and language. It doesn’t run a browser and doesn’t execute JavaScript.
Crawl4AI: the LLM-oriented crawler
Crawl4AI exists to show reside net pages into Markdown that a big language mannequin or a RAG pipeline can devour. It drives an actual headless Chromium by means of Playwright, waits for the DOM to load, executes scripts, can dismiss some overlays and cookie banners, and returns Markdown along with hyperlinks, media and tables.
By default it converts almost the entire web page. To get “solely the primary content material” you add a content material filter (equivalent to PruningContentFilter) and browse the filtered fit_markdown output as a substitute of raw_markdown.
Key Variations at a Look
Trafilatura and Crawl4AI differ in how they get and browse a web page. Trafilatura makes a plain HTTP request, runs no JavaScript, and retains solely the article physique. Crawl4AI renders the web page in headless Chromium and returns nearly all of it as Markdown, until a pruning filter narrows it.
| Criterion | Trafilatura | Crawl4AI |
| Position | Extracts the article physique from HTML | Crawler that opens the web page itself and prepares Markdown for LLMs |
| The way it will get the web page | Plain HTTP request | Headless Chromium through Playwright |
| JavaScript | Not executed | Executed; waits for the DOM |
| What counts as “the physique” | Constructed-in article heuristics | Virtually the entire web page by default; essential content material solely by means of a pruning filter |
| Markdown output | output_format="markdown" | fit_markdown after filtering, in any other case raw_markdown |
| Pace (measured, see Outcomes) | 0.9–1.4 s per web page | 3.9–6.7 s per web page, about 2–5× slower |
| Cleanliness of a information physique | Excessive: associated gadgets and promos are eliminated | Medium: physique is current, however associated hyperlinks and duplicates typically stay |
| Sources | CPU solely, no browser | RAM for Chromium, plus a Playwright browser set up |
| Setup | pip set up and one extract name | Browser, crawler config and filter config |
| License | Apache-2.0 | Apache-2.0 |
Detailed Comparability
To extract essential content material from HTML in Python, every device has a transparent energy and one restrict price understanding about.
Strengths of Trafilatura
Trafilatura works finest when the article textual content is already within the web page’s HTML. Its essential strengths:
- Constructed for information and articles. Menus, footers, “learn additionally” sections and promo playing cards normally keep out of the outcome.
- Clear, readable Markdown. Paragraphs and headings are preserved. With
include_links=Falseandfavor_precision=Truethe output accommodates no stray hyperlinks and leans towards dropping uncertain blocks. - Quick and low-cost at scale. With no browser to launch, a whole lot or hundreds of pages will be processed on modest {hardware}.
- Metadata extraction. Writer, publication date, language and title can be found while you want them, and will be switched off while you solely need the physique.
- Minimal API. Obtain HTML, name
extract(..., output_format="markdown"), carried out.
Foremost limitation. If the positioning doesn’t ship the textual content in its preliminary HTML, as a result of the content material is rendered by JavaScript or the web page is served as an empty shell, Trafilatura returns nothing helpful. On a JavaScript-only demo web page it extracted simply 29 characters of web page shell and none of the particular content material.
Strengths of Crawl4AI
Crawl4AI covers the other case: pages that solely make sense in an actual browser. Its essential strengths:

- Sees the web page as a browser does. It handles JavaScript-rendered content material (dynamic pages) and may dismiss some cookie banners and overlays.
- Markdown prepared for RAG and LLMs, along with hyperlinks, media and tables in structured type.
- Content material filtering.
PruningContentFilterremoves a lot of the navigation. With out it, a single Wikipedia article got here out at about 70,000 characters of Markdown, menus included. - Works on “reside” pages the place content material is drawn in after load.
Foremost limitation for “physique solely” duties. The pruning filter is heuristic and generic. It typically retains “extra tales” blocks, evaluations carousels and FAQs as a result of, to the filter, they appear like dense helpful textual content. Within the information article examined beneath, Crawl4AI’s output was about twice so long as Trafilatura’s, and the additional size got here from related-article hyperlinks.
Take a look at Outcomes
The check appears at three issues: how clear the output is, how lengthy every device takes, and what occurs when the textual content is rendered by JavaScript. The outcomes beneath come from two peculiar pages and two edge instances.
How We Examined
Each instruments ran regionally towards the identical pages with the identical objective: return solely the primary textual content of the web page as Markdown. The check ran with Trafilatura 2.3.1, Crawl4AI 0.9.4 and Python 3.14, on 4x CPU, 32GB RAM, Home windows OS over a typical DSL connection.
The settings weren’t an identical: Trafilatura was tuned for precision (favor_precision=True, include_links=False), whereas Crawl4AI saved its hyperlinks. A run counted as successful if the device returned the primary textual content of the web page. The check covers 4 pages, at some point and one area, and no websites with bot safety, so deal with the outcomes as a snapshot.
- A information article with promo blocks. A report on the Nobel Prize in Chemistry from a serious on-line information outlet. The article is surrounded by “extra tales” playing cards linking to different Nobel protection. This was the primary check.
- A loud company touchdown web page. The homepage of a software program firm, with a menu, CTAs, a testimonial carousel and an FAQ. It’s not an article, and it exhibits how every device copes with a web page filled with banners.
Two extra pages, a Wikipedia article and the JavaScript-rendered demo web page quotes.toscrape.com/js/, are coated within the Static vs dynamic JavaScript Pages check beneath.
| Web page | Instrument | Success | Time (s) | Characters | Size vs Trafilatura |
| Information article | Trafilatura | sure | 0.94 | 1,712 | 1.0× |
| Information article | Crawl4AI | sure | 3.93 | 3,496 | 2.0× |
| Touchdown web page | Trafilatura | sure | 1.40 | 6,153 | 1.0× |
| Touchdown web page | Crawl4AI | sure | 6.72 | 12,256 | 2.0× |
Information Article: Did Solely the Physique Come By means of?
Each instruments captured the article itself: the laureates, the reason of mirror-image isomers, the notice on the earlier 12 months’s prize and the dates of upcoming bulletins.
| Examine | Trafilatura | Crawl4AI |
| Article paragraphs | Current, separated by clean strains | Current, however merged into dense blocks with out paragraph breaks |
| Web site menu, subscription prompts, footer | Absent | Absent |
| “Learn additionally” playing cards | Absent | Current: tales on different Nobel prizes and unrelated science |
| Duplicates of these playing cards | None | Sure: the identical hyperlink seems each as a heading and as a listing merchandise |
| Hyperlinks within the physique | Disabled on function | Associated hyperlinks remained |
| Time | 0.94 s | 3.93 s |
Verdict: Trafilatura delivered the clear article physique. Crawl4AI additionally obtained the physique, however roughly half of its output was promo playing cards subsequent to the article. For “simply the article as .md”, that’s the weaker outcome.
Touchdown Web page: Banners and Noise
A touchdown web page has no “article physique”, so each instruments extract advertising copy. The distinction is what number of banners and repeats come together with it.
| Examine | Trafilatura | Crawl4AI |
| Part headings (#, ##) | Preserved | Virtually no construction; one future of textual content |
| CTA button labels (“Get Began” and so forth.) | Ended up within the textual content | Some disappeared together with the structure |
| Know-how names (.NET, Java, PHP) | Intact | Misplaced in a single paragraph, which learn “together with , , ,” |
| Shopper testimonials | Current | Current and duplicated by the carousel (one testimonial repeated thrice) |
| FAQ and product playing cards | Partially | Extra full, although now not actually “essential textual content” |
| Measurement (characters) | 6,153 | 12,256 |
Neither device produces completely clear textual content from a touchdown web page. Trafilatura is extra compact and retains the headings. Crawl4AI is extra full however carries carousel duplicates and occasional gaps.
Static vs JavaScript Pages
Two extra pages present the boundary between the instruments that the information check doesn’t reveal:
| Web page | Trafilatura | Crawl4AI | What it means |
| Wikipedia article (static HTML) | ~0.6 s, ~26k characters of fresh textual content | ~1.3–2.1 s, ~70k characters of Markdown together with navigation | And not using a content material filter Crawl4AI drags within the menus. Trafilatura goes straight to the article |
| quotes.toscrape.com/js/ (JavaScript-rendered) | ~0.8–1.0 s, 29 characters (web page shell solely) | ~1.7–1.9 s, ~1.7k characters, all quotes current | When the textual content exists solely after JavaScript runs, Trafilatura will get nothing and Crawl4AI succeeds |
Conclusions from the Take a look at
- Information web page with banners, physique solely, as Markdown: Trafilatura wins. It returned 1,712 characters of pure article. Crawl4AI returned the identical paragraphs plus promo hyperlinks (3,496 characters).
- Pace: Trafilatura was about 4–5× quicker on each pages (0.9–1.4 s vs 3.9–6.7 s) and a pair of–3× quicker on the Wikipedia and JavaScript pages. It additionally wants no Chromium.
- Markdown high quality: Trafilatura retains paragraphs and headings. Crawl4AI’s paragraphs merge into dense blocks, and rotating blocks are extra typically duplicated.
- The place Crawl4AI is required: when the content material will not be within the supply HTML. Even then, getting “physique solely” output from a browser nonetheless requires a filter, and that filter is weaker than Trafilatura’s heuristics.
Python Internet Scraping Libraries and Different Open-Supply Instruments In contrast
All the initiatives beneath publish their supply code below an open license. Some (Firecrawl, CRW, Jina Reader) additionally promote a business cloud service; the desk describes the self-hosted / open-source version. Licenses mirror the general public repositories on the time of writing, so verify the present LICENSE file earlier than utilizing one in manufacturing.
| Instrument | Language | Sort | JS | License | In brief |
| Trafilatura | Python | Extractor | No | Apache-2.0 | Benchmark for article textual content extraction |
| Crawl4AI | Python | Crawler + extractor | Sure | Apache-2.0 | LLM-friendly crawler, Markdown for RAG |
| newspaper4k | Python | Article extractor | No | MIT | Information textual content, creator, date; little boilerplate |
| goose3 | Python | Article extractor | No | Apache-2.0 | Basic article extractor (port of Goose) |
| readability-lxml | Python | Extractor | No | Apache-2.0 | Port of Readability.js (Firefox Reader View) |
| jusText | Python | Boilerplate remover | No | BSD-2 | Strips menus and advertisements from HTML |
| resiliparse | Python / C++ | Extractor | No | Apache-2.0 | Quick main-content extraction from HTML / WARC |
| Scrapy | Python | Crawler framework | Partial | BSD-3 | Industrial-scale knowledge assortment |
| Crawlee | Python / JS | Crawler framework | Sure | Apache-2.0 | Queues, proxies, deduplication |
| Colly | Go | Crawler framework | No | Apache-2.0 | Light-weight, quick Go crawler |
| Katana | Go | Crawler / URL discovery | Partial | MIT | Quick CLI crawler from ProjectDiscovery |
| StormCrawler | Java | Crawler (Apache Storm) | Sure | Apache-2.0 | Low-latency crawling pipelines |
| Playwright | Python / JS / .NET | Browser automation | Sure | Apache-2.0 | Chromium, Firefox, WebKit |
| Puppeteer | Node.js | Browser automation | Sure | Apache-2.0 | The usual headless Chrome library for JS |
| Selenium | Many | Browser automation | Sure | Apache-2.0 | Basic WebDriver |
| Scrapling | Python | Adaptive scraper | Sure | BSD-3 | Self-healing selectors |
| Firecrawl (self-hosted) | TypeScript | Crawler + API | Sure | AGPL-3.0 | URL to Markdown / JSON |
| CRW (fastCRW) | Rust | Crawler + API | Sure | AGPL-3.0 | Firecrawl-compatible API, light-weight self-host |
| Jina Reader (OSS) | TypeScript | URL to Markdown | Sure | Apache-2.0 | Code behind r.jina.ai; fashions could also be licensed individually |
| MarkItDown | Python | Doc converter | No | MIT | PDF / Phrase / PPT / Excel to Markdown |
| ScrapeGraphAI | Python | LLM scraper | Sure | MIT | Scraping pushed by a natural-language immediate |
On this net scraping instruments comparability, the closest Trafilatura options are newspaper4k, goose3, readability-lxml and jusText, so trafilatura vs readability is about extraction heuristics, not JavaScript.
Amongst crawl4ai options, Firecrawl and Jina Reader additionally convert net pages into LLM-ready content material. For crawl4ai vs firecrawl, licensing is a key distinction: Apache-2.0 versus AGPL-3.0. All three help self-hosting, whereas managed providers can be found individually. This issues when evaluating firecrawl options or a jina reader various.
What Ought to You Use?
There isn’t any single finest scraper. The correct alternative is dependent upon the place the content material lives and what it’s worthwhile to do with it, whether or not that could be a net scraper for LLM prompts or an online scraper for RAG pipelines.
| Scenario | Use |
| Publicly accessible article; you want solely the article textual content as Markdown | Trafilatura |
| The textual content seems solely after JavaScript runs | Crawl4AI |
| Many static articles the place velocity and cleanliness matter | Trafilatura |
| You need the total web page as Markdown for an LLM, and a few noise is suitable | Crawl4AI |
| Crawling a big web site at scale | Scrapy, StormCrawler, Colly, Katana |
| Changing PDFs and workplace paperwork for RAG | MarkItDown |
The Better of Each: Mix Them
The 2 instruments are usually not rivals a lot as two halves of a pipeline. A typical and efficient sample:
- Fetch and render with Crawl4AI (or plain Playwright) so JavaScript-generated content material is current.
- Extract the rendered HTML with Trafilatura to get a clear article physique with paragraphs and headings.

This offers you the browser’s attain with the extractor’s precision, and avoids the related-links and carousel duplicates that Crawl4AI’s personal pruning filter tends to go away behind.
Render with Crawl4AI, Extract with Trafilatura
The script beneath renders the web page in a browser and passes the ensuing HTML to Trafilatura. Run crawl4ai-setup as soon as to put in the browser.
import asyncio
from crawl4ai import AsyncWebCrawler
from trafilatura import extract
async def essential():
url = "https://instance.com/article"
async with AsyncWebCrawler() as crawler:
outcome = await crawler.arun(url=url)
if not outcome.success:
increase RuntimeError(outcome.error_message)
markdown = extract(outcome.html, output_format="markdown")
print(markdown or "No article content material discovered")
asyncio.run(essential())
Easy methods to Convert a Internet Web page to Markdown in Python
For static pages, the best HTML to Markdown Python method is to name Trafilatura instantly:
from trafilatura import fetch_url, extract
html = fetch_url("https://instance.com/article")
markdown = extract(html, output_format="markdown") if html else None
print(markdown or "No content material discovered")
When constructing a web site to markdown pipeline, begin with Trafilatura and use Crawl4AI as a fallback if extraction returns empty or unexpectedly brief output. Set the minimal size from your personal pages: in our check, a JavaScript web page returned solely 29 characters from Trafilatura, whereas the static pages returned from 1,712 to about 26,000 characters.
Use Instances
The selection between Trafilatura and Crawl4AI is dependent upon the kind of web site, the content material you want, and whether or not JavaScript rendering is required. Listed here are the situations the place every method is smart.
Trafilatura is the precise match for:
When the primary objective is to extract clear article textual content from static pages, Trafilatura is normally the less complicated possibility.
- Information monitoring and media evaluation throughout a whole lot or hundreds of shops.
- Constructing textual content corpora for NLP analysis or language-model coaching.
- Archiving articles in clear Markdown or XML.
- Feeding a summarizer or classifier with article our bodies freed from navigation noise.
- Batch processing of already-downloaded HTML or WARC archives.
- Low-resource environments the place launching a browser per web page is just too costly.

Crawl4AI is the precise match for:
When the web page wants a browser or the output feeds an LLM, Crawl4AI is normally the less complicated possibility.
- RAG pipelines and AI brokers that want net content material as LLM-ready Markdown.
- Single-page purposes and websites that render content material client-side.
- Gathering hyperlinks, media and tables together with textual content.
- Pages that want interplay earlier than the content material exhibits up: closing overlays, scrolling, ready for lazy loading.
- Exploratory scraping the place you need the entire web page and can filter later.
Use each collectively when:
Some initiatives want browser rendering and exact textual content extraction, making a mixed workflow helpful.
- The web page wants a browser to render, however the output have to be a clear article physique.
- You run a combined supply checklist: attempt Trafilatura first for velocity and fall again to Crawl4AI rendering when it returns empty or near-empty output.
Is Internet Scraping Authorized? What to Examine Earlier than You Begin
Legality is dependent upon the positioning, the info and the jurisdiction, and this isn’t authorized recommendation. Earlier than you begin, verify 5 issues:
- robots.txt. It states which paths a web site asks bots to not go to. In Crawl4AI, checking it’s managed by the
check_robots_txtpossibility inCrawlerRunConfig, which is off by default within the present documentation. - Phrases of service. Some websites forbid automated entry, and logging in normally means accepting these phrases.
- Private knowledge. Names, emails and profiles fall below guidelines equivalent to GDPR, even when the pages are public.
- Copyright. Article textual content and pictures normally belong to their authors, so gathering them doesn’t imply you could republish them.
- Server load. Restrict request charges so your crawler doesn’t gradual the positioning down.
How SCAND Makes use of Internet Information in AI Tasks
At SCAND, net knowledge is one enter amongst a number of in AI initiatives. For a consumer in Europe, we constructed an agentic AI platform the place non-technical employees create and handle AI brokers by means of a chat interface.

Crawl4AI collects knowledge from exterior sources, Tavily additionally helps net knowledge assortment, and Docling processes paperwork, whereas LangChain and LangGraph orchestrate the brokers. Groups can run multi-source analysis with out a separate customized resolution for each job.
In a Crawl4AI RAG pipeline, the crawler brings pages in as Markdown, a doc parser handles recordsdata, and the retrieval layer searches over each. Not each RAG system wants net knowledge: our RAG help chatbot boilerplate solutions from an organization’s personal information base and documentation.
Want net knowledge for a RAG system or an AI agent? We design and construct the pipeline.
Abstract
Trafilatura is a broadly used alternative for clear textual content extraction from articles and information. On our information and touchdown pages it returned about half the textual content of Crawl4AI, with paragraphs and headings intact and no related-article hyperlinks, and throughout all 4 pages it was 2–5× quicker. Its blind spot is something that isn’t within the preliminary HTML.
Crawl4AI is the device for dynamic pages and LLM pipelines. It reaches content material Trafilatura can’t, however while you need solely the article physique, its output typically retains related-content blocks and carousel duplicates.
In observe, the strongest setup is usually a mix: a browser to fetch the web page, and Trafilatura to scrub it.
Often Requested Questions (FAQs)
What’s the distinction between Trafilatura and Crawl4AI?
Trafilatura extracts the primary article textual content from HTML, utilizing a plain HTTP request or HTML you have already got, and doesn’t run JavaScript. Crawl4AI opens the web page in headless Chromium, executes scripts and returns nearly the entire web page as Markdown. In our check, Trafilatura was 2–5× quicker and returned cleaner article textual content.
Which net scraper is finest for RAG and LLM pipelines?
It is dependent upon the supply. For article pages with static HTML, Trafilatura offers clear textual content shortly. For JavaScript-rendered pages, Crawl4AI is the sensible alternative as a result of it returns Markdown after rendering. For PDFs and Workplace recordsdata, MarkItDown converts paperwork. Many pipelines mix two of those fairly than counting on one.
Can Trafilatura scrape JavaScript pages?
Not by itself. Trafilatura doesn’t run a browser or execute JavaScript, so it solely sees the HTML the server sends. On a JavaScript-rendered demo web page it returned 29 characters of web page shell. To scrape such pages, render them first with Crawl4AI or Playwright and go the ensuing HTML to Trafilatura.
Can you utilize Trafilatura and Crawl4AI collectively?
Sure. Crawl4AI renders the web page in a browser, and Trafilatura extracts the article physique from the rendered HTML. This retains the browser’s attain for JavaScript content material whereas Trafilatura’s heuristics usually take away navigation and promo blocks. Cross the rendered HTML from Crawl4AI to Trafilatura’s extract perform. We didn’t benchmark this mixture.
Is Crawl4AI free for business use?
Sure. Crawl4AI is open supply below the Apache-2.0 license, which permits business use. The repository’s LICENSE file provides an attribution requirement: public makes use of should credit score the venture. License phrases have been checked on October 27, 2026 (newest PyPI launch 0.9.5), so overview the present LICENSE file earlier than transport a product.
Is net scraping authorized?
It is dependent upon the positioning, the info and the nation, so this isn’t authorized recommendation. Examine robots.txt, the positioning’s phrases of service, whether or not the pages include private knowledge coated by guidelines equivalent to GDPR, who holds the copyright to the content material, and whether or not your request charge may overload the server. For a particular venture, ask a lawyer.
How do you change an online web page to Markdown in Python?
For static pages, fetch the HTML and go it to Trafilatura’s extract perform with the Markdown output format; that is the best HTML to Markdown Python route. For JavaScript-rendered pages, let Crawl4AI render the web page first after which extract. Both approach, it takes just a few strains of code.
