# Website to Markdown Crawler for LLMs & RAG (`siddharth_r/website-markdown-crawler`) Actor

Website to Markdown crawler for LLMs, RAG and vector databases. Convert any site into clean, LLM-ready Markdown with metadata, removing menus, footers and boilerplate. $0.50 per 1,000 pages; only pages with real content are charged.

- **URL**: https://apify.com/siddharth_r/website-markdown-crawler.md
- **Developed by:** [Siddharth Rajagopalan](https://apify.com/siddharth_r) (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.35 / 1,000 page saveds

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** turns any website into **clean Markdown for LLMs, RAG pipelines and vector databases**. It keeps each page's main content and drops menus and footers, so your embeddings stay on topic. Try it on a documentation site.

For AI projects, it does the job of a website content crawler that produces LLM-ready text.

### Website to Markdown use cases

- Building a RAG chatbot over documentation
- Feeding website content to an AI agent
- Preparing training or evaluation data
- Archiving a site's articles as Markdown files

### Website to Markdown API quick start

**No code:** press **Start**. The form is pre-filled with a working example, and you can download the results as Excel, CSV or JSON.

**From your code:** copy your API token from **Settings > API & Integrations** in Apify Console, then run:

```bash
curl -X POST "https://api.apify.com/v2/acts/siddharth_r~website-markdown-crawler/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": ["https://docs.python.org/3/tutorial/"], "maxPages": 3, "useSitemap": false}'
```

```python
import requests

rows = requests.post(
    "https://api.apify.com/v2/acts/siddharth_r~website-markdown-crawler/run-sync-get-dataset-items",
    params={"token": "YOUR_API_TOKEN"},
    json={
        "startUrls": [
            "https://docs.python.org/3/tutorial/"
        ],
        "maxPages": 3,
        "useSitemap": false
    },
    timeout=300,
).json()

for row in rows:
    print(row.get("url"), row.get("wordCount"))
```

The call waits for the run to finish and returns the rows as JSON. It can wait up to 5 minutes, so for bigger runs use the **API** tab to start a run and fetch the results later.

### Example response

This is real output, shortened. Long text and lists are trimmed here, and empty fields are hidden.

```json
[
  {
    "url": "https://docs.python.org/3/tutorial/",
    "title": "The Python Tutorial",
    "publishedAt": "2026-11-07",
    "siteName": "Python documentation",
    "language": "en",
    "content": "# The Python Tutorial¶\n\nTip\n\nThis tutorial is designed for\n*programmers* that are new to the Python languag...",
    "format": "markdown",
    "wordCount": 361,
    "depth": 0
  }
]
```

### Why use it

- **Among the cheapest on Apify.** $0.50 per 1,000 pages, with no start fee.
- **Only real content is charged.** Error pages and pages with no article text are skipped for free.
- **Fast.** It uses plain HTTP rather than a browser, so typical docs sites, blogs and help centers crawl quickly.
- **Polite.** It follows `robots.txt` and stays on the sites you give it.
- **Finds pages for you.** It reads the sitemap and follows links up to the depth you choose.

### How to use it

1. Fill in the input fields below. They're pre-filled with an example, so you can also just press **Start**.
2. Wait for the run to finish.
3. Open the **Output** tab, and download the results as Excel, CSV or JSON.
4. Schedule the run if you want fresh results automatically.

### Input

```json
{
  "startUrls": ["https://docs.python.org/3/tutorial/"],
  "maxPages": 100,
  "maxDepth": 3,
  "includeUrlPatterns": ["/3/tutorial/"],
  "outputFormat": "markdown"
}
```

`outputFormat` can be `markdown` or `text`. Use `includeUrlPatterns` and `excludeUrlPatterns` to keep the crawl to the sections you want.

### Pricing

**$0.0005 per page saved**, which is $0.50 per 1,000 pages. Set a maximum charge per run to cap your spend; the crawl stops when it's reached.

Apify's free plan includes $5 of usage every month, which covers about 10,000 pages with this tool. Higher Apify plans pay less per result.

### Limits

Sites that build their content with JavaScript in the browser, and sites behind logins or bot protection, return little or nothing. Those pages aren't charged. Check that your use of a site's content respects its terms and copyright.

### Website to Markdown FAQ

#### Does it run JavaScript?

No. It's a fast HTTP crawler, so pages that need JavaScript to show content may be skipped and aren't charged.

#### Does it follow robots.txt?

Yes. Pages a site asks bots not to read are skipped.

#### Can I limit it to one section?

Yes. Use **Only URLs containing**, such as `/docs/`, and set **Max pages** to cap your cost.

#### Is it legal to use this tool?

It reads only public pages and public APIs, without logging in or bypassing blocks. Rules on using data, especially personal data, differ by country and purpose, so check the ones that apply to you. This isn't legal advice.

### Support

Found a bug or want a feature? Open an issue on the **Issues** tab. If this tool saved you time, a short review helps others find it.

### Run it on Apify

Running this tool on Apify also gives you:

- **Scheduling:** run it daily or weekly with no setup
- **API access:** start runs and fetch results from your own code
- **Integrations:** connect to Make, Zapier, n8n, Google Sheets and more
- **AI agents:** call it through the Apify MCP server
- **Exports:** download results as Excel, CSV, JSON or HTML
- **Monitoring:** get alerted if a run fails

### Related tools

- [Website Contact Scraper](https://apify.com/siddharth_r/website-contact-scraper): emails, phones and social profiles from a list of websites.
- [SEO Audit Crawler](https://apify.com/siddharth_r/seo-audit-crawler): on-page SEO issues and broken links across a whole site.
- [Website Screenshot Tool](https://apify.com/siddharth_r/website-screenshot): bulk full-page screenshots in real Chromium.

# Actor input Schema

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

Websites or sections to crawl. The crawl stays on each start URL's own site.

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

The crawl stops after fetching this many pages. Caps your cost.

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

How many clicks away from a start URL to follow. 0 means only the start pages and the sitemap.

## `useSitemap` (type: `boolean`):

Also crawl the URLs listed in the site's sitemap.

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

Keep the crawl to URLs that contain any of these, for example /blog/.

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

Never crawl URLs containing any of these, for example /tag/ or ?page=.

## `outputFormat` (type: `string`):

Markdown keeps headings, lists and tables. Text is plain.

## `includeTables` (type: `boolean`):

Keep tables in the output.

## `includeLinks` (type: `boolean`):

Keep hyperlinks in the Markdown.

## `concurrency` (type: `integer`):

How many pages to fetch in parallel. Lower it for small or slow sites.

## Actor input object example

```json
{
  "startUrls": [
    "https://docs.python.org/3/tutorial/"
  ],
  "maxPages": 20,
  "maxDepth": 3,
  "useSitemap": true,
  "outputFormat": "markdown",
  "includeTables": true,
  "includeLinks": false,
  "concurrency": 5
}
```

# Actor output Schema

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

One record per page with its Markdown or text content.

## `summary` (type: `string`):

Pages fetched, saved, skipped and blocked by robots.txt.

# 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": [
        "https://docs.python.org/3/tutorial/"
    ],
    "maxPages": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("siddharth_r/website-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": ["https://docs.python.org/3/tutorial/"],
    "maxPages": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("siddharth_r/website-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": [
    "https://docs.python.org/3/tutorial/"
  ],
  "maxPages": 20
}' |
apify call siddharth_r/website-markdown-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,siddharth_r/website-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/pFlj6vtMxw2CuhIVe/builds/zfEba7zsMw6x8h87Q/openapi.json
