Web Page to Markdown (LLM-ready)
Pricing
from $0.60 / 1,000 converted pages
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 hours ago
Last modified
Categories
Features
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
| Field | Default | What it does |
|---|---|---|
startUrls | (required) | Pages to convert. In sitemap mode, a site URL or a sitemap URL. |
mode | urls | urls: 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). |
maxPages | 50 | Maximum pages fetched in the run, start URLs included (up to 10,000). |
maxDepth | 1 | Crawl mode: how many links away from a start URL to go. |
useReadability | true | Main content only. Turn off to convert the whole body. |
includeSelectors | none | Convert only elements matching these CSS selectors (overrides Readability). |
excludeSelectors | none | Remove these elements first. |
keepLinks | true | Keep links as [text](url); off keeps only the text. |
keepImages | false | Keep images as . |
includeLinks | false | Add a links list with every link on the page. |
maxCharacters | 0 | Cut the Markdown at a word boundary; 0 means no limit. |
chunking | false | Add chunks for RAG. |
chunkSizeTokens | 512 | Approximate maximum tokens per chunk. |
chunkOverlapTokens | 64 | Approximate 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
maxPagesor the charge limit left pages out. The run status andOUTPUTlist them.
If the platform migrates or restarts the run, it resumes from a checkpoint and never charges a delivered page twice.
Legal and responsible use
- 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=noin 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 testruns unit tests and local HTTP-server tests (no internet).npm run test:coverageenforces 80%.npm run healthconverts 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.