SuperAPIAI Directory

markcrawl

github.com · AI developer platforms

Crawl websites into clean Markdown, search pages and extract structured data with LLMs for web research and RAG pipelines.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

MarkCrawl is a web crawling and structuring engine written in Python, with the goal of converting web content into clean Markdown suitable for LLM pipelines. It can crawl a single page or crawl an entire website in one command, strip out navigation, scripts, and boilerplate content, and output Markdown files along with a structured JSONL index, with each page including a citation with the access date. The core crawling and embedding functionality requires no API key.

Main capabilities

  • Crawl a single page or an entire site, outputting clean Markdown and a pages.jsonl index.
  • Built-in local embedder (default since v0.10.1); installation includes torch + transformers + sentence-transformers, embeddings require no API key, and you can switch back to OpenAI with a parameter.
  • Follows robots.txt, supports sitemap-first crawling, concurrent crawling and proxies, resumable crawling, and automatic recovery.
  • URL filtering: --exclude-path, --include-path, --dry-run preview; v0.11.1 by default filters aggregator pages (such as mdBook /print.html, Hugo /_print/).
  • Optional extraction backends include the default BS4, trafilatura, ensemble, ReaderLM-v2; image alt text can be preserved.
  • Binary downloads: since v0.11.0, download_types=["pdf","docx"] is supported, with a prefetch filter callback; downloading images is also supported.
  • Screenshots: full page or cropped, PNG or JPEG.
  • Text chunking (configurable overlap and semantic chunking), cross-crawl deduplication (--cross-dedup), ranking links by predicted content output (--prioritize-links), and intelligent sampling of templated URL clusters (--smart-sample).
  • JavaScript rendering: after installing markcrawl[js], use --render-js to handle React/Vue/Angular initial render content.
  • HTTP retries: full-jitter exponential backoff based on tenacity (2 seconds to 30 seconds, 5 attempts), honoring the Retry-After header on 429.

Optional add-ons

  • LLM structured extraction: use an LLM to extract specified fields from each page, supporting OpenAI, Anthropic (Claude), Google Gemini, xAI (Grok), selectable via --provider; supports automatic field discovery across multiple sites.
  • Supabase vector retrieval: chunk, generate embeddings, and upload to Supabase pgvector, requiring SUPABASE_URL, SUPABASE_KEY, and OPENAI_API_KEY.
  • Agent integration: provides an MCP server, LangChain tools, and the OpenClaw skill; tools include crawl_site, list_pages, read_page, search_pages, extract_data. There is also a docs/LLM_PROMPT.md system prompt that lets an LLM automatically generate correct MarkCrawl commands.
  • Provides a Python API (result.pages) and page-type extraction, content-region heuristics.

Usage Install or upgrade: pip install markcrawl. If Playwright is needed, after installation you must also run playwright install chromium. For a slim installation (skipping the local embedder dependency stack), set OPENAI_API_KEY and pass embedding_model="text-embedding-3-small". After the quick start, you get a ./demo directory containing pages.jsonl, with each line containing the page fields. Common patterns include single-page crawling, whole-site crawling, URL filtering, extraction backends, binary downloads, screenshots, and end-to-end use cases (competitive analysis, RAG chatbots, API docs to code generation). See docs/RECIPES.md for the full commands. The core crawler is free; the two optional features, extraction and upload, have API costs.

Use cases Suitable for focused RAG data ingestion of a few hundred to a few thousand pages, such as documentation sites, blogs, and product sites, where the goal is LLM-usable Markdown with little junk content and low embedding cost. Benchmarks show it has the lowest navigation contamination (53 words, versus 500+ for others), a speed of 2.7 pages/second, and a total chunk count of 27,193 (2.2 times fewer than the highest).

Limitations (explicitly listed by the official source)

  • NotSupports login/authenticated sites, with no cookie or session support.
  • No anti-bot detection (Cloudflare, Akamai) evasion capability.
  • Not suitable for millions-of-pages scale; designed for a few hundred to a few thousand pages, and Scrapy is recommended for very large scale.
  • HTML only; PDF content support is on the roadmap.
  • JavaScript SPAs require installing markcrawl[js] and using --render-js.
  • Infinite-scroll pages: --render-js only renders the initial load and does not scroll, so only the first screen of content is captured (for example, about 28 of 82 YouTube videos); a complete list requires combining with the platform API or RSS.

Benchmark performance (officially disclosed, as of bench v1.4, 2026-05-11) The independent llm-crawler-benchmarks v1.4 covers 7 crawlers. MarkCrawl ranks 1st in cost (about $4,505/year at 100,000-page scale), but ranks 7th in answer quality at 3.77/5, with retrieval accuracy MRR 0.341 (the leader is 0.76). After filtering /print.html and /_print/ in v0.11.1, MRR for documentation-dense sites is expected to improve by +0.02 to +0.04. The benchmark itself is also improving; v1.5 will switch to independently taking questions from each site's sitemap. The above is single-trial data; multi-trial measurement is on the v1.5.1 roadmap.

Other Runs locally, with no telemetry, no analytics, and no data sent; licensed under MIT; has 647 automated tests, GitHub Actions CI (Python 3.10-3.13), and ruff checks. Latest version v0.11.1 (2026-05-12).

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools