Trafilatura or Crawl4AI? The reply depends upon what you really want from an internet web page. Each are open supply, each run domestically with out a cloud API, each can produce Markdown, and each carry the Apache-2.0 license. Regardless of that overlap, they clear up completely different issues. Choosing the incorrect one means both empty output or a pile of noise across the textual content you truly 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× sooner and returned about half the textual content.
- Solely Crawl4AI acquired content material that seems after JavaScript runs.
- The strongest setup is commonly each: render with Crawl4AI, extract with Trafilatura.
Internet Scrapers vs Content material Extractors: Two Completely different Lessons
An internet scraper is a program or library that hundreds a web page, reads its HTML (and typically executes its JavaScript), and extracts the information you want, reminiscent of textual content, hyperlinks, metadata, or tables, right into a structured format like JSON, CSV, or Markdown. Underneath that single label sit two completely different lessons of instruments:
| Class | What it does | Examples |
| Content material extractors | Take HTML that has already been downloaded and isolate the clear predominant 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 among the hottest instruments within the top quality. Crawl4AI is a crawler that additionally does some extraction. That one distinction explains virtually every thing else on this comparability.
Trafilatura vs Crawl4AI: Goal of Every Software
The 2 instruments begin from reverse ends of the identical job. Trafilatura decides which a part of a web page is price holding, whereas Crawl4AI makes certain the web page is loaded and prepared for a language mannequin to learn.
Trafilatura: the article extractor
Trafilatura exists to reply one query nicely: 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 much 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 reminiscent of writer, 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 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 principle content material” you add a content material filter (reminiscent of PruningContentFilter) and browse the filtered fit_markdown output as an alternative 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 virtually all of it as Markdown, except 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 by way of Playwright |
| JavaScript | Not executed | Executed; waits for the DOM |
| What counts as “the physique” | Constructed-in article heuristics | Nearly the entire web page by default; predominant content material solely by a pruning filter |
| Markdown output | output_format="markdown" |
fit_markdown after filtering, in any other case raw_markdown |
| Velocity (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 usually stay |
| Assets | 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 predominant content material from HTML in Python, every software has a transparent power and one restrict price realizing about.
Strengths of Trafilatura
Trafilatura works greatest when the article textual content is already within the web page’s HTML. Its predominant strengths:
- Constructed for information and articles. Menus, footers, “learn additionally” sections and promo playing cards often keep out of the outcome.
- Clear, readable Markdown. Paragraphs and headings are preserved. With
include_links=Falseandfavor_precision=Truethe output incorporates no stray hyperlinks and leans towards dropping uncertain blocks. - Quick and low-cost at scale. With no browser to launch, tons of or 1000’s of pages could be processed on modest {hardware}.
- Metadata extraction. Writer, publication date, language and title can be found if you want them, and could be switched off if you solely need the physique.
- Minimal API. Obtain HTML, name
extract(..., output_format="markdown"), performed.
Important limitation. If the location 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 alternative case: pages that solely make sense in an actual browser. Its predominant strengths:

- Sees the web page as a browser does. It handles JavaScript-rendered content material (dynamic pages) and might 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.
Important limitation for “physique solely” duties. The pruning filter is heuristic and generic. It usually retains “extra tales” blocks, evaluations carousels and FAQs as a result of, to the filter, they seem like dense helpful textual content. Within the information article examined under, Crawl4AI’s output was about twice so long as Trafilatura’s, and the additional size got here from related-article hyperlinks.
Check Outcomes
The check seems at three issues: how clear the output is, how lengthy every software takes, and what occurs when the textual content is rendered by JavaScript. The outcomes under come from two strange pages and two edge circumstances.
How We Examined
Each instruments ran domestically towards the identical pages with the identical purpose: return solely the principle 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 regular DSL connection.
The settings weren’t an identical: Trafilatura was tuned for precision (favor_precision=True, include_links=False), whereas Crawl4AI stored its hyperlinks. A run counted as successful if the software returned the principle textual content of the web page. The check covers 4 pages, someday 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 principle 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 isn’t an article, and it reveals how every software copes with a web page stuffed 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 under.
| Web page | Software | 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?
Each instruments captured the article itself: the laureates, the reason of mirror-image isomers, the notice on the earlier yr’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 |
| Website 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 an inventory 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 acquired 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 and marketing copy. The distinction is what number of banners and repeats come together with it.
| Examine | Trafilatura | Crawl4AI |
| Part headings (#, ##) | Preserved | Nearly no construction; one future of textual content |
| CTA button labels (“Get Began” and so on.) | Ended up within the textual content | Some disappeared together with the structure |
| Expertise names (.NET, Java, PHP) | Intact | Misplaced in a single paragraph, which learn “together with , , ,” |
| Consumer testimonials | Current | Current and duplicated by the carousel (one testimonial repeated thrice) |
| FAQ and product playing cards | Partially | Extra full, although now not actually “predominant textual content” |
| Measurement (characters) | 6,153 | 12,256 |
Neither software 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 unpolluted textual content | ~1.3–2.1 s, ~70k characters of Markdown together with navigation | With out 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 Check
- 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).
- Velocity: Trafilatura was about 4–5× sooner on each pages (0.9–1.4 s vs 3.9–6.7 s) and a couple of–3× sooner 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 usually duplicated.
- The place Crawl4AI is required: when the content material shouldn’t 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
The entire tasks under publish their supply code below an open license. Some (Firecrawl, CRW, Jina Reader) additionally promote a industrial cloud service; the desk describes the self-hosted / open-source version. Licenses replicate the general public repositories on the time of writing, so examine the present LICENSE file earlier than utilizing one in manufacturing.
| Software | 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, writer, 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 adverts 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 information 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 companies 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 greatest scraper. The correct selection depends upon the place the content material lives and what you should do with it, whether or not that could be a net scraper for LLM prompts or an internet 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 pace and cleanliness matter | Trafilatura |
| You need the complete 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 usually are 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 depart behind.
Render with Crawl4AI, Extract with Trafilatura
The script under 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 predominant():
url = "https://instance.com/article"
async with AsyncWebCrawler() as crawler:
outcome = await crawler.arun(url=url)
if not outcome.success:
elevate RuntimeError(outcome.error_message)
markdown = extract(outcome.html, output_format="markdown")
print(markdown or "No article content material discovered")
asyncio.run(predominant())
The right way to Convert a Internet Web page to Markdown in Python
For static pages, the best HTML to Markdown Python method is to name Trafilatura immediately:
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 an internet 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 depends 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 suitable match for:
When the principle purpose is to extract clear article textual content from static pages, Trafilatura is often the easier choice.
- Information monitoring and media evaluation throughout tons of or 1000’s 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 suitable match for:
When the web page wants a browser or the output feeds an LLM, Crawl4AI is often the easier choice.
- 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 reveals 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 tasks 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 blended supply record: attempt Trafilatura first for pace 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 depends upon the location, the information and the jurisdiction, and this isn’t authorized recommendation. Earlier than you begin, examine 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_txtchoice inCrawlerRunConfig, which is off by default within the present documentation. - Phrases of service. Some websites forbid automated entry, and logging in often means accepting these phrases.
- Private information. Names, emails and profiles fall below guidelines reminiscent of GDPR, even when the pages are public.
- Copyright. Article textual content and pictures often 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 location down.
How SCAND Makes use of Internet Information in AI Tasks
At SCAND, net information is one enter amongst a number of in AI tasks. For a shopper in Europe, we constructed an agentic AI platform the place non-technical workers create and handle AI brokers by a chat interface.

Crawl4AI collects information from exterior sources, Tavily additionally helps net information assortment, and Docling processes paperwork, whereas LangChain and LangGraph orchestrate the brokers. Groups can run multi-source analysis with out a separate customized answer for each process.
In a Crawl4AI RAG pipeline, the crawler brings pages in as Markdown, a doc parser handles information, and the retrieval layer searches over each. Not each RAG system wants net information: our RAG help chatbot boilerplate solutions from an organization’s personal data base and documentation.
Want net information for a RAG system or an AI agent? We design and construct the pipeline.
Abstract
Trafilatura is a extensively used selection 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× sooner. Its blind spot is something that’s not within the preliminary HTML.
Crawl4AI is the software for dynamic pages and LLM pipelines. It reaches content material Trafilatura can not, however if you need solely the article physique, its output usually retains related-content blocks and carousel duplicates.
In apply, the strongest setup is commonly a mix: a browser to fetch the web page, and Trafilatura to wash it.
Steadily Requested Questions (FAQs)
What’s the distinction between Trafilatura and Crawl4AI?
Trafilatura extracts the principle 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 virtually the entire web page as Markdown. In our check, Trafilatura was 2–5× sooner and returned cleaner article textual content.
Which net scraper is greatest for RAG and LLM pipelines?
It depends upon the supply. For article pages with static HTML, Trafilatura offers clear textual content shortly. For JavaScript-rendered pages, Crawl4AI is the sensible selection as a result of it returns Markdown after rendering. For PDFs and Workplace information, MarkItDown converts paperwork. Many pipelines mix two of those slightly 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 employ 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 sometimes take away navigation and promo blocks. Cross the rendered HTML from Crawl4AI to Trafilatura’s extract perform. We didn’t benchmark this mix.
Is Crawl4AI free for industrial use?
Sure. Crawl4AI is open supply below the Apache-2.0 license, which permits industrial use. The repository’s LICENSE file provides an attribution requirement: public makes use of should credit score the mission. License phrases have been checked on October 27, 2026 (newest PyPI launch 0.9.5), so overview the present LICENSE file earlier than delivery a product.
Is net scraping authorized?
It depends upon the location, the information and the nation, so this isn’t authorized recommendation. Examine robots.txt, the location’s phrases of service, whether or not the pages include private information coated by guidelines reminiscent of GDPR, who holds the copyright to the content material, and whether or not your request fee may overload the server. For a particular mission, ask a lawyer.
How do you exchange an internet 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.
