Website to Markdown for AI: RAG-ready chunks
Pricing
from $1.50 / 1,000 page converteds
Website to Markdown for AI: RAG-ready chunks
Give it a website URL, get clean markdown per page plus token counts and overlapping chunks for RAG and vector databases. Reads the sitemap, respects robots.txt. $1.50 per 1,000 pages. Re-runs charge only for new or changed pages.
Pricing
from $1.50 / 1,000 page converteds
Rating
0.0
(0)
Developer
Elio Saliba
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Features
Share
Give it a website URL and get clean markdown for every page, with menus, footers and cookie banners removed, plus a token estimate and overlapping chunks sized for your embedding model. Each chunk carries the section path it sits under.
Built for people feeding documentation, help centres and blogs into a vector database, a chatbot or a fine-tuning set.
$1.50 per 1,000 pages converted. Chunking is included. Re-runs can charge only for pages that are new or changed. Apify's free monthly credit covers a first test at no cost.
What you get
One dataset row per page (or one row per chunk, your choice), plus a SUMMARY record with counts and everything that was skipped.
| Field | Example | What it is for |
|---|---|---|
markdown | # EOQ formula: how to calculate ... | The page body: headings, lists, code blocks, tables, links |
chunks | 4 chunks of about 450 tokens | Ready for embeddings, with headingPath for each one |
title, description, lang, canonical | EOQ Formula and Worked Example | Metadata for filtering and citations |
publishedAt, modifiedAt, author | 2026-11-18 | Read from the page's meta tags and JSON-LD when present |
wordCount, tokenEstimate | 1251, 1760 | Plan your embedding budget before you embed |
contentHash | 8e6658c6... | Detect changes between runs |
changeType | new or changed | Only set when you use re-run mode |
How to use
- Enter a website, for example
https://docs.example.com. The Actor reads the sitemap fromrobots.txtor/sitemap.xml. With no sitemap it follows links from the start page. - Set Max pages. Start with 10 to see the output, then raise it.
- Narrow it down with "Only these URLs", for example
/docs/*, if you want one section of a site. - Press Start. Open the dataset, or call the API from your pipeline.
For a vector database, set Dataset rows to "One row per chunk". Each row is flat: chunkId, url, title, headingPath, text.
Use it from an AI agent
In Claude, ChatGPT or Cursor, add the Apify MCP server (https://mcp.apify.com) and ask in plain words. The agent finds this Actor (opstoolkit/website-to-markdown-rag), fills in the input from your sentence, runs it and reads the result back.
Example prompt: "Read the docs at https://docs.example.com, up to 200 pages, and give me one row per chunk so I can load them into my vector database."
The agent gets flat rows with chunkId, url, title, headingPath and text, or one row per page with markdown and tokenEstimate. A SUMMARY record lists skipped pages and any PDF links found.
Input example
{"startUrls": [{ "url": "https://opstoolkit-816.netlify.app/guides/" }],"maxPages": 10,"includeUrlPatterns": ["/guides/*"],"chunkSize": 512,"chunkOverlap": 64,"outputMode": "pages"}
- Chunk size is in estimated tokens (about 4 characters each, one per CJK character). Paragraphs, lists, code blocks and tables stay whole when they fit. A heading never ends a chunk.
- Chunk overlap repeats the end of the previous chunk, so a sentence keeps its context.
- Only new or changed pages keeps a fingerprint of each page between runs. The next run skips pages that did not change. Skipped pages are not returned and not charged.
- Keep images and Keep links control what the markdown contains. Images are off by default.
- Main content selector and Remove these elements are for the odd site where automatic detection picks the wrong block.
Output example
From a real run on a public site (shortened):
{"url": "https://opstoolkit-816.netlify.app/guides/eoq-formula-example","title": "EOQ Formula and Worked Example | OpsToolkit","lang": "en","publishedAt": "2026-11-18","changeType": "new","wordCount": 1251,"tokenEstimate": 1760,"headings": ["EOQ formula: how to calculate economic order quantity, with a worked example", "The EOQ formula", "Worked example: a coffee supplier"],"markdown": "# EOQ formula: how to calculate economic order quantity, with a worked example\n\nEconomic order quantity (EOQ) tells you how many units to buy per order ...","chunkCount": 4,"chunks": [{"chunkId": "52bb759a10-1","index": 1,"tokenEstimate": 444,"headingPath": ["EOQ formula: how to calculate economic order quantity, with a worked example", "Worked example: a coffee supplier", "Step 3: the yearly costs"],"text": "Orders per year = D / EOQ = 4,800 / 464.76 = 10.33 ...\n\n### Step 3: the yearly costs\n\n| Cost per year | Formula | Amount |\n| --- | --- | --- |\n| Ordering | D / Q × S | $464.76 |"}]}
A 40-page run on a small site produced 155 chunks (about 61,000 tokens) in 17 seconds, on 512 MB. The SUMMARY record from a 5-page run:
{"pagesConverted": 5,"pagesFetched": 5,"chunks": 19,"tokensEstimated": 7713,"unchangedPagesSkipped": 0,"skippedByReason": {},"failedPages": 0,"failed": [],"documentLinks": []}
skippedByReason counts pages that were left out (too_short, duplicate, robots_txt, not_html, left_site), and skipped lists each URL. documentLinks lists the PDF and Word files the site links to. Feed them to the companion Actor, Document to Markdown for AI.
What it removes
Navigation, headers and footers, sidebars, breadcrumbs, cookie and consent banners, newsletter pop-ups, share buttons, "related posts" blocks, hidden elements, scripts and styles. It finds the main content from <main>, <article> or common content containers, and falls back to a readability score when a page has none.
Use cases
- Support bots: load a help centre and refresh it every week, paying only for pages that changed.
- Documentation search: one chunk per section, each with its heading path for citations.
- Fine-tuning and evaluation sets: clean text with source URL and date on every row.
- Competitor and market research: read a site's public pages into your own notes tool.
Pricing
Pay per event: $1.50 per 1,000 pages converted ($0.0015 per page). Chunking, token counts and metadata are included. Apify adds a small fee for each run start.
| Site size | Cost |
|---|---|
| 100 pages | $0.15 |
| 1,000 pages | $1.50 |
| 10,000 pages | $15 |
- Pages that fail, are blocked by robots.txt, are too short, are duplicates or (in re-run mode) did not change are free.
- Set Max pages, or a maximum cost per run in Apify, to cap what a run can spend.
Compared with other options. Website Content Crawler by Apify charges for platform usage, which Apify's own page puts at about $0.20 per 1,000 pages for plain HTTP and $0.50 to $5 for a browser, so the cost depends on the site. Other pay-per-result crawlers on the Store charge about $3 per 1,000 pages. On plain HTML sites its usage cost can be lower than $1.50. What this Actor adds is a flat price you can budget, chunks with heading paths already made, and a re-run mode that bills only for changes. It reads plain HTML only. For sites that need a browser to show their content, use Website Content Crawler.
How it treats other people's servers
- It follows robots.txt, including
Crawl-delay(up to 10 seconds). Disallowed pages are skipped. - It sends at most one request every 250 ms to a site, with 5 pages in flight. Both are settings.
- It stays on the site you gave it. Links to other domains are not followed.
- It refuses addresses on private networks, so it cannot be pointed at internal services.
Limits
- It reads the HTML the server sends. Content added later by JavaScript (many single-page apps) is not seen. Pages with almost no text are skipped and listed.
- Pages behind a login are not supported.
- Token counts are estimates, usually within 10 to 15 percent of OpenAI tokenizers on English text. Use them to size chunks and budgets, not to bill.
- Up to 50,000 pages and 20 start URLs per run. Pages over 5 MB are cut at 5 MB.
- PDF and Word files linked from a page are listed in
SUMMARY, not converted here.
Using the output
LangChain, from the chunk rows:
from apify_client import ApifyClientfrom langchain_core.documents import Documentclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("opstoolkit/website-to-markdown-rag").call(run_input={"startUrls": [{"url": "https://docs.example.com"}],"outputMode": "chunks","maxPages": 200,})docs = [Document(page_content=row["text"],metadata={"source": row["url"], "title": row["title"], "section": " > ".join(row["headingPath"])})for row in client.dataset(run["defaultDatasetId"]).iterate_items()]
LlamaIndex:
from llama_index.core import Document, VectorStoreIndexnodes = [Document(text=row["text"], metadata={"url": row["url"], "title": row["title"]})for row in client.dataset(run["defaultDatasetId"]).iterate_items()]index = VectorStoreIndex.from_documents(nodes)
Keeping a vector database fresh. Schedule the Actor weekly with "Only new or changed pages" on. Each run returns only new and changed pages. Delete the old vectors for a returned url before you insert the new ones. SUMMARY.sites[].removedSinceLastRun lists pages that now return 404 or disappeared from a complete crawl.
Everything Apify supports works here: schedules, webhooks, the REST API, and the integrations with Zapier, Make, n8n, Pinecone, Qdrant and others. The API tab has ready code for JavaScript, Python and cURL.
Works well with
- Document to Markdown for AI:
SUMMARY.documentLinkslists the PDF and Word files the site links to. Pass those links to it indocumentUrlsto get the same markdown and chunks for the files. - Image and Scanned PDF OCR: if one of those PDFs is a scan with no text layer, Document to Markdown reports it as failed and does not charge. Send the link to OCR instead.
- AI Structured Extractor: when you want fields (price, plan name, date) instead of prose, give it this run's dataset with
datasetIdandfieldset tomarkdown(use One row per page). - Sitemap URL Extractor: list a site's URLs first to see its sections, then write Only these URLs patterns and a sensible Max pages.
A typical chain: this Actor for pages, AI Structured Extractor for records, then Dataset Cleaner to remove duplicates and normalize prices, dates and phones.
FAQ
Can I crawl any website? Any public site that allows it in robots.txt. Check the site's terms for how you may use the content.
Why was a page skipped?
Open SUMMARY. Each skipped page has a reason: robots_txt, too_short, duplicate, not_html or left_site. Failed pages list the HTTP status or the error.
The text of my page is missing. The page probably builds its content with JavaScript. Check the source with "view page source". If the text is not there, this Actor cannot see it.
Can it follow only some sections?
Yes. Use "Only these URLs" (/docs/*) and "Skip these URLs" (/docs/archive/*). Patterns that start with / match the path. Other patterns match the whole URL, with * as a wildcard.
Something broke. Open an issue on the Issues tab with the run link. I reply within a day.