Web Page to Markdown: Clean Text for LLMs & RAG avatar

Web Page to Markdown: Clean Text for LLMs & RAG

Pricing

from $0.20 / 1,000 page converteds

Go to Apify Store
Web Page to Markdown: Clean Text for LLMs & RAG

Web Page to Markdown: Clean Text for LLMs & RAG

Turn web pages into clean Markdown and text for LLMs, RAG and search, from a list of links, sitemaps or a same-site crawl. Main content only, optional token chunks, changed-pages-only monitoring. Plain HTTP, robots.txt respected.

Pricing

from $0.20 / 1,000 page converteds

Rating

0.0

(0)

Developer

Public Data Tools

Public Data Tools

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

17 days ago

Last modified

Categories

Features

Limited permissions

Share

Turn web pages into clean Markdown and plain text for LLM context, RAG pipelines, embeddings, search indexes and content migration. Give it a list of links, a sitemap, or a start page for a small crawl of the same site. You get one row per page with the main content, its title, dates, language, canonical address, links, word and token counts, and optional token-sized chunks.

  • 🧹 Main content only: navigation, headers, footers, sidebars, cookie banners and ads are removed with Mozilla's Readability (the engine of Firefox Reader View). Headings, lists, tables, code blocks, links and images are kept, each one optional.
  • 🔗 Three ways in: a list of links (up to 10,000), sitemaps, or a same-site crawl with page, depth and pattern limits.
  • 🧩 Chunks for RAG: split each page into chunks of N tokens with an overlap, on paragraph, list, table and code boundaries. Each chunk carries the headings it sits under.
  • 🔔 Changed pages only: schedule it with a monitor ID and get only pages whose content changed. Unchanged pages are free.
  • 🤖 Polite plain HTTP: robots.txt and its Crawl-delay are always respected, the user agent says who it is, and sites that refuse are left alone. No browser, so runs are fast and cheap.
  • 💸 $0.20 per 1,000 pages, one flat price. Failed, blocked, empty, duplicate and unchanged pages are free.

Try it: the input comes pre-filled with three Wikipedia articles. Click Start; the run takes a few seconds. Then put in your own pages.

What you get

One row per address. The status says what happened; only ok rows are charged.

StatusWhat it isCharged
okA page converted to Markdown (and plain text)Yes
no-contentFewer words than your minimum, e.g. a page built with JavaScript in the browserFree
not-htmlA PDF, image or other fileFree
errorThe server answered 4xx or 5xxFree
failedNo answer (time-out, a domain that doesn't exist)Free
blockedA bot check, a refusal (HTTP 401/403) or HTTP 429Free
disallowedrobots.txt doesn't allow it; not fetchedFree
skippedA private or internal address, or a redirect off the crawled siteFree
duplicateThe same page as one already delivered (same canonical address or same content)Free

For every converted page:

DataWhat's in it
Contentmarkdown, text, wordCount, tokenEstimate (about 4 characters per token), and chunks when you ask for them
Page factstitle, metaDescription, language, canonicalUrl, publishedAt and modifiedAt when the page states them, author, siteName
Crediturl, finalUrl, fetchedAt, and licenceUrl / licenceName when the page marks up a licence (Wikipedia's CC BY-SA, the UK's Open Government Licence)
Linkslinks (every link on the page, absolute, once each) and linkCount
Fetch detailsstatusCode, redirects, contentType, sizeBytes, httpLastModified, metaRobots, foundVia (list, sitemap, start or link), depth
Changeswith a monitor ID: changeStatus (new, changed, gone), previousCheckedAt, previousContentHash, and contentHash on every page

Plain-text and Markdown files (.txt, .md, such as GitHub raw READMEs) are passed through as they are.

Who it's for

  • AI and RAG builders: feed documentation, help centres and knowledge bases to an LLM or a vector database, already chunked, and re-embed only what changed.
  • Search and data teams: index the text of a set of pages with their titles, dates and languages.
  • Content migration: move a blog or docs site to Markdown files (Hugo, Astro, Docusaurus, GitBook, Notion imports).
  • Researchers and analysts: a clean corpus of articles with word counts and dates.
  • Agent developers: a cheap, fast "read this page" step for agents through the Apify API or MCP.

How much does it cost?

  • $0.20 per 1,000 pages ($0.0002 per converted page), plus Apify's standard run start fee. Platform usage is included.
  • With monitoring: $1 per 1,000 changed pages ($0.001 each). Pages new to the monitor cost the ordinary $0.0002. Unchanged pages are free; the price of a changed page covers checking the unchanged ones.
ExamplePagesCost
The pre-filled example: 3 Wikipedia articles3$0.0006
200 documentation pages from a sitemap200$0.04
Any 10,000 pages10,000$2
A daily monitor of 1,000 pages where 20 changed20 changed$0.02 a day

Free: everything that isn't a converted page (see the table above), and unchanged pages in monitor runs.

Set a maximum cost per run in the run options; the run stops cleanly at that amount.

How to use it

  1. Choose the pages:
    • Pages: a list of links;
    • Sitemaps: e.g. https://example.com/sitemap.xml;
    • Crawl from these pages: start pages whose links are followed within the same site.
  2. Set the limits: Maximum pages (100 by default), and for crawls Link depth, Only addresses matching and Skip addresses matching (for example /docs/* or /tag/*).
  3. Choose the content:
    • Main content (default) or Whole page without navigation and boilerplate;
    • optional CSS selectors to keep or remove;
    • which elements to keep (links, images, tables, headings, lists, code).
  4. For RAG, set a Chunk size in tokens (e.g. 500) and an overlap (50 by default).
  5. For updates, add a Monitor ID and schedule the Actor, e.g. daily. Each run delivers only new and changed pages.
  6. Click Start. The Pages view lists every address with its status, words, tokens, dates and licence; Markdown shows the content. Export as JSON, CSV or Excel. The RUN_SUMMARY record in the key-value store has counts, robots.txt results, sitemaps and monitoring details.

Example input

A small docs crawl, chunked for RAG:

{
"startUrls": ["https://crawlee.dev/js/docs/quick-start"],
"includePatterns": ["https://crawlee.dev/js/docs/*"],
"maxPages": 100,
"chunkSize": 500,
"chunkOverlap": 50
}

Part of a sitemap, checked daily for changes (schedule this input):

{
"sitemapUrls": ["https://docs.apify.com/sitemap.xml"],
"includePatterns": ["https://docs.apify.com/platform/*"],
"maxPages": 500,
"includeLinkList": false,
"monitorId": "apify-platform-docs"
}

A list of pages, main text only, no links or images:

{
"urls": ["https://en.wikipedia.org/wiki/Markdown", "https://www.gov.uk/government/publications/open-standards-principles/open-standards-principles"],
"keepLinks": false,
"keepImages": false
}

Example output

A real row from a test run on Apify (4 November 2026), shortened:

{
"url": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
"finalUrl": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
"status": "ok",
"statusCode": 200,
"title": "Retrieval-augmented generation - Wikipedia",
"language": "en",
"canonicalUrl": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
"publishedAt": "2023-11-05T13:19:20.000Z",
"modifiedAt": "2026-10-29T19:06:20.000Z",
"author": "Contributors to Wikimedia projects",
"licenceUrl": "https://creativecommons.org/licenses/by-sa/4.0/deed.en",
"licenceName": "CC BY-SA 4.0",
"markdown": "# Retrieval-augmented generation\n\nFrom Wikipedia, the free encyclopedia\n\n**Retrieval-augmented generation** (**RAG**) is a technique that enables [large language models](https://en.wikipedia.org/wiki/Large_language_model) (LLMs) to retrieve and incorporate new information from external data sources.\\[1\\]\\[2\\] …",
"text": "Retrieval-augmented generation\n\nFrom Wikipedia, the free encyclopedia\n\nRetrieval-augmented generation (RAG) is a technique that enables large language models (LLMs) to retrieve …",
"wordCount": 2302,
"tokenEstimate": 5499,
"linkCount": 543,
"contentMode": "article",
"contentHash": "4fb71e34c36f728b7edfa3eb4575799a",
"foundVia": "list",
"sizeBytes": 253604,
"httpLastModified": "2026-11-01T06:29:42.000Z",
"fetchedAt": "2026-11-03T20:58:47.257Z"
}

With a chunk size, each page also has chunks. A real one from crawlee.dev, shortened:

{ "index": 1, "headings": ["Quick Start | Crawlee for JavaScript · Build reliable crawlers. Fast.", "Choose your crawler", "PuppeteerCrawler"], "tokenEstimate": 263, "text": "It's very fast and efficient, but can't handle JavaScript rendering.\n\n### PuppeteerCrawler\n\nThis crawler uses a headless browser to crawl …" }

How the content is taken

  • Main content: Mozilla's Readability picks the article or main text. A page that isn't a clear article (a home page, a product list) falls back to the whole page without its furniture. Whole page mode always uses that.
  • Always removed: scripts, styles, hidden elements, cookie and consent banners (common consent tools and names like cookie-banner), and ad slots. An element that holds the main content is never removed by these rules.
  • Tables become Markdown tables. Merged cells become empty cells; a table inside a cell becomes text.
  • Code blocks keep their language when the page names it (language-js, brush: html).
  • Links and images get absolute addresses. Links to a spot on the same page (section anchors, footnote markers) keep only their text.
  • Redirects are followed hop by hop, each one checked against robots.txt. A "Redirecting…" page with a quick meta refresh is followed too.
  • Crawls follow links within the same site (www and non-www count as one; subdomains optional), nearest pages first. They skip links to files (PDFs, images, archives) and don't follow links on pages marked nofollow. Tracking parameters (utm_*, gclid…) and #fragments don't make new pages.
  • No browser: the Actor reads the HTML the server sends. Pages built only with JavaScript in the browser come back as no-content, free, with a reason saying so.

How monitoring works

Give a Monitor ID and schedule the Actor:

  • the first run delivers every page, marked changeStatus: "new";
  • later runs ask each server whether the page changed (ETag, Last-Modified). A page the server says is unchanged isn't downloaded again;
  • a page that does come back is compared by its converted Markdown, so ads, dates in footers and tracking codes don't count as changes;
  • only new and changed pages are delivered, plus gone rows (free) for pages that turned into errors;
  • unchanged pages aren't delivered and aren't charged;
  • RUN_SUMMARY counts unchanged pages and lists pages the last run saw that this one didn't reach;
  • changing the content settings (mode, selectors, kept elements) makes every page count as changed once;
  • pages not seen for 60 days are forgotten.

Integrations

  • Apify API: start a run and get the pages back as JSON in one call:

    curl -X POST "https://api.apify.com/v2/acts/subtleasianmerch~web-page-to-markdown/run-sync-get-dataset-items?token=YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"urls": ["https://en.wikipedia.org/wiki/Markdown"], "chunkSize": 500}'

    Replace YOUR_TOKEN with your Apify API token. To get one record per chunk, read the dataset with &unwind=chunks.

  • LangChain, LlamaIndex and vector databases: load the dataset with Apify's loaders (ApifyDatasetLoader), or send it to Pinecone or Qdrant with Apify's integration Actors.

  • Schedules and webhooks: run it daily with a monitor ID, and call your own endpoint when a run finishes.

  • Make, Zapier and n8n: pass new and changed pages to a database, a CMS or Slack.

  • MCP: AI agents can call it through Apify's MCP server.

FAQ

The content belongs to the pages' owners, not to this Actor or to you.

  • Your responsibility: you need the right to use the pages you convert, for example your own site, pages under an open licence such as Wikipedia's CC BY-SA (which asks for credit and share-alike), or a use the law allows where you are. Each row carries the page address, the fetch time and, when the page states one, its licence.
  • What the Actor does: it respects robots.txt, names itself honestly, keeps a gentle pace, and doesn't get past logins, paywalls, bot checks or other blocks.
  • Personal data: pages may hold names and other personal data; if you process them, data protection law (such as the GDPR) applies to you.

This isn't legal advice.

Which pages work?

Public pages that send their content as HTML: articles, documentation, blogs, help centres, government and reference pages. Pages behind a login and sites that block crawlers can't be converted; they're listed free. Pages built only with JavaScript in the browser (some single-page apps) show little content to plain HTTP and come back as no-content.

How does it treat robots.txt?

It reads each site's robots.txt before the first request and follows the rules for web-page-to-markdown (or *), for every address including redirects and the pages you list yourself.

  • Crawl-delay: honoured up to 60 seconds; a site that asks for more isn't read.
  • A robots.txt that can't be read (the server answers 5xx) means the site is treated as closed, as the robots.txt standard says.
  • The user agent: web-page-to-markdown/0.1 (Apify Actor bot; +https://apify.com/subtleasianmerch/web-page-to-markdown).

How fast is it?

One request at a time per site, at least 250 ms apart (you can choose 100 ms to 60 s), and up to 6 sites side by side.

  • In tests on Apify: 3 Wikipedia articles in 3 seconds; 201 documentation pages from one site in about 4 minutes; 89 docs pages from a crawl in 84 seconds.
  • Larger runs: for big sites, raise the run's timeout under Run options. The run stops about 45 seconds before its time limit and keeps what it delivered.

How accurate is the token estimate?

It's rough: about 4 characters per token for English and other alphabetic text, one per Chinese, Japanese or Korean character. Real tokenizers differ by model. Use it for budgeting and chunk sizes, not billing.

What about very long pages?

Pages over 5 MB of HTML are read up to 5 MB. Markdown and text over 1,000,000 characters are cut, and the row says truncated: true.

More Actors from the same developer:

ActorUse it to
Website Screenshot APIcapture pages as images or PDFs in a real browser, including pages built with JavaScript
Career Site Jobs Monitorget job openings from company career sites, with a change feed
Bluesky Scrapercollect public Bluesky posts and profiles for analysis or a corpus

Questions, bugs or ideas? Open an issue on this Actor's Issues tab.