Webpage to Markdown: Clean Text for LLMs and RAG avatar

Webpage to Markdown: Clean Text for LLMs and RAG

Pricing

$1.00 / 1,000 page rows

Go to Apify Store
Webpage to Markdown: Clean Text for LLMs and RAG

Webpage to Markdown: Clean Text for LLMs and RAG

Paste URLs and get the main text of each public page as clean Markdown for LLMs and RAG: title, description, language, headings, lists, links, tables, word count. Menus, footers and cookie banners removed. HTTP only, no browser, robots.txt respected. Failed pages never charged.

Pricing

$1.00 / 1,000 page rows

Rating

0.0

(0)

Developer

Luigi Fiano

Luigi Fiano

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

14 days ago

Last modified

Features

Limited permissions

Share

Paste a list of URLs and get one row per page with its main text as clean Markdown: headings, paragraphs, lists, links, tables, code blocks and quotes, ready for an LLM prompt, a RAG index, an AI agent or a search tool. Menus, header, footer, sidebars, cookie banners, share buttons and scripts are removed.

Each row also has the page title, meta description, language, canonical URL, word count and how many internal and external links the text holds. Pages are read with plain HTTP requests (no browser), so runs are fast and light, and robots.txt is respected by default.

What it is for

  • RAG and chatbots: turn help-center articles, documentation, blog posts or product pages into Markdown you can split by heading and load into a vector database.
  • LLM prompts and AI agents: give a model the clean text of a page instead of raw HTML, with far less noise.
  • Content audits and SEO: title, description, language, canonical URL, word count and link counts for a list of pages, in one table.
  • Change monitoring: schedule the same list and compare the Markdown from run to run.

How it works

  • One request per page: a GET that follows redirects and reads the HTML (up to 5 MB). Nothing else on the page is opened: no scripts, no images, no CSS.
  • robots.txt: read once per site per run. A page it disallows is not requested and goes to the free ERRORS record with the rule that blocks it. When robots.txt answers with a server error, the pages of that site are skipped, as the robots.txt standard (RFC 9309) asks. Turn off respectRobotsTxt only for sites you own or have permission to crawl.
  • Main content: the <main> element when the page has one, else the <article> that holds most of the text, else the whole body without the blocks made only of links. The field contentSource tells which (main, article, body or full page).
  • Markdown: # headings, **bold**, _italic_, nested and numbered lists, links with absolute URLs, GitHub-style tables, fenced code blocks with their language, quotes. Tables used only for layout become plain paragraphs.
  • What it cannot see: text that a page builds with JavaScript after loading (single-page apps). Those pages are reported as no text found in the HTML and are not charged. The parser and the Markdown writer are written for this Actor and handle broken HTML, but a page with a very unusual structure can keep a menu line or lose a box.
  • No personal data: email addresses in the text become [email], phone links become [phone], mailto and tel links are dropped and comment sections are removed.

Input

FieldWhat it doesDefault
urlsOne page URL per line (spaces also separate). https:// is added when missing, duplicates are removed, lines starting with # are commentsrequired
respectRobotsTxtSkip the pages that robots.txt disallowstrue
extractMainContentKeep only the main text; off: the whole body (scripts and hidden elements are still removed)true
includeLinksLinks as [text](url); off: only the link texttrue
includeImagesImages as ![alt](url)false
maxCharactersCut the Markdown of each page after this many characters (0: no limit, hard cap 2,000,000)0
concurrency, timeoutSecs, maxRetriesSpeed and resilience5, 30, 1
maxUrls, maxResultsSafety caps (0: no limit on rows)10000, 0
{
"urls": [
"https://en.wikipedia.org/wiki/Markdown",
"https://www.gnu.org/philosophy/free-sw.html",
"https://example.com"
],
"respectRobotsTxt": true,
"extractMainContent": true
}

Output

One row per page. This row comes from the Actor's own test, on a sample blog page:

{
"type": "page",
"url": "https://www.example.com/blog/pour-over",
"finalUrl": "https://www.example.com/blog/pour-over",
"redirected": false,
"statusCode": 200,
"title": "How to Brew Pour-Over Coffee | Example Coffee Blog",
"description": "A step-by-step pour-over guide: grind, water temperature and timing.",
"language": "en",
"canonicalUrl": "https://www.example.com/blog/pour-over",
"markdown": "# How to brew pour-over coffee\n\nPour-over gives a **clean, bright cup**. You need a dripper, a filter and a [burr grinder](https://www.example.com/shop/grinders).\n\n## Steps\n\n1. Heat the water to 94 °C.\n2. Grind 15 g of coffee, medium-fine.\n3. Pour 250 g of water in three rounds.\n\n| Dose | Water | Time |\n| --- | --- | --- |\n| 15 g | 250 g | 3 min |\n\nMore in the [brewing guide](https://www.example.org/brewing-guide).",
"wordCount": 62,
"characterCount": 418,
"internalLinks": 1,
"externalLinks": 1,
"contentSource": "main",
"markdownTruncated": false,
"htmlBytes": 1046,
"htmlTruncated": false,
"input": "https://www.example.com/blog/pour-over",
"error": null,
"scrapedAt": "2026-11-09T05:00:00.000Z"
}

The sample page also had a cookie banner, a menu with three links and a footer: none of them is in the Markdown.

  • wordCount counts the words of the Markdown without link addresses; hyphenated words count as two.
  • internalLinks and externalLinks count the distinct links of the extracted text (same site, www. or not, versus other sites).
  • markdownTruncated is true when maxCharacters (or the hard cap) cut the text.

Pages that cannot be read (not charged)

A page that does not answer, is blocked, is not HTML, has no text in its HTML or is disallowed by robots.txt never becomes a dataset row, so it costs nothing. It is listed with the reason in the ERRORS record of the key-value store (also in the Output tab):

{ "type": "error", "url": "https://this-domain-does-not-exist-4821.com/page", "input": "https://this-domain-does-not-exist-4821.com/page", "finalUrl": null, "statusCode": null, "error": "request failed: domain not found (DNS)", "scrapedAt": "2026-11-09T05:00:00.000Z" }

Other reasons you can see: disallowed by robots.txt (Disallow: /checkout): the page was not fetched; set respectRobotsTxt to false to skip the check, request failed: timeout, access denied (HTTP 403): the site blocks automated requests or needs a login, nothing was bypassed, blocked by a bot check (Cloudflare, HTTP 403): nothing was bypassed, page not found (HTTP 404), server error (HTTP 503), not an HTML page (application/pdf), no text found in the HTML: the page may need JavaScript to show its content.

Summary

The SUMMARY record has the run totals: pagesChecked, pagesOk, pagesWithError, disallowedByRobotsTxt, rows, words and stoppedEarly.

Pricing

Pay per result: $0.001 per page row in the dataset ($1 per 1,000 pages). Pages that cannot be read, are not HTML or are disallowed by robots.txt are not charged: they go to the free ERRORS record. Use maxResults to cap the cost of a run.

Tips

  • For RAG, split the Markdown on ## headings: each section keeps its own title.
  • Big lists: raise concurrency (up to 20) and the run timeout in the run options; give the run 1 GB of memory at high concurrency. robots.txt is read once per site, however many pages of that site you give.
  • To read a whole site, give its page URLs (for example from its sitemap). This Actor reads the pages you list and does not follow links.

Notes

  • Only public pages: no login, no cookies sent, no proxies, no CAPTCHA solving. Sites that block automated requests are reported, not bypassed.
  • You are responsible for how you use the text you collect (copyright and the terms of each site).
  • Not affiliated with any of the sites you read.