URL to Markdown: Web Page to Markdown for LLMs & RAG avatar

URL to Markdown: Web Page to Markdown for LLMs & RAG

Pricing

Pay per event

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

URL to Markdown: Web Page to Markdown for LLMs & RAG

Convert URLs and web pages to clean Markdown or plain text for LLMs, RAG and AI agents. HTML to Markdown with main-content extraction (no menus, ads or footers), or keep the full page. Title, metadata, links and word count per page. Fast HTTP, no browser, robots.txt respected. $0.50 per 1,000 pages.

Pricing

Pay per event

Rating

0.0

(0)

Developer

fecklesspleb

fecklesspleb

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

21 days ago

Last modified

Features

Limited permissions

Share

URL to Markdown: Web Page and Website to Markdown for LLMs & RAG

Convert a list of URLs into clean Markdown or plain text, ready for LLMs, RAG pipelines, AI agents and content analysis. For each page you get the main content as Markdown, with headings, lists, tables and absolute links kept (images dropped), and menus, cookie banners, ads and footers dropped. Each page also comes with its title, meta description, language, canonical URL, published date (when the page declares one) and a word count.

At a glance: $0.50 per 1,000 pages, plus $0.00005 per run start. Pay per result with no subscription. Set a maximum cost per run, export to JSON, CSV or Excel, or call it from the Apify API, Make, Zapier or n8n.

It uses plain HTTP with no browser, so it is fast and cheap. robots.txt is respected (RFC 9309) on every request, including redirects.

What it does

  • URL to Markdown: paste a list of URLs and get one dataset row per page.
  • HTML to Markdown, main content only: boilerplate is removed with trafilatura. If nothing is found, it falls back to the whole page.
  • Website to Markdown: give it the page URLs of a docs site, help center or blog (for example from its sitemap) and get the whole set as Markdown in one run. It converts the URLs you give it and does not crawl links by itself. You can also put the sitemap URL in sitemapUrls: it reads the sitemap (including sitemap index files and .xml.gz files) and converts up to maxSitemapUrls pages listed there (default 100).
  • LLM-ready text: choose text output for plain text, and use maxCharsPerPage to fit a context window.

Use cases

  • Feed documentation, blog posts or help-center pages into a vector database for RAG.
  • Give an AI agent or LLM a clean, token-efficient version of a page instead of raw HTML.
  • Build training or evaluation corpora from a list of URLs you are allowed to use.
  • Monitor content changes on key pages: schedule the Actor and diff the Markdown.
  • Export pages from an old CMS to Markdown for a static site migration.

Input

{
"urls": [{"url": "https://docs.python.org/3/tutorial/appetite.html"}],
"sitemapUrls": [],
"maxSitemapUrls": 100,
"contentMode": "main",
"outputFormat": "markdown",
"includeLinks": true,
"maxCharsPerPage": 0,
"includeRawHtml": false,
"maxConcurrency": 10,
"maxResults": 0
}
FieldDefaultWhat it does
urlsPython tutorial pagePages to convert. Bare domains get https:// added. Every URL here is converted as one page, as before, even a sitemap URL: put sitemaps in sitemapUrls. No longer a required field, so an input with only sitemapUrls is valid; if urls is empty and no sitemap is given, the Python tutorial sample page is converted.
sitemapUrlsemptySitemaps to read. Sitemap index files are followed up to 3 levels deep, .xml.gz files are unpacked and plain-text URL lists work too. Page URLs are taken in sitemap order, at most maxSitemapUrls of them per run (all sitemaps together), and at most 100 sitemap files are read. robots.txt is checked for the sitemap host and for every page. Reading sitemaps is free; only converted pages are charged. If a sitemap gives no page URLs, the dataset gets a free status row (recordType: "status") saying why.
contentModemainmain is main content only (recommended). page is the whole page without nav, header and footer. full is everything.
outputFormatmarkdownmarkdown or text.
includeLinkstrueKeep hyperlinks, made absolute, in main-content Markdown.
maxCharsPerPage0Cut long pages to this many characters. 0 means no limit.
includeRawHtmlfalseAlso store the original HTML. This makes the dataset much larger.
maxConcurrency10 (max 30)Pages fetched in parallel. Requests to the same host are spaced at least 0.5 s apart, or longer if robots.txt sets a crawl delay, so one site runs at about 2 pages per second.
maxSitemapUrls100 (max 10,000)Most page URLs taken from sitemapUrls in one run. This caps what a sitemap can cost: at the default, at most 100 pages × $0.0005 = $0.05 per run from sitemaps. If maxResults is above 0, the lower of the two applies. Has no effect on urls.
maxResults0Stop after this many converted pages. 0 means no cap. Sitemap page URLs are capped by maxSitemapUrls even when this is 0.

Output example

Real output for the URL above, with maxCharsPerPage set to 400:

{
"url": "https://docs.python.org/3/tutorial/appetite.html",
"finalUrl": "https://docs.python.org/3/tutorial/appetite.html",
"statusCode": 200,
"contentType": "text/html",
"title": "1. Whetting Your Appetite — Python 3.15.2 documentation",
"description": "If you do much work on computers, eventually you find that there’s some task you’d like to automate. ...",
"language": "en",
"canonicalUrl": "https://docs.python.org/3/tutorial/appetite.html",
"publishedAt": null,
"markdown": "# 1. Whetting Your Appetite\n\nIf you do much work on computers, eventually you find that there’s some task you’d like to automate. ...",
"wordCount": 75,
"charCount": 400,
"truncated": true,
"error": null,
"fetchedAt": "2026-10-28T03:40:00+00:00"
}

Pages that fail still get a row with error set, and those rows are free. Failures include HTTP errors, timeouts, pages disallowed by robots.txt, and files that are not text. Supported types are HTML, XHTML, plain text, Markdown, JSON and XML. PDFs, images and other binaries return an error row.

Pricing

Pay per converted page: $0.50 per 1,000 pages ($0.0005 per page), plus the standard Apify run start event of $0.00005 per run. Failed pages are not charged. Set Maximum cost per run, or maxResults, and the Actor stops cleanly when the limit is reached. Pages from sitemapUrls are capped by maxSitemapUrls (default 100), so a large sitemap cannot run up an unexpected bill; reading the sitemap files is free.

Use with AI agents / MCP

AI agents can run this Actor as a tool through Apify's MCP server. Add this server URL to your MCP client (Claude, Cursor, VS Code, OpenAI Agents SDK, LangChain and others) and sign in with OAuth, or send your Apify token as Authorization: Bearer <token>:

https://mcp.apify.com?tools=fecklesspleb/url-to-markdown

The tool is named fecklesspleb--url-to-markdown. Agents can also find it with search-actors and run it with call-actor. The run returns a dataset ID; read the rows with get-dataset-items, and pass fields (for example url,title,markdown,error) to keep the response small.

Minimal tool input:

{"urls": [{"url": "https://docs.python.org/3/tutorial/appetite.html"}, {"url": "https://example.invalid/page"}], "maxCharsPerPage": 300}

The output of this input (real rows from a run, description and markdown shortened):

[
{
"url": "https://docs.python.org/3/tutorial/appetite.html",
"finalUrl": "https://docs.python.org/3/tutorial/appetite.html",
"statusCode": 200,
"contentType": "text/html",
"title": "1. Whetting Your Appetite — Python 3.15.2 documentation",
"description": "If you do much work on computers, eventually you find that there’s some task you’d like to automate. ...",
"language": "en",
"canonicalUrl": "https://docs.python.org/3/tutorial/appetite.html",
"publishedAt": null,
"markdown": "# 1. Whetting Your Appetite\n\nIf you do much work on computers, eventually you find ...",
"wordCount": 56,
"charCount": 300,
"truncated": true,
"error": null,
"fetchedAt": "2026-11-03T15:31:18.606861+00:00"
},
{"url": "https://example.invalid/page", "error": "DNS or connection error", "fetchedAt": "2026-11-03T15:31:18.607370+00:00"}
]

Tips for agents:

  • Cost is $0.0005 per converted page; rows with error set are free. Set maxResults, and set maxTotalChargeUsd in the run options (callOptions in call-actor) to cap a run.
  • Check error first: it is null when the page was converted. Failed rows have only url, error, fetchedAt and, when the server answered, finalUrl, statusCode and contentType.
  • Use maxCharsPerPage to fit a context window, and "outputFormat": "text" for plain text (the content is then in text, not markdown).
  • To convert a whole docs site, pass its sitemap in sitemapUrls and set maxSitemapUrls (default 100). A sitemap that gives no page URLs returns a free row with recordType: "status".
  • The RUN_SUMMARY record in the run's key-value store shows pages converted (ok), failed and charged, and how many page URLs came from sitemaps.

Limits

  • No JavaScript rendering. Pages that build their content in the browser, such as some single-page apps, may return little text. Most documentation, blogs, news and marketing sites render on the server and work well.
  • Pages behind a login are not supported.
  • On the Apify platform, URLs and sitemaps whose address is private, loopback or link-local (also after a redirect, and for URLs listed in a sitemap) are not fetched. Their rows are free: error: "not fetched: private, loopback and link-local addresses are not allowed".
  • PDFs and other binary files are not converted.
  • Responses larger than 15 MB are cut.
  • It does not follow links on pages. Give it the list of URLs you want in urls, or a sitemap in sitemapUrls. Pages missing from the sitemap are not found. Sitemap URLs placed in urls are converted as a page, not expanded.
  • If robots.txt cannot be read because the server answers HTTP 429 or 5xx, that host is treated as disallowed and its pages are skipped.

What happens with invalid input? If the input is not a JSON object, or a field has the wrong type (for example a number where a list of URLs is expected, or "abc" for a number), the run fetches nothing and ends with one free status row: Invalid input, nothing was fetched and no results were charged: <reason>. No results are charged for it; the standard Apify start event still applies.

The Actor only fetches the URLs you give it. It identifies itself with its own user agent, spaces requests to each host, and obeys robots.txt. You are responsible for having the right to use the content you convert, in line with each site's terms and copyright. It does not log in or bypass any access control.