Docs to Markdown: Crawl Any Docs Site for LLM & RAG avatar

Docs to Markdown: Crawl Any Docs Site for LLM & RAG

Pricing

$1.00 / 1,000 pages

Go to Apify Store
Docs to Markdown: Crawl Any Docs Site for LLM & RAG

Docs to Markdown: Crawl Any Docs Site for LLM & RAG

Turn any documentation site into clean, LLM-ready Markdown for RAG, AI agents and knowledge bases. Crawls sitemap.xml and in-scope links, strips nav and footer, and can emit RAG chunks plus llms.txt. Pay $0.001 per page converted. Failed, blocked and empty pages are free.

Pricing

$1.00 / 1,000 pages

Rating

0.0

(0)

Developer

Tan Boon Kwee

Tan Boon Kwee

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Features

Limited permissions

Share

Docs to Markdown turns a documentation site into clean, LLM-ready Markdown. Give it a docs URL. It finds pages through sitemap.xml and in-scope links, keeps the article body, and returns GitHub-flavoured Markdown with the navigation, footer and other chrome removed.

The Actor is HTTP only. It does not run a browser and it does not need an API key. You can use the output in a RAG index, an AI agent, a knowledge base, or as a local Markdown mirror of a docs site. Optional RAG chunks and llms.txt / llms-full.txt files are included in the same run.

Failed, blocked, redirected-out-of-scope, duplicate and near-empty pages are not charged.

What can I use Docs to Markdown for?

  • RAG and vector-store ingestion: crawl a product's docs and load the Markdown or the heading-path chunks into LangChain, LlamaIndex, or any other store you already use.
  • AI-agent context: give an agent a current copy of a framework's or vendor's documentation instead of hoping the model remembers an old version.
  • llms.txt for your own docs: generate an llms.txt index and an llms-full.txt bundle that you can host or attach to a chat.
  • A local Markdown mirror: keep a dated snapshot of a docs site for review, search, or offline work.
  • Scheduled docs watch: run the Actor daily or weekly so a pipeline always has a fresh corpus. Combine it with a webhook to start the next step when the run finishes.

It is aimed at documentation, help centres and other article-style sites that return HTML over HTTP (Docusaurus, MkDocs, Sphinx, GitBook, Mintlify and similar). Sites that render their content only in the browser will come back thin or empty; those pages are not charged.

How to crawl a docs site to Markdown

  1. Paste one or more docs URLs, for example https://docs.python.org/3/tutorial/.
  2. Set Max pages to a small number for the first run (the prefill is 3). Raise it when you are happy with the output.
  3. Leave Stay under the start path on if you want /guide/ to stay in /guide/ and not wander into /blog/.
  4. Leave Use sitemap.xml and Respect robots.txt on unless you have a reason to turn them off.
  5. Click Start. Download the dataset as JSON, CSV or Excel, or fetch llms.txt and llms-full.txt from the key-value store.

Input

FieldMeaning
Docs URLsOne or more documentation start URLs. The crawl stays on the same host and, by default, under the same path prefix.
Max pagesCap on successfully converted (and charged) pages. Prefill is 3, so the first run and Apify's daily test stay small.
Stay under the start pathOn by default.
Use sitemap.xmlOn by default. The Actor reads sitemap.xml (and sitemap indexes) first, then follows in-scope links if it still needs more pages.
Respect robots.txtOn by default. Disallowed paths are skipped and not charged.
Content CSS selectorOptional. If set, only this part of the page is converted. Otherwise common docs containers are tried (article, main, .theme-doc-markdown, and similar).
RAG chunks / chunk sizeOptional paragraph splits with a heading path, ready for embeddings. On by default, at 2,000 characters.
Write llms.txtOn by default. Writes an index and a combined Markdown file to the key-value store, at no extra charge.

Input example

{
"startUrls": ["https://docs.python.org/3/tutorial/"],
"maxPages": 50,
"pathPrefixOnly": true,
"useSitemap": true,
"respectRobotsTxt": true,
"includeChunks": true,
"chunkSize": 2000,
"includeLlmsTxt": true
}

A first test can use a single page URL and "maxPages": 3.

Output

One dataset row per converted page:

FieldMeaning
urlFinal URL after redirects
titlePage title
headingsOutline of h1–h4 headings
headingCountNumber of headings
markdownClean GitHub-flavoured Markdown of the article body
wordCountWord count of the Markdown
contentHashSHA-256 of the Markdown, used to skip duplicates in the same run
chunksOptional RAG chunks, each with headingPath, charCount and text
statusok for a converted page; error for a free error row

The key-value store also holds llms.txt (a list of page titles and URLs) and llms-full.txt (every page's Markdown in one file, each under a title and a Source: line), when that option is on.

Output example

{
"url": "https://docs.python.org/3/tutorial/introduction.html",
"title": "3. An Informal Introduction to Python",
"headingCount": 6,
"wordCount": 1840,
"markdown": "# 3. An Informal Introduction to Python\n\nIn the following examples...",
"contentHash": "b4c1…",
"status": "ok",
"chunks": [
{
"index": 0,
"headingPath": "3. An Informal Introduction to Python",
"charCount": 1720,
"text": "In the following examples, input and output are distinguished..."
}
]
}

How much does it cost?

You pay US$0.001 per page converted (US$1 per 1,000 pages). That is the only event this Actor charges. Failed, empty, blocked, out-of-scope and duplicate pages are free. llms.txt and llms-full.txt are free. There is no AI cost and no API key to add.

Pricing examples:

  • Quick test: 3 pages = US$0.003
  • A small guide: 50 pages = US$0.05
  • A 300-page docs site: US$0.30 once
  • A weekly refresh of 300 pages: about US$1.20 a month

Apify also charges a tiny start fee per run (a fraction of a cent, based on memory). Set max cost per run in the run options if you want a hard cap; the Actor stops when the charge limit is reached. Compute for a small HTTP crawl is covered by the per-page price on ordinary docs sites.

Schedule and webhook recipes

Daily or weekly refresh. In Console, open the Actor → Schedules → Create. Use the same input as a full crawl (your docs URL and a maxPages high enough for the whole site). A daily run of a 300-page site is about US$0.30 a day only if every page is converted again; you still only pay for pages that succeed.

Webhook into your pipeline. On the Actor or the task, add a webhook for the SUCCEEDED event and point it at your own URL (or at Make, Zapier, n8n, or a Cloudflare Worker). When the run finishes, your hook receives the run id. Fetch the dataset from https://api.apify.com/v2/actor-runs/RUN_ID/dataset/items and the files from the run's key-value store (llms.txt, llms-full.txt). That is enough to push a fresh corpus into a vector store without babysitting the run.

Google Sheets or a bucket. After a scheduled run, use an integration or a small script to write the dataset (URL, title, Markdown, word count) to a sheet, an S3/R2 bucket, or Git. The dataset export is JSON, CSV or Excel.

Start from an API or MCP call. Developers can start a run with the Apify API (POST /v2/acts/heyiambk~docs-to-markdown/runs) or from the Apify MCP server. Pass the same JSON input as in the Console. Use waitForFinish only for small maxPages values; for a large site, start the run and collect the results from the webhook.

FAQ

Does this work on any website? It is built for documentation and help-centre pages that return HTML over HTTP. It is not a general JavaScript browser crawler, and it does not log in.

Will it crawl the whole domain? Not by default. It stays on the same host and under the start URL's path prefix, so a start URL of https://docs.example.com/guide/ will not follow links into /blog/.

What about PDFs, Word files or login walls? Not in this version. Linked PDFs and pages behind a login are skipped or come back as free error rows.

What if a page is JavaScript-only? The Actor will likely return little or no text. That page is not charged. Try a content selector only if the HTML already contains the article. A browser-based crawler is a better fit for pages that never send the body over HTTP.

Does it respect robots.txt? Yes, by default. You can turn that off, but you should only do so on sites you own or have permission to crawl.

How do I keep a run cheap while I test? Set Max pages to 3 (the prefill) or even 1. Check the Markdown, then raise the cap.

Can I crawl several docs sites in one run? Yes. Add more start URLs. The maxPages cap applies to the whole run, and each start URL keeps its own host and path scope.

Are there duplicates if the same article appears under two URLs? The Actor skips a page in the same run when the Markdown contentHash has already been seen. Those skipped pages are not charged.

Do I need an API key or a proxy? No. Pages are fetched over ordinary HTTP from the Actor's server. If a site blocks datacenter IPs, that page will fail and stay free.

How do I get one file for an LLM? Turn on Write llms.txt and llms-full.txt (the default) and download llms-full.txt from the key-value store. Or concatenate the markdown field from the dataset yourself.

What happens if I omit the start URL? The Actor writes a free error row, sets a status message, and exits successfully. It does not fail the run. Apify's daily Store test uses the prefilled docs URL and a 3-page cap, so that path is the one that must keep working.

Built by BATT Studio

This Actor is part of a small set of pay-per-event tools on the Apify Store under heyiambk. If something in the Markdown looks wrong for a particular docs theme, open an issue on the Actor page with the start URL and a short note.