Web Page to Markdown (LLM-ready) avatar

Web Page to Markdown (LLM-ready)

Pricing

from $0.60 / 1,000 converted pages

Go to Apify Store
Web Page to Markdown (LLM-ready)

Web Page to Markdown (LLM-ready)

Turn public web pages into clean, LLM-ready Markdown: main content only, GFM tables, word and token counts, heading outline and optional RAG chunks. Plain HTTP, robots.txt obeyed, and you only pay for pages that convert.

Pricing

from $0.60 / 1,000 converted pages

Rating

0.0

(0)

Developer

Black Vikings

Black Vikings

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 hours ago

Last modified

Categories

Features

Limited permissions

Share

Turn public web pages into clean Markdown for LLMs, RAG pipelines and AI agents. The Actor fetches each page over plain HTTP, extracts the main content with Mozilla Readability, and converts it to tidy Markdown with GitHub tables. Each page comes with its title, description, language, word count, approximate token count, heading outline and, if you want, ready-made RAG chunks.

You pay only for pages that convert. Blocked, broken, duplicate and JavaScript-only pages are free.

What you can do with it

  • Feed an LLM. Give it a list of URLs and get back Markdown without menus, footers, cookie banners or scripts.
  • Build a RAG index. Turn on chunking to get paragraph-aligned chunks of a chosen token size, with overlap.
  • Crawl a docs site or blog. Follow same-site links up to a depth, or read the site's XML sitemap.
  • Control the content. Keep only main, article, drop .ads, #comments, keep or drop links and images, cap the length.
  • Detect changes. Each page has a contentHash (SHA-256 of the Markdown); compare it between runs.

Input

FieldDefaultWhat it does
startUrls(required)Pages to convert. In sitemap mode, a site URL or a sitemap URL.
modeurlsurls: only the start URLs. crawl: also follow links on the same site. sitemap: pages listed in the XML sitemaps (robots.txt Sitemap: lines, or /sitemap.xml).
maxPages50Maximum pages fetched in the run, start URLs included (up to 10,000).
maxDepth1Crawl mode: how many links away from a start URL to go.
useReadabilitytrueMain content only. Turn off to convert the whole body.
includeSelectorsnoneConvert only elements matching these CSS selectors (overrides Readability).
excludeSelectorsnoneRemove these elements first.
keepLinkstrueKeep links as [text](url); off keeps only the text.
keepImagesfalseKeep images as ![alt](url).
includeLinksfalseAdd a links list with every link on the page.
maxCharacters0Cut the Markdown at a word boundary; 0 means no limit.
chunkingfalseAdd chunks for RAG.
chunkSizeTokens512Approximate maximum tokens per chunk.
chunkOverlapTokens64Approximate tokens repeated from the previous chunk (kept below half the chunk size).

Example:

{
"startUrls": [{ "url": "https://en.wikipedia.org/wiki/Web_scraping" }],
"mode": "urls",
"chunking": true,
"chunkSizeTokens": 512
}

Output

One dataset item per converted page:

{
"url": "https://en.wikipedia.org/wiki/Web_scraping",
"finalUrl": "https://en.wikipedia.org/wiki/Web_scraping",
"statusCode": 200,
"depth": 0,
"title": "Web scraping",
"description": "For broader coverage of this topic, see Data scraping.",
"language": "en",
"markdown": "# Web scraping\n\n**Web scraping**, **web harvesting**, or **web data extraction** is ...",
"truncated": false,
"originalCharacters": null,
"omittedFields": [],
"wordCount": 4017,
"approxTokens": 10309,
"headings": [{ "level": 1, "text": "Web scraping" }, { "level": 2, "text": "History" }],
"chunks": [{ "index": 0, "text": "# Web scraping\n\n...", "approxTokens": 498 }],
"links": null,
"contentHash": "7a59b715...",
"fetchedAt": "2026-11-24T10:00:00.000Z"
}

Apify stores at most about 9 MB per dataset item. For the rare page whose output would be larger, the Actor drops the links list first, then chunks (they repeat the Markdown), then truncates the Markdown; omittedFields lists what was dropped and originalCharacters gives the full length. The run never fails because of this.

approxTokens estimates tokens at about 4 characters per token, which is close for English text with GPT-style tokenizers; other languages and code may differ. chunks is null unless chunking is on, and links is null unless includeLinks is on.

Every run also saves a summary in the OUTPUT record of the key-value store:

{
"mode": "crawl",
"totals": { "startUrls": 1, "pagesConverted": 29, "pagesFailed": 1, "duplicatesSkipped": 1, "linksSkippedByRobots": 16, "convertedButNotStoredDueToLimit": 0, "pagesNotFetched": 0 },
"failuresByReason": { "needs_browser": 1 },
"failures": [{ "url": "https://example.com/app", "reason": "needs_browser", "message": "Only 2 words without JavaScript; ...", "statusCode": 200 }],
"chargeLimitReached": false
}

Failure reasons (never charged): needs_browser (the content is rendered by JavaScript), no_content, http_error, network_error, not_html, too_large (over 5 MB), blocked_by_robots, private_address, conversion_error, sitemap_error.

Pricing

Pay per event: $1.00 per 1,000 converted pages (event page) on the Free plan, $0.80 on Starter, $0.70 on Scale and $0.60 on Business. Failed pages, pages that need a browser and duplicate pages are free.

You are charged once for each page saved to the dataset. Failed pages, pages blocked by robots.txt, JavaScript-only pages and pages whose Markdown is identical to one already delivered in the run cost nothing. The run respects your maximum charge per run: it stops fetching when the limit is reached, keeps what it saved, and reports the rest in OUTPUT.

When does a run fail?

  • Fails: invalid input, no page could be converted, or the maximum charge does not cover a single page. Nothing is charged.
  • Succeeds with a warning: some pages failed, or maxPages or the charge limit left pages out. The run status and OUTPUT list them.

If the platform migrates or restarts the run, it resumes from a checkpoint and never charges a delivered page twice.

  • You must have the right to use the content you convert. You choose the URLs and are responsible for complying with each site's terms of service, copyright, database rights and privacy law (for example the GDPR). Respect the AI-usage preferences a site publishes, such as Content-Signal: ai-train=no in its robots.txt.
  • The Actor fetches public pages only: no logins, cookies or paywalls, no CAPTCHA solving, no proxies or browser fingerprints to evade blocks.
  • It obeys robots.txt (including Crawl-delay, capped at 10 seconds) and sends an honest User-Agent: web-to-markdown/0.1 (Apify Actor; +https://apify.com/black-vikings/web-to-markdown; obeys robots.txt). If robots.txt cannot be fetched because of a server error, the site is treated as disallowed.
  • Requests to one host are spaced at least 250 ms apart.
  • Private, local and reserved network addresses cannot be fetched, also not through redirects or DNS names that resolve to them.
  • Do not use it to collect personal data about private individuals.

FAQ

Why did a page fail as needs_browser? Without JavaScript it showed fewer than 20 words, and it loads scripts, so its content is most likely built in the browser. This Actor uses plain HTTP to stay fast and cheap; use a browser-based Actor for such pages. You were not charged.

The Markdown misses part of the page. Readability keeps the main article. Turn off useReadability to keep the whole body, or name the parts you want in includeSelectors.

How exact is approxTokens? It is an estimate (characters divided by 4). Use your model's tokenizer when you need exact counts.

Can I crawl a whole website? Yes, with mode: crawl or mode: sitemap, up to 10,000 pages per run. Crawls stay on the start URL's host (www. and the bare domain count as the same site).

Can it read PDFs? No. Links to PDFs, images and other files are skipped in crawls, and such URLs fail as not_html (not charged).

Can I convert pages behind a login? No. Public pages only.

Developer notes

  • npm test runs unit tests and local HTTP-server tests (no internet). npm run test:coverage enforces 80%.
  • npm run health converts stable public pages live (Wikipedia, MDN). A daily GitHub workflow runs it.
  • Stack: Node 22, plain fetch, linkedom + @mozilla/readability, turndown + GFM tables, robots-parser.
  • Pricing is configured in Apify Console: one pay-per-event event named page (mirrored in .actor/pay_per_event.json), with Store discount tiers per plan.