Website to Markdown for LLM & RAG + llms.txt Generator
Pricing
from $1.20 / 1,000 page converteds
Website to Markdown for LLM & RAG + llms.txt Generator
Turn websites into clean Markdown for LLMs, RAG and AI agents: main content only (no menus, footers, cookie banners), tables and links kept, optional RAG chunks, and a ready llms.txt + llms-full.txt per site. Respects robots.txt.
Pricing
from $1.20 / 1,000 page converteds
Rating
0.0
(0)
Developer
DocFlow Tools
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
an hour ago
Last modified
Categories
Features
Share
Turn websites into clean Markdown for LLMs, RAG pipelines and AI agents. The actor crawls the sites you give it
(same domain only, robots.txt respected), keeps the main content of each page with its headings, tables and links,
and drops menus, headers, footers, cookie banners and scripts. Optionally it splits each page into RAG chunks that are
never longer than your limit. At the end it writes an llms.txt index and an llms-full.txt file per site, in the
format proposed at llmstxt.org. It uses no search engines and works over plain HTTP (no
browser). You pay only for pages converted.
What you get
- One dataset row per page: URL, title, meta description, language, Markdown, word count, an estimated token count and, if you ask for them, chunks.
- Main-content extraction with trafilatura (links and tables kept, images
and comments left out). If it finds fewer than 20 words, the actor falls back to the page's
<main>,<article>or<body>with navigation, header, footer, aside, forms and scripts removed, converted with markdownify. - A
# headingat the top of the Markdown (the page's H1, or its title) when the page has a title and the extracted text does not already start with a heading. - RAG chunks (optional): split at headings and paragraphs, never longer than
chunkSize, with overlap. llms.txtandllms-full.txtper site in the key-value store.- Clean crawl: same domain only (
www.and the bare domain count as one site),#fragmentsand tracking parameters (utm_*,gclid,fbclid,mc_cid,mc_eid,_hs*,ref) removed, file links (PDF, images, CSS, JS, ZIP, Office documents and others) skipped, and two URLs that redirect to the same page delivered once.
Use cases
- Load a documentation site or knowledge base into a vector database for RAG.
- Give an AI agent or chatbot the content of a website as Markdown.
- Generate a first
llms.txtandllms-full.txtfor your own site, then review and publish them at your domain root. - Export a site's text for analysis, translation or migration.
- Convert only one section of a site with
includePatterns(for example/docs/).
How to use
- Open the Actor in Apify Console and click Try for free / Start.
- In Websites or pages, add one or more start URLs.
- Set Max pages to the most pages you want to convert and pay for.
- Optionally set Only output URLs matching, Skip URLs matching, RAG chunk size and Chunk overlap.
- Run it. Pages are in the Output tab. The
llms-*.txtfiles and theSUMMARYrecord are in the run's key-value store.
Input example
{"startUrls": ["https://docs.example.com/"],"maxPages": 200,"crawlLinks": true,"includePatterns": ["/guides/", "/api/"],"excludePatterns": ["/changelog/"],"chunkSize": 2000,"chunkOverlap": 200,"generateLlmsTxt": true,"respectRobotsTxt": true}
| Field | Type | Default | Meaning |
|---|---|---|---|
startUrls | array of strings | required | Start pages. A URL without https:// gets it added. |
maxPages | integer (1-100,000) | 100 | Stop after this many converted pages in total. |
crawlLinks | boolean | true | Follow internal links. Off = convert only the listed URLs. |
includePatterns | array of regex | none | Only pages matching at least one pattern are output. Other pages are still crawled to find links, but not output or charged. Start URLs are always output. |
excludePatterns | array of regex | none | Links matching any pattern are not crawled. |
chunkSize | integer (0-100,000) | 0 | 0 = no chunks. Otherwise the maximum length of each chunk, in characters. |
chunkOverlap | integer (0-5,000) | 200 | Characters from the end of one chunk repeated at the start of the next. |
generateLlmsTxt | boolean | true | Write llms-<site>.txt and llms-full-<site>.txt to the key-value store. |
respectRobotsTxt | boolean | true | Skip pages that robots.txt disallows. |
Output example
One item per converted page (long values shortened):
{"url": "https://docs.example.com/guides/install","title": "Install | Example Docs","description": "How to install Example on Linux, macOS and Windows.","lang": "en","markdown": "# Install\n\nExample runs on Linux, macOS and Windows...\n\n## Requirements\n\n| OS | Version |\n|---|---|\n| Linux | ...","wordCount": 812,"tokensEstimate": 1290,"chunks": ["# Install\n\nExample runs on Linux, macOS and Windows...","...last 200 characters of the previous chunk...\n\n## Requirements\n\n| OS | Version | ..."]}
descriptioncomes from the meta description, orog:descriptionif there is none.tokensEstimateis the Markdown length divided by 4, a rough estimate, not a tokenizer count.chunksis present only whenchunkSizeis above 0.urlis the address the page ended on after redirects.
If no page is converted, the dataset gets one free item with "status": "no_pages" and the summary fields.
How chunks are built
- If the whole page fits in
chunkSize, it is one chunk. - Otherwise the Markdown is split before each heading and at blank lines. A block longer than
chunkSizeis cut at the last sentence end or line break that fits (if it is past half the limit), or else at exactlychunkSize. - Blocks are joined while they fit. Each new chunk starts with the last
chunkOverlapcharacters of the previous one, but only if that still fits; otherwise the chunk starts without overlap. - No chunk is ever longer than
chunkSize. The overlap is counted in characters, so it can start mid-word.
llms.txt and llms-full.txt
Converted pages are grouped by site (host without www.). For each site the key-value store gets two text files.
The key replaces every character other than letters, digits and - with -; for docs.example.com they are
llms-docs-example-com.txt and llms-full-docs-example-com.txt.
llms-<site>.txt follows the llmstxt.org structure: an H1 with the site name, a blockquote with the summary, and H2
sections with link lists. The name is the title of the site's home page (or of the first page converted, if the
home page was not), cut at the first | or -. The summary is that page's meta description. Sections are the
first folder of each URL path (Main for the root, listed first; the rest in alphabetical order). Each line is
- [page title](url): description.
# Example Docs> Guides and API reference for Example.## Main- [Example Docs | Example](https://docs.example.com/): Guides and API reference for Example.## Api- [Authentication - API | Example](https://docs.example.com/api/auth)## Guides- [Install | Example Docs](https://docs.example.com/guides/install): How to install Example on Linux, macOS and Windows.
llms-full-<site>.txt starts with the same H1 and then contains the Markdown of every page, each preceded by a
<!-- source: url --> line and separated by ---.
The files list only the pages converted in that run, so set maxPages high enough to cover the site and review the
result before publishing it.
Pricing
Prices by Apify discount tier: the prices below are for the Bronze tier. Free plan: 50 % off. Silver: 10 % off. Gold and higher: 20 % off. Apify applies the right price automatically.
Pay per event, in USD:
| Event | Price | When |
|---|---|---|
| Actor start | $0.00005 | Charged by Apify when a run starts, per GB of run memory (default memory: 512 MB) |
page-converted | $0.0015 | For each page written to the dataset. |
Not charged: pages that fail or return an HTTP error, pages blocked by robots.txt, non-HTML responses, a second
URL that redirects to a page already converted, pages crawled only to find links because they do not match
includePatterns, and the no_pages status item. The llms.txt files cost nothing extra.
Control spend with maxPages. The default is 100 pages; the maximum is 100,000. Only converted pages count
toward it. The run also stops cleanly if it reaches the maximum cost per run you set in Apify.
Examples:
- 100 pages: $0.00005 + 100 × $0.0015 = $0.15005
- 1,000 pages: $0.00005 + 1,000 × $0.0015 = $1.50005
- 300 pages crawled, 40 match
includePatterns: $0.00005 + 40 × $0.0015 = $0.06005
Use it from code, AI agents and integrations
Apify API (one call, returns the dataset items):
curl -X POST "https://api.apify.com/v2/acts/docflow-tools~website-to-markdown-llms-txt/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"startUrls": ["https://docs.example.com/"], "maxPages": 20, "chunkSize": 2000}'
Synchronous endpoints wait a limited time; for large crawls start the run asynchronously and read the results when it finishes.
Python (apify-client):
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("docflow-tools/website-to-markdown-llms-txt").call(run_input={"startUrls": ["https://docs.example.com/"], "maxPages": 100, "chunkSize": 2000})for page in client.dataset(run["defaultDatasetId"]).iterate_items():for chunk in page.get("chunks", []):... # embed and store the chunk with page["url"] as metadatastore = client.key_value_store(run["defaultKeyValueStoreId"])llms_txt = store.get_record("llms-docs-example-com.txt")["value"]
AI agents: the Actor can be called by AI agents through the Apify MCP server at https://mcp.apify.com.
No-code: connect it to Make, Zapier, n8n and other tools through Apify integrations, or schedule it in Apify.
Limits and notes
- No JavaScript rendering. Pages are fetched over HTTP. Content that only appears after JavaScript runs is not captured.
- Same domain only: links to other hosts or subdomains are not followed.
robots.txtis respected by default (user agent tokenLLMReadyBot). If a site has norobots.txt, all pages are allowed.- Only
httpandhttpsURLs are fetched; domains that resolve to private, loopback, link-local or other internal addresses are blocked. excludePatternsapply to discovered links, not to the start URLs.- Up to 5 pages are fetched in parallel, with a 30-second timeout per request. Only the first 5 MB of each page's HTML is used.
- Images are not included in the Markdown.
- The
SUMMARYrecord lists pages converted, the first 200 errors, pages skipped byrobots.txt, whethermaxPageswas reached and how many queued pages were not visited.
FAQ
Can I convert only some pages of a big site?
Yes. Use includePatterns to choose what is output (and charged) and excludePatterns to stop the crawl from
entering sections you do not need. Or turn off crawlLinks and list the URLs.
Is the generated llms.txt ready to publish?
It follows the llmstxt.org structure and lists the pages converted in the run. Review the name, summary and sections
before you publish it at https://your-site/llms.txt.
How large should chunks be?
It depends on your embedding model and retrieval setup. chunkSize is in characters; tokensEstimate (characters
divided by 4) can help you pick a value.
Do I pay for pages that fail?
No. Failed pages are listed in SUMMARY.errors and are not charged.
Does it use a search engine or visit other sites? No. It only visits the start URLs and links inside the same domain.
Related tools
- Document to Markdown for RAG — PDF, Word, Excel, PowerPoint and HTML files to Markdown with tables and RAG chunks; OCR for scanned pages.
- RSS, Atom & JSON Feed Reader — only new items — read feeds in one format and get only items you have not received before.
- Bulk PageSpeed & Core Web Vitals — PageSpeed Insights for many URLs (your own free key), with alerts when pages get worse.
- Image to Text OCR — text from images with each line, its position and confidence.
- Audio & Video Transcriber — Whisper running locally; text, timestamps, SRT and VTT.
- Merge, Deduplicate & Convert Datasets — merge datasets and CSV/JSON/Excel files, remove duplicates, export to CSV or Excel.
- Website Screenshot & Visual Change Monitor — bulk screenshots (PNG, JPEG, PDF) with optional change detection.
- Bulk Image Converter & Compressor — convert, compress and resize images to WebP, AVIF, JPEG or PNG.
- Sitemap URL Extractor — every URL from a site's sitemaps, with lastmod, images and hreflang.
- SEO Audit Crawler — 0-100 on-page SEO score per page, each issue with severity and fix.