# Website to Markdown Crawler for RAG & LLMs (Fast, No Browser) (`datadesk-io/website-to-markdown-crawler`) Actor

Crawl any website and get clean Markdown and text per page for RAG, AI agents and LLM fine-tuning. Menus, footers, cookie banners and ads removed; optional RAG chunks, token estimate, headings and metadata. Plain HTTP, no browser, respects robots.txt. $1 per 1,000 pages.

- **URL**: https://apify.com/datadesk-io/website-to-markdown-crawler.md
- **Developed by:** [DataDesk](https://apify.com/datadesk-io) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 pages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Website to Markdown Crawler for RAG & LLMs (Fast, No Browser)

Crawl any website, docs portal or blog and get **clean Markdown and plain text for every page**, ready for **RAG pipelines, AI agents, custom GPTs, vector databases and LLM fine-tuning**. Menus, headers, footers, sidebars, cookie banners, share buttons and ads are removed; headings, lists, links, tables and code blocks are kept. Optional **RAG chunks with overlap**, **token estimate**, headings outline, metadata and a content hash to detect changes. Plain HTTP (no browser), so it is **fast and cheap**: **$1 per 1,000 pages**. Respects robots.txt.

### Try it now (one click)

1. Click **Start**. The prefilled input crawls 10 pages of the Python tutorial. In our latest check (Nov 17, 2026) it returned **10 pages in about 2 seconds**. An empty input runs a small demo too.
2. Paste your start URL(s), set max pages and crawl scope, and (optional) a chunk size for RAG.
3. Download the results as CSV, Excel or JSON, or get them via API, webhooks, Make or Zapier.

**Price example:** 100 pages = **$0.105**, 1,000 pages = **$1.005** ($1.00 per 1,000 pages + $0.005 per run). Silver and Gold plan users pay 10% and 20% less per page. Apify's free plan includes $5 of usage every month, enough for about 4,995 pages. Runs that find nothing are not charged.

#### Sample of real results

*Real rows from a local test run on Nov 17, 2026 (some columns). Each page also includes the other fields listed below.*

| URL | Title | Words | Tokens | Depth |
|---|---|---|---|---|
| https://docs.python.org/3/tutorial/index.html | The Python Tutorial — Python 3.15.2 documentat… | 897 | 1542 | 0 |
| https://docs.python.org/3/tutorial/appetite.ht… | 1. Whetting Your Appetite — Python 3.15.2 docu… | 736 | 1104 | 1 |
| https://docs.python.org/3/tutorial/interpreter… | 2. Using the Python Interpreter — Python 3.15.… | 946 | 1394 | 1 |
| https://docs.python.org/3/tutorial/introductio… | 3. An Informal Introduction to Python — Python… | 3224 | 4177 | 1 |

### What you get

| Field group | Fields |
|---|---|
| Content | clean Markdown, plain text, headings outline, optional RAG chunks, optional raw HTML |
| Metadata | title, H1, meta description, language, canonical URL, noindex flag |
| Stats | word count, LLM token estimate, content hash |
| Crawl | URL, loaded URL, HTTP status, link depth, crawl time |

### Why this Actor

- **Built for LLMs:** only the main content, in Markdown that keeps structure (headings, lists, tables, code).
- **RAG-ready:** set a chunk size and get overlapping chunks per page, plus a token estimate for cost planning.
- **Fast and cheap:** no headless browser, so hundreds of pages per minute at $1 per 1,000 pages (browser-based crawlers cost much more compute).
- **Stays on topic:** crawl only the start folder (e.g. /docs/), the whole domain, or just the URLs you paste (bulk URL to Markdown).
- **Polite:** respects robots.txt, honest user agent fallback, duplicate and redirect pages are saved once.

### How to use it

1. Click **Try for free** (or **Start**): the prefilled input runs a quick test.
2. Paste your start URL(s), set max pages and crawl scope, and (optional) a chunk size for RAG.
3. Click **Start** and wait a few seconds.
4. Open the **Output** tab and export as **JSON, CSV, Excel, XML or HTML**, or read the dataset via API.

### Input examples

**Crawl a docs section (prefill):**

```json
{"startUrls": [{"url": "https://docs.python.org/3/tutorial/index.html"}], "maxPages": 10}
```

**Whole docs site with RAG chunks:**

```json
{"startUrls": [{"url": "https://docs.apify.com/platform"}], "maxPages": 500, "crawlScope": "domain", "chunkSize": 2000, "chunkOverlap": 200}
```

**Bulk URL to Markdown (no crawling):**

```json
{"startUrls": [{"url": "https://en.wikipedia.org/wiki/Web_scraping"}, {"url": "https://stripe.com/pricing"}], "crawlScope": "single"}
```

**Only blog posts, skip tags:**

```json
{"startUrls": [{"url": "https://blog.example.com/"}], "includeUrlPatterns": ["/blog/"], "excludeUrlPatterns": ["/tag/", "/page/"], "maxPages": 200}
```

#### Input fields

| Field | Type | Description |
|---|---|---|
| `startUrls` | array | Pages where the crawl starts (a homepage, a docs section, a blog). Links found on them are followed within the crawl scope. Empty input = a 10-page demo of the Python tutorial. |
| `maxPages` | integer | Hard cap on pages saved in this run (and on cost). The crawl stops as soon as it is reached. |
| `crawlScope` | string | Which links to follow. 'Same folder' keeps https://site.com/docs/ crawls inside /docs/. 'Only the start URLs' turns the Actor into a bulk URL-to-Markdown converter. |
| `maxDepth` | integer | How many clicks away from a start URL the crawler may go (0 = start URLs only). |
| `includeUrlPatterns` | array | Only follow URLs matching at least one of these regular expressions (e.g. /blog/). Empty = all URLs in scope. |
| `excludeUrlPatterns` | array | Never follow URLs matching any of these regular expressions (e.g. /tag/, ?page=, /login). |
| `chunkSize` | integer | If set (e.g. 2000), each page also gets a 'chunks' array of Markdown pieces split on paragraph boundaries, ready for embeddings and vector databases. 0 = no chunks. |
| `chunkOverlap` | integer | Characters repeated between consecutive chunks so context is not lost at the borders. Only used when chunk size > 0. |
| `keepNavigationAndFooter` | boolean | Off (recommended): nav, header, footer, sidebars, cookie banners, share buttons and ads are removed so only the main content remains. On: keep the whole page body. |
| `removeSelectors` | string | Comma-separated CSS selectors removed before conversion (e.g. .promo, #feedback-widget). |
| `respectRobotsTxt` | boolean | Skip URLs disallowed by the site's robots.txt (recommended). |
| `saveHtml` | boolean | Add the raw HTML of each page to the output (bigger dataset). |
| `maxConcurrency` | integer | Pages fetched in parallel. Lower it for small or slow sites. |

### Output example

*Example record from a local test run (long lists shortened).*

```json
{
  "url": "https://docs.apify.com/actors",
  "loadedUrl": "https://docs.apify.com/actors",
  "statusCode": 200,
  "depth": 1,
  "title": "Actors | Platform | Apify Documentation",
  "h1": "Actors",
  "description": "Learn how to develop, run and share serverless cloud programs. Create your own web scraping and automation tools and publish them on the Apify platform.",
  "language": "en",
  "canonicalUrl": "https://docs.apify.com/actors",
  "headings": [
    "Actors"
  ],
  "markdown": "# Actors\n\nActors are serverless cloud programs that take a structured JSON input, perform a task (web scraping, browser automation, data processing, and more), and optionally produce a structured output. Run them manually in [Apify Console](https://console.apify.com/actors), through the [API](/api) …",
  "text": "Actors\nActors are serverless cloud programs that take a structured JSON input, perform a task (web scraping, browser automation, data processing, and more), and optionally produce a structured output.…",
  "wordCount": 364,
  "tokenEstimate": 549,
  "chunks": [
    "# Actors\n\nActors are serverless cloud programs that take a structured JSON input, perform a task (web scraping, browser …",
    "Actor does, enter required inputs in the user interface or API, and integrate results into other workflows. Actors can c…"
  ],
  "noindex": false,
  "contentHash": "77f6887f7cf184e9",
  "crawledAt": "2026-11-17T23:25:26.091832+00:00",
  "scrapedAt": "2026-11-17T23:25:26.219986+00:00",
  "isNew": false
}
```

#### Output fields

| Field | Description |
|---|---|
| `url` | Page URL (normalized, without #fragment). |
| `loadedUrl` | URL after redirects. |
| `statusCode` | HTTP status code. |
| `depth` | Clicks away from the start URL (0 = start URL). |
| `title` | HTML title of the page. |
| `h1` | First H1 heading of the main content. |
| `description` | Meta description (or og:description). |
| `language` | Page language from the html lang attribute. |
| `canonicalUrl` | Canonical URL declared by the page. |
| `headings` | H1-H3 headings of the main content (outline). |
| `markdown` | Main content converted to clean Markdown (headings, lists, links, tables, code), menus/footers/banners removed. |
| `text` | Main content as plain text. |
| `wordCount` | Number of words in the main content. |
| `tokenEstimate` | Rough LLM token estimate (characters / 4). |
| `chunks` | Markdown split into chunks of the chosen size (only when chunk size > 0). |
| `noindex` | True if the page has a robots noindex meta tag. |
| `contentHash` | Hash of the text, to detect changed pages between runs. |
| `html` | Raw HTML (only when "Also save raw HTML" is on). |
| `crawledAt` | When the page was fetched (ISO 8601 UTC). |
| `scrapedAt` | When the row was saved (ISO 8601 UTC). |
| `isNew` | Internal flag (always false here). |

### Pricing

Pay-per-event: **$0.005** once per run that saves results + **$0.001 per page** ($1.00 / 1,000). Runs that save nothing are not charged.

| Pages saved | Approx. cost |
|---|---|
| 20 | $0.025 |
| 100 | $0.105 |
| 1,000 | $1.005 |
| 10,000 | $10.005 |

### Use cases

- Feed a company knowledge base or documentation into a RAG chatbot / custom GPT
- Give AI agents clean page content instead of raw HTML
- Build training and evaluation datasets for LLMs
- Monitor docs or competitor pages for changes (content hash)
- Migrate website content to Markdown (Notion, Obsidian, static sites)

### Integrations / API

Works with the Apify API, Schedules, webhooks, Make, Zapier, n8n and MCP. Example:

```bash
curl "https://api.apify.com/v2/acts/datadesk-io~website-to-markdown-crawler/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"startUrls": [{"url": "https://docs.python.org/3/tutorial/index.html"}], "maxPages": 10}'
```

Python:

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("datadesk-io/website-to-markdown-crawler").call(run_input={"startUrls": [{"url": "https://docs.python.org/3/tutorial/index.html"}], "maxPages": 10})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### MCP

Use this Actor from an MCP client (Cursor, Claude Desktop, etc.) through the Apify MCP server (`datadesk-io/website-to-markdown-crawler`).

### FAQ

**Does it render JavaScript?** No. It reads the HTML the server sends, which works for most docs, blogs, news and marketing sites. Pure client-side apps (empty HTML until JavaScript runs) will return little text; for those use a browser-based crawler.

**How do I use the chunks?** Set chunk size (e.g. 2000 characters) and each row gets a chunks array. Embed each chunk and store it with the page URL and title as metadata.

**Will it crawl the whole internet?** No. It follows links only inside the scope you choose (same folder, same host or domain) and stops at max pages.

**What does an empty input do?** It crawls 10 pages of the Python tutorial so you can see the output right away.

**Am I charged for errors?** No. Only saved pages are charged; the start fee only when at least one page is saved.

### Limitations

- No JavaScript rendering (plain HTTP).
- Sites behind logins or strong anti-bot protection are not supported.
- PDFs and images are skipped.

### Start now

Click **Start** to run the prefilled example, then adjust the input. Missing a field or filter? Open an issue on the **Issues** tab and tell us what you need.

### Support

Questions, bugs or a missing field? Email **datadesk.io@proton.me** or open an issue on the Actor page.

***

**ES:** Rastrea sitios web y obtén Markdown limpio por página para RAG y LLMs (sin menús ni banners, chunks opcionales). $1 por 1.000 páginas.
**PT:** Rastreie sites e obtenha Markdown limpo por página para RAG e LLMs (sem menus nem banners, chunks opcionais). US$1 por 1.000 páginas.

# Actor input Schema

## `startUrls` (type: `array`):

Pages where the crawl starts (a homepage, a docs section, a blog). Links found on them are followed within the crawl scope. Empty input = a 10-page demo of the Python tutorial.

## `maxPages` (type: `integer`):

Hard cap on pages saved in this run (and on cost). The crawl stops as soon as it is reached.

## `crawlScope` (type: `string`):

Which links to follow. 'Same folder' keeps https://site.com/docs/ crawls inside /docs/. 'Only the start URLs' turns the Actor into a bulk URL-to-Markdown converter.

## `maxDepth` (type: `integer`):

How many clicks away from a start URL the crawler may go (0 = start URLs only).

## `includeUrlPatterns` (type: `array`):

Only follow URLs matching at least one of these regular expressions (e.g. /blog/). Empty = all URLs in scope.

## `excludeUrlPatterns` (type: `array`):

Never follow URLs matching any of these regular expressions (e.g. /tag/, ?page=, /login).

## `chunkSize` (type: `integer`):

If set (e.g. 2000), each page also gets a 'chunks' array of Markdown pieces split on paragraph boundaries, ready for embeddings and vector databases. 0 = no chunks.

## `chunkOverlap` (type: `integer`):

Characters repeated between consecutive chunks so context is not lost at the borders. Only used when chunk size > 0.

## `keepNavigationAndFooter` (type: `boolean`):

Off (recommended): nav, header, footer, sidebars, cookie banners, share buttons and ads are removed so only the main content remains. On: keep the whole page body.

## `removeSelectors` (type: `string`):

Comma-separated CSS selectors removed before conversion (e.g. .promo, #feedback-widget).

## `respectRobotsTxt` (type: `boolean`):

Skip URLs disallowed by the site's robots.txt (recommended).

## `saveHtml` (type: `boolean`):

Add the raw HTML of each page to the output (bigger dataset).

## `maxConcurrency` (type: `integer`):

Pages fetched in parallel. Lower it for small or slow sites.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://docs.apify.com/platform"
    }
  ],
  "maxPages": 500,
  "crawlScope": "path",
  "maxDepth": 3,
  "includeUrlPatterns": [
    "/docs/"
  ],
  "excludeUrlPatterns": [
    "/tag/",
    "/login"
  ],
  "chunkSize": 2000,
  "chunkOverlap": 200,
  "keepNavigationAndFooter": false,
  "removeSelectors": ".promo, #feedback-widget",
  "respectRobotsTxt": true,
  "saveHtml": false,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://docs.python.org/3/tutorial/index.html"
        }
    ],
    "maxPages": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("datadesk-io/website-to-markdown-crawler").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://docs.python.org/3/tutorial/index.html" }],
    "maxPages": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("datadesk-io/website-to-markdown-crawler").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://docs.python.org/3/tutorial/index.html"
    }
  ],
  "maxPages": 10
}' |
apify call datadesk-io/website-to-markdown-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datadesk-io/website-to-markdown-crawler"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/B6rI7JlusaoCVJSkk/builds/2e5vnQHP7cTN1WIJQ/openapi.json
