RAG

Best Web Scraper for LLM Pipelines (2026): Open-Source Crawlers That Output Markdown, Compared

Ten open-source and self-hostable web crawlers for LLM and RAG work, checked against their repositories on 23 November 2026: Crawl4AI, Firecrawl, Scrapy, Trafilatura, Jina Reader, Spider, Crawlee, Playwright, ScrapeGraphAI and Browser Use. Compared on licence, current version, JavaScript rendering, output formats, self-hosting and robots.txt defaults, with their published security advisories, the legal ground rules for crawling and how crawled pages feed a private RAG index.

The best web scraper for LLM work in November 2026 is Crawl4AI for most Python teams: Apache 2.0, renders JavaScript, writes filtered Markdown and schema-based JSON, and runs as a library or a Docker server. Pick Firecrawl self-hosted if you want its API on your servers and can accept the AGPL, Scrapy for large scheduled crawls, and Trafilatura for article text. Turn on robots.txt checks; several tools leave them off.

A language model does not want HTML. It wants the main text of a page, with headings, lists, tables and code intact, and without menus, cookie banners and footers. So a web scraper for an LLM is judged on different grounds from a classic scraper: how clean its Markdown is, whether it can render pages built with JavaScript, whether it can follow links across a whole site, and whether everything stays on your own machines.

We checked ten projects against their GitHub repositories, release notes, documentation and security advisories on 23 November 2026. Versions and dates below are from that day. If you want the crawler to sit inside a governed agent rather than in a script, our web crawler tool for agents is described in the last section.

Web scrapers for LLMs at a glance

ToolLicenceLatest version (date)Renders JavaScriptLLM-ready outputSelf-hostingrobots.txt by default
Crawl4AIApache 2.0, plus an attribution clause0.9.6 (20 Nov 2026)Yes, Playwright ChromiumMarkdown, filtered “fit” Markdown, JSON via CSS/XPath or LLM schemaPython library, CLI, Docker serverOff (check_robots_txt=False)
Firecrawl serverAGPL-3.0; SDKs MITLast GitHub release v2.11.0 (19 Jun 2026); later builds tagged v2.11.xYes, bundled PlaywrightMarkdown, HTML, links; AI features need a model you connectDocker Compose, Kubernetes, HelmOn, per its README
Firecrawl LocalAGPL-3.00.1.1 (19 Nov 2026)Yes, using Chrome on the machineMarkdown, HTML, raw HTML, linksOne Rust binary, API on 127.0.0.1:3002Read when crawling
ScrapyBSD-3-Clause2.20.0 (6 Nov 2026)With the scrapy-playwright pluginFeeds you define; Markdown needs a converterPython frameworkOn in generated projects
TrafilaturaApache 2.0 (GPLv3+ before 1.8.0)2.3.1 (6 Oct 2026)No, raw HTML onlyTXT, Markdown, CSV, JSON, HTML, XML, XML-TEIPython library and CLIApplied by its focused crawler
Jina ReaderApache 2.0No tagged releases; open-source branch resynced April 2026Yes, headless Chrome engineMarkdown, HTML, text, JSON wrapperHosted API, or Docker imageOpt-in per request (X-Robots-Txt)
Spider (spider-rs)MIT2.54.2 (19 Nov 2026)Yes, chrome feature, HTTP firstMarkdown, JSON, WARCRust crate, Python and Node packagesOff (respect_robots_txt is false)
CrawleeApache 2.0Python 1.11.3 (23 Nov 2026); JS 3.18.2 (29 Sep 2026)Yes, PlaywrightCrawlerJSON datasets you shapePython or Node libraryOpt-in (respect_robots_txt_file)
ScrapeGraphAIMIT2.3.1 (6 Oct 2026)Yes, via PlaywrightJSON answers to a promptPython library; works with OllamaNot checked by SmartScraperGraph
Browser UseMIT1.0.8 (22 Nov 2026)Yes, drives Chrome over CDPWhatever the agent returnsPython library; cloud by defaultNone documented

Playwright itself (Apache 2.0, v1.65.1 on 13 November 2026) sits underneath several of these. It renders pages but converts nothing, so on its own it is a building block rather than an LLM scraper.

Which web crawler for LLM work should you pick?

  • Clean Markdown from Python, with JavaScript pages: Crawl4AI.
  • A crawl API your applications already speak: Firecrawl’s self-hosted server, or Firecrawl Local on one machine.
  • Millions of pages on a schedule, with retries and pipelines: Scrapy, adding scrapy-playwright for script-heavy sites and a converter for Markdown.
  • News, blogs and documentation that are plain HTML: Trafilatura, which is fast and needs no browser.
  • One URL to Markdown with no code: Jina Reader, hosted or in its Docker image.
  • High-throughput crawling in Rust, Python or Node: Spider; Crawlee if you prefer its request-queue model.
  • Pulling specific fields with a prompt instead of selectors: ScrapeGraphAI with a local model.
  • Pages that need clicking, logging in or filling forms: Browser Use, with care.

What makes a web scraper good for LLM input

Four properties matter more than raw speed.

Main-content extraction. A page is mostly navigation. Crawl4AI’s pruning and BM25 filters, Trafilatura’s extractor and Jina Reader’s readability pass all try to keep the article and drop the rest. Fewer junk tokens mean cheaper embeddings and better retrieval.

Structure that survives. Headings become the natural boundaries for chunks, and tables and code blocks lose meaning when flattened into plain text. Markdown keeps both.

Provenance. Every page should carry its URL, title and fetch time. Without them a RAG answer cannot cite its source, and you cannot delete a page’s chunks when the page is removed.

JavaScript rendering on demand. Many documentation sites build their pages in the browser. A plain HTTP fetch returns an empty shell. The better tools fetch over HTTP first and launch a headless browser only when a page needs one, which Spider and Jina Reader’s automatic engine both describe.

Crawl4AI: open-source web crawler for LLM pipelines

Crawl4AI is the most complete open-source tool aimed specifically at LLM input. Version 0.9.6 shipped on 20 November 2026. It runs as a Python library (pip install -U crawl4ai, then a Playwright Chromium install), as the crwl command, or as a Docker server on port 11235 that exposes /md, /crawl, /screenshot and /pdf endpoints and an MCP server for coding agents.

Its output is the reason people choose it. You get raw Markdown and a “fit” Markdown pass that removes boilerplate with a pruning filter, a BM25 filter against a query, or an LLM filter. Structured extraction works without a model through CSS, XPath or regex schemas, or with a model through a typed JSON schema, and the README says any provider works, including open-source ones you host.

Three things to know before adopting it:

  • robots.txt is off by default. The check_robots_txt setting in CrawlerRunConfig defaults to False. Set it to True for any site you do not own.
  • The licence has an extra clause. GitHub labels the project Apache 2.0, but the LICENSE file adds an “Attribution Requirement”: distributions and public uses must credit the project in a NOTICE file, README, About page or help output. Have your legal team read it if you ship Crawl4AI inside a product.
  • The Docker server has had serious bugs. See the security section below. Keep it on a private network, behind its API token, and current.

There is also a hosted Crawl4AI Cloud with its own search endpoints. The open-source library and server do not need it.

Firecrawl self-hosted and Firecrawl Local

Firecrawl is best known as a hosted API, but the repository contains two ways to run it yourself, both under the AGPL-3.0 (the SDKs and some UI components are MIT).

The self-hosted server runs from Docker Compose with the API and workers, a Playwright browser service, Redis, RabbitMQ and PostgreSQL. Its self-hosting notes are frank: the default API is unauthenticated, the Compose file defines no persistent volumes, and production needs your own authentication, TLS, backups and monitoring. AI-backed features have no model provider until you connect OpenAI, an OpenAI-compatible endpoint or Ollama. Firecrawl’s README says it respects robots.txt by default.

Firecrawl Local is newer: a single Rust binary, version 0.1.1 published on 19 November 2026, installed with cargo install firecrawl-local. It scrapes, crawls and maps sites using the Chrome already on your machine, parses PDFs and Office files locally, serves the Firecrawl v2 API on 127.0.0.1 port 3002, and can register itself as an MCP server for coding tools. It identifies itself as FirecrawlLocal and reads robots.txt when crawling. Its security defaults are thoughtful: the API refuses private addresses unless allowed, binding another host requires a token, and cloud metadata addresses are always blocked.

The privacy catch. By default (FIRECRAWL_CLOUD=auto) Firecrawl Local sends web searches, and single pages it cannot load, to Firecrawl Cloud, marked "source": "firecrawl-cloud" in the result. Those calls carry a random install ID. For a private pipeline, set FIRECRAWL_CLOUD=off.

The AGPL question. Running Firecrawl internally is usually straightforward. If you modify it and offer it to users over a network, the AGPL’s source-sharing terms come into play. Decide that before you fork it.

Scrapy plus a Markdown converter

Scrapy is the veteran: BSD-licensed, version 2.20.0 released on 6 November 2026, and built for scheduled crawls with request throttling, retries, item pipelines and feed exports. It does not produce Markdown or render JavaScript on its own, so an LLM stack usually adds two pieces: the scrapy-playwright download handler (BSD-3-Clause, v0.0.48) for script-heavy pages, and a pipeline step that converts each response’s HTML to Markdown, often with Trafilatura.

Its politeness defaults are the best documented of any tool here. The settings reference explains that ROBOTSTXT_OBEY falls back to False for historical reasons, but the settings.py generated by scrapy startproject sets it to True, and the current template also sets one concurrent request per domain and a one-second download delay. AutoThrottle, which adjusts the delay to the server’s response times, is available but commented out.

Choose Scrapy when the crawl itself is the hard part: tens of thousands of pages, incremental updates, many sites with different rules.

Trafilatura for article text

Trafilatura is a Python library and command-line tool for extracting the main text and metadata from web pages, at version 2.3.1 from 6 October 2026. It is Apache 2.0 from version 1.8.0; earlier versions were GPLv3+. Output formats include plain text, Markdown, CSV, JSON, HTML, XML and XML-TEI, and it keeps paragraphs, headings, lists, quotes, code and optionally tables, links and images.

It also discovers pages through sitemaps and RSS, Atom or JSON feeds, and includes a focused crawler that its documentation says follows the Robots Exclusion Standard’s politeness rules. What it does not do is run JavaScript: its troubleshooting guide says plainly that it works on raw HTML. For a static documentation site, a news archive or a blog, that makes it the lightest and fastest option on the list.

Jina Reader: URL to Markdown with one request

Jina Reader’s idea is simple: put r.jina.ai/ in front of a URL and get the page back as Markdown. Response headers choose the format (Markdown, HTML, text, or a JSON wrapper), add YAML front matter, caption images with a vision model, or split the Markdown into chunks. Its X-Robots-Txt header makes it fetch and obey the target site’s robots.txt; without that header it does not check.

The hosted API sends every URL you read through Jina AI’s servers, which rules it out for many private pipelines. The open-source code, Apache 2.0, was resynchronised with the hosted service in April 2026 and ships as a Docker image (ghcr.io/jina-ai/reader:oss) with headless Chrome, LibreOffice and CJK fonts. Two caveats: the repository has no tagged releases and its last commit was on 22 May 2026, and the build needs a few non-redistributable assets, including MaxMind GeoLite databases, that a script downloads separately.

Spider, Crawlee and Playwright for scale and JavaScript

Spider is a Rust crawling engine under the MIT licence, at 2.54.2 from 19 November 2026, with Python (spider_rs) and Node packages. It fetches over HTTP and launches headless Chrome only on pages that need JavaScript, streams pages as they arrive, and can export Markdown, JSON or WARC. Respecting robots.txt is a configuration flag that defaults to false, and the same engine powers the paid Spider Cloud, which the README promotes for proxies and anti-bot handling.

Crawlee, from Apify, is an Apache 2.0 crawling library for Python and Node. It offers plain HTTP crawlers with BeautifulSoup or Parsel parsing and a PlaywrightCrawler for JavaScript pages, plus request queues, retries and storage. Robots.txt support is an opt-in option. You write the Markdown conversion yourself.

Playwright is the browser automation library underneath Crawl4AI, Firecrawl’s server, ScrapeGraphAI and Crawlee’s browser crawler. Use it directly only when you need full control of a browser session.

LLM-driven scrapers: ScrapeGraphAI and Browser Use

Two projects use a language model to decide what to extract or what to click.

ScrapeGraphAI (MIT, 2.3.1 from 6 October 2026) builds scraping pipelines from graph nodes. Its SmartScraperGraph takes a URL and a prompt such as “list the product names and prices” and returns JSON, and the README’s first example runs on a local model through Ollama. It suits small, irregular extraction tasks, not whole-site ingestion. Its default graph does not check robots.txt; there is an optional RobotsNode, but it asks the LLM to read the robots.txt file rather than applying a parser, which is not a dependable control.

Browser Use (MIT, 1.0.8 from 22 November 2026) is a browser agent: the model writes Python against Chrome’s DevTools Protocol to complete a task. It reaches pages behind clicks and forms that crawlers cannot. Its defaults point at the vendor’s cloud: model bu-4.0 on the Browser Use gateway and a cloud browser. You can run a local Chromium with a local model instead, for example through Ollama’s OpenAI-compatible endpoint. Anonymised telemetry is on unless you set ANONYMIZED_TELEMETRY=false, and the run events it sends include the URLs visited, without query strings.

An agent that browses on its own judgement is harder to keep within robots.txt, rate limits and site terms than a crawler with a fixed scope. Use one for narrow tasks you can supervise.

Patch your crawler: published security advisories

A crawler fetches content chosen by strangers and often runs a full browser, so its security record matters. GitHub’s advisory listings on 23 November 2026 show:

ProjectAdvisoryWhat it wasFixed in
Crawl4AIGHSA-5882-5rx9-xgxp (Jan 2026)Remote code execution in the Docker API through the hooks parameter0.8.0
Crawl4AICVE-2026-53753 (Jun 2026)Pre-authentication sandbox escape to code execution in the Docker API0.8.7
Crawl4AICVE-2026-57572 (Jun 2026)Unauthenticated code execution through Chromium launch arguments0.9.0
Crawl4AIGHSA-9xxj-3r64-qw54 (20 Nov 2026)Docker server shared one browser context between API clients, leaking cookies and site storage0.9.6
FirecrawlCVE-2026-72905 (Jul 2026)Code execution via the change-tracking format and an attacker-controlled site2.11.31
FirecrawlCVE-2026-72904 (Jul 2026)Arbitrary file read via JSON Schema $ref expansion2.11.32
ScrapyGHSA-q7wc-mr9r-gcjh (6 Nov 2026)Link extractors and SitemapSpider followed file://, ftp:// and s3:// URLs from crawled content2.20.0
ScrapyGHSA-466x-p45j-m4fx (6 Nov 2026)Per-request HTTP credentials leaked on cross-domain redirects2.20.0

Crawl4AI published 36 advisories during 2026, eleven of them on 20 November alone. That reflects active disclosure as much as risk, but the message is clear: pin a version, update deliberately, never expose a crawler’s API to the internet, and run it where a compromised browser cannot reach internal systems. Server-side request forgery, where a crawled page or redirect steers the crawler at an internal address, is the recurring theme.

This is general information, not legal advice. Four sets of rules apply, and they are separate.

robots.txt. The Robots Exclusion Protocol became an IETF standard, RFC 9309, in September 2022. It says crawlers should not use a cached copy for more than 24 hours, must assume “disallow everything” while a server error makes robots.txt unreachable (relaxed only after a long outage, such as 30 days), and must parse at least 500 kibibytes of it if they cap its size. It also says the rules are not a form of access authorisation. Respecting them is still the baseline of good conduct, and regulators treat ignoring them as a warning sign. The IETF’s AI Preferences working group is drafting a vocabulary for AI-specific preferences attached through robots.txt and HTTP headers; on 23 November 2026 both its documents were still working-group drafts.

Copyright and text and data mining. In the EU, Article 4 of Directive (EU) 2019/790 permits reproductions of lawfully accessible works for text and data mining, unless the rightholder has expressly reserved that use in an appropriate manner, such as machine-readable means for content made publicly available online. Robots.txt rules and page metadata are the usual way to express such a reservation, though European courts and commentators still disagree about exactly which signals qualify. Copying whole pages into an index is reproduction, and showing long passages back to users is a further use, so prefer your own content, licensed content and sources that permit reuse.

Terms of use. Many sites forbid automated access in their terms. Whether those terms bind you depends on jurisdiction and on how you accepted them; logging in usually makes them stronger.

Personal data. A page that names people makes your crawl a processing of personal data under the GDPR. The French data protection authority, the CNIL, has a focus sheet on web scraping; its English version is dated 5 January 2026. It asks scrapers to define collection criteria in advance, exclude data and site categories they do not need, delete irrelevant data promptly, exclude sites that object through robots.txt or CAPTCHAs, and tell people about the collection, for example by publishing the list of sites.

In practice: crawl an allow-list, use an honest user agent, keep request rates low (one request per second per domain is a common starting point), obey robots.txt, avoid login-gated pages unless you have permission, and keep a record of what you crawled and when.

From crawled pages to a RAG index inside your network

A crawler is the first stage of a private RAG pipeline, and most of the quality is won or lost in the stages after it.

  1. Scope. An allow-list of domains and paths, with a page cap per site and a re-crawl schedule.
  2. Fetch and extract. Markdown with the boilerplate removed, plus URL, title, fetch date and any Last-Modified or ETag header, so the next crawl can skip unchanged pages.
  3. Clean. Remove near-duplicate pages, such as print views and tag archives, and pages that are mostly navigation.
  4. Chunk. Split along headings, keeping tables and code blocks whole. Our notes on splitting long documents for retrieval apply to web pages too.
  5. Embed and index. Use an embedding model you host and a vector store inside your network; our shortlist of self-hostable vector stores and the head-to-head of Qdrant, Milvus, Weaviate and pgvector cover that choice. Pair vectors with keyword matching for product codes and version numbers, as described in our keyword plus vector retrieval guide.
  6. Keep it fresh. Re-crawl on a schedule and delete chunks for pages that return 404 or 410. Our guide to keeping indexed sources in sync covers change detection.
  7. Treat it as untrusted. Web pages can carry hidden instructions aimed at your model. Isolate retrieved text from instructions, as our prompt-injection containment guide explains, and log which sources each answer used.

Orchestration frameworks can glue these steps together; our comparison of open-source RAG frameworks covers LlamaIndex, Haystack and others. If what you want is an agent that searches the open web and writes a cited report rather than a standing index, see our review of self-hosted deep research tools.

How VDF AI fits

VDF AI does not run, host or bundle any of the crawlers above. It is an on-premises and private-cloud platform for chat, private RAG and governed agents, with role-based access control and audit logs on every plan.

For agents, VDF AI provides its own web crawler tool. Per its tool page, an agent can be assigned the tool to crawl multiple pages within a domain and return each page’s URL, title and extracted text, ready for chunking and embedding. It takes one to five starting URLs and stays within each starting domain, with a cap of up to 20 pages per site (10 by default), configurable delays between requests (one to three seconds by default) and a limit on text per page. Crawling runs through a controlled tool with audit logging on infrastructure you operate, and research agents often pair it with the web search tool for discovery and federated vector search for retrieval afterwards. As the tool page advises, point it only at sites you are entitled to ingest.

For the index itself, VDF AI Chat keeps documents, embeddings and the vector store inside your perimeter and filters retrieval by each user’s permissions at query time, and VDF AI Agents attaches knowledge sources and tools to agents under role-based access control.

Sources

Primary repositories, documentation, advisories and legal texts, as retrieved on 23 November 2026.


Feeding crawled pages into a knowledge base your auditors can inspect? See how the VDF AI web crawler tool works inside governed agents, or talk to our team.

Frequently asked questions

What is the best web scraper for LLM use?

It depends on the job. For turning pages into clean Markdown from Python, Crawl4AI is the most complete open-source option: Apache 2.0, a Playwright browser, filtered 'fit' Markdown and schema-based JSON extraction, at version 0.9.6 on 20 November 2026. Firecrawl suits teams that want its API on their own servers and accept the AGPL. Scrapy is the choice for large, scheduled crawls, and Trafilatura is the lightest way to pull article text from static HTML.

What is the best open-source web crawler for LLM and RAG pipelines?

For a whole documentation site or knowledge base, use a crawler that follows links within a domain, renders JavaScript when needed and writes one Markdown file per page with its URL. Crawl4AI, Firecrawl's self-hosted server or Firecrawl Local, Spider and Crawlee all do this. Scrapy does it at the largest scale but needs a converter to produce Markdown. Check the robots.txt default before you start, because several of these tools leave it switched off.

Do LLM web scrapers respect robots.txt?

Not all of them by default. Firecrawl says it respects robots.txt by default, Firecrawl Local reads it when crawling, projects generated by Scrapy's startproject command obey it, and Trafilatura's focused crawler applies it. Crawl4AI, Spider, Crawlee and Jina Reader make it an option you switch on. ScrapeGraphAI's main scraping graph does not check it, and Browser Use documents no robots.txt handling. Turn the check on and record that you did.

Can I scrape websites for RAG without sending data to a cloud service?

Yes, but read the defaults. Crawl4AI, Scrapy, Trafilatura, Spider and Crawlee run entirely on your machine. Firecrawl Local hands blocked pages and searches to Firecrawl Cloud unless you set FIRECRAWL_CLOUD=off. Browser Use defaults to its hosted model and cloud browser unless you pass a local browser and model. LLM-based extraction sends page text to whichever model you configure, so point it at a model you run yourself, such as one served by Ollama.

Is it legal to scrape websites for an LLM?

Often, but it depends on the content and the jurisdiction. Robots.txt is a standard way to state crawling rules but, per RFC 9309, not access authorisation. In the EU, commercial text and data mining is allowed unless the rightholder has reserved it in an appropriate manner, such as machine-readable means for online content. Terms of use can restrict scraping contractually, and personal data on a page brings GDPR duties. France's CNIL expects scrapers to exclude sites that refuse via robots.txt or CAPTCHA. Take legal advice for anything beyond your own or licensed content.

How do I turn crawled web pages into a RAG index?

Crawl an allow-list of sites into Markdown, keeping the URL, title and fetch date with each page. Strip navigation and boilerplate, remove duplicates, split by headings into chunks of a few hundred tokens, and embed them with a model you host. Store the chunks with their source metadata in a vector index inside your network, schedule re-crawls, delete chunks when pages disappear, and treat crawled text as untrusted input that may contain prompt-injection attempts.

Filed under
web scrapingweb crawlerRAGprivate RAGopen-source AIdata ingestion
Private RAG & Search

Evaluate your knowledge stack

Find out how a private RAG and retrieval layer would perform on your data — accuracy, latency, governance, and what to fix before you scale.

Or start free — no credit card →

Keep reading