HTML to Markdown Converter for LLM and RAG avatar

HTML to Markdown Converter for LLM and RAG

Pricing

from $0.70 / 1,000 converted pages

Go to Apify Store
HTML to Markdown Converter for LLM and RAG

HTML to Markdown Converter for LLM and RAG

Returns clean Markdown (with title, wordCount and status) for web pages, raw HTML or dataset HTML, for docs, LLMs and RAG: main-content extraction, GFM tables, code languages, absolute links, front matter. Empty input = free demo. Failed pages are free.

Pricing

from $0.70 / 1,000 converted pages

Rating

0.0

(0)

Developer

Actor Factory

Actor Factory

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

Returns clean Markdown, one row per document (source, title, markdown, wordCount, status), from web pages, raw HTML or a dataset of HTML. Built for people who feed documents to an LLM, a RAG pipeline or a docs site and are tired of navigation menus, cookie banners, footers and script junk in their text. No browser, no LLM, no API key.

Try it free: leave input empty and press Start. The demo converts two sample pages and is not charged (rows carry _demo: true).

sourcetitlemarkdown (shortened)wordCountstatus
https://example.com/blog/hello-markdownHello Markdown (sample)# Hello Markdown ... | Plan | Price |24ok
https://example.com/docs/apiAPI reference (sample)# API reference ... a json code block17ok
https://example.com/missing0error (http_404)

What you get

  • Main-content extraction: nav, header, footer, aside, scripts, styles, forms and hidden elements are removed; if the page has <main> or <article>, only that is kept
  • Tables become GitHub-flavored Markdown tables (or plain lines if you turn them off)
  • Code blocks keep their language (```python), read from class="language-...", lang-..., highlight-source-... or data-lang
  • Absolute links and image URLs, resolved against the page URL (javascript: links are removed)
  • Images: dropped (default) or kept as ![alt](src)
  • Front matter with title and url (YAML) if you want it
  • Max characters per document, cut at a paragraph boundary, with a truncated flag
  • Three inputs, mixable in one run: URLs, raw HTML strings, or an Apify dataset (any field name)
  • Works for English and Japanese; wordCount counts words, or characters for Japanese, Chinese and Korean text

Price

$1.00 per 1,000 documents ($0.001 per document converted). 1,000 pages cost $1, 10,000 pages cost $10. On the Apify Free plan, the $5 of monthly platform credit covers about 5,000 pages a month — enough to try it on real data. Only successful conversions are charged. Failed fetches (404, timeout, blocked, too large), empty pages and the demo are free. Set a maximum cost per run to cap spend: when it is reached the run stops cleanly (status Succeeded), and the status message and STATS (stoppedAtChargeLimit: true) say how many inputs were not converted.

Input

{
"urls": ["https://example.com/docs/intro"],
"htmlStrings": ["<main><h1>Hello</h1></main>"],
"baseUrl": "https://example.com",
"datasetId": "<dataset ID of a run that stored HTML>",
"htmlField": "html",
"mainContent": true,
"keepTables": true,
"absoluteLinks": true,
"imageMode": "drop",
"frontMatter": false,
"maxChars": 0
}

Up to 10,000 inputs per run. Leave URLs, HTML and dataset empty for the free demo.

Output (one row per input)

{
"source": "https://example.com/blog/hello-markdown",
"url": "https://example.com/blog/hello-markdown",
"title": "Hello Markdown (sample)",
"markdown": "# Hello Markdown\n\nTurn **web pages** into clean Markdown ...",
"wordCount": 24, "charCount": 312, "truncated": false,
"status": "ok", "error": null
}

status is ok, empty (the page had no text) or error. error holds a short code such as http_404, timeout, dns_failure, page_too_large, blocked_private_address, unsupported_content_type: ..., invalid_url, empty_input or missing_html_field: html. If a page redirected, finalUrl is added. For datasets, source is the item's url (or dataset:<id>#<index>). Counts of ok / empty / error are saved in the key-value store as STATS.

Fetching rules

  • Only http:// and https:// URLs. Redirects are followed (up to 10) and every hop is checked; localhost, private, link-local (cloud metadata) and other internal addresses are refused (blocked_private_address)
  • Pages larger than 5 MB are skipped (page_too_large); only HTML and text content types are converted
  • Polite: at most 2 connections per host and at least 0.2 s between requests to the same host
  • The Actor does not crawl, does not run JavaScript and does not log in. Pages that need JavaScript to show their content return what the server sent; for those, fetch the rendered HTML with a browser-based Actor and pass it in as a dataset

Use cases

  • Prepare documentation for an LLM or a vector database (pair it with a chunker)
  • Archive articles as Markdown with front matter for a static site or knowledge base
  • Clean HTML exported from a CMS or a scraper into readable text
  • Cut every page to a fixed length for prompt budgets

Notes

You are responsible for having the right to fetch and reuse the pages you convert, and for following each site's terms and robots.txt. This Actor fetches only the URLs you list and adds no personal data.

If this Actor saved you time, a rating on the Store helps others find it.

More tools from the same developer