# Website Content Crawler: Markdown for AI and RAG (`lowcountrytech/website-content-to-markdown`) Actor

Turn web pages into clean Markdown for LLMs, RAG and AI agents. Paste URLs, or crawl a site a few links deep: menus, cookie banners and footers are stripped, headings, lists, tables, links and code kept. Title, description, language and word count per page. Pay only per page.

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

## Pricing

from $0.70 / 1,000 page converteds

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

Turn any web page into clean Markdown for LLMs, RAG pipelines and AI agents: paste URLs or crawl a site a few links deep, and get the main content without menus, banners or footers.

**No login · No proxy needed · JSON, CSV, Excel or API · Tested daily**

Sample output from the default input:

| URL | Title | Depth | Word count | Markdown length |
|---|---|---|---|---|
| crawlee.dev/js/docs/quick-start | Quick Start / Crawlee for JavaScript · Build re… | 0 | 803 | 6772 |

### What does Website Content Crawler do?

Website Content Crawler fetches each page you list, finds the main content (the article, the documentation body, the product description), removes navigation, headers, footers, sidebars, cookie banners and forms, and converts what is left to Markdown: headings, paragraphs, bulleted and numbered lists, tables, code blocks with their language, quotes, and optionally links and images with absolute URLs. With a crawl depth above 0 it also follows same-site links, so you can turn a documentation section or a blog into a Markdown corpus in one run. Every record carries the page title, meta description, language, canonical URL, author and publication date when the page publishes them, plus a word count and character count for sizing LLM context.

- Main content only: menus, footers, sidebars and cookie banners are stripped
- Real Markdown: tables, nested lists and fenced code blocks survive the conversion
- Crawl mode: follow same-site links up to 5 levels, with include and exclude filters
- Token-friendly options: drop links or images, cap characters per page
- No browser: fast and cheap, robots.txt respected, about 1 request per second per site

### Who is it for?

- Building a RAG knowledge base from a product's documentation or help center
- Giving an AI agent a tool that reads a web page and returns clean text
- Feeding blog posts or articles to an LLM for summaries, tagging or extraction
- Archiving a documentation section as Markdown files for a static site or a repo
- Checking how much text (and how many tokens) a set of pages contains before an LLM job

### How much does it cost?

This actor uses **pay-per-event** pricing, so you pay only for what you get:

| Event | Price |
|---|---|
| Page converted (per page) | $0.001 ($1.00 per 1,000) |
| Actor start (per run) | $0.00005 |

Paid Apify plans get the Store's discount tiers on the page price: $0.90 per 1,000 at Bronze, $0.80 at Silver, and $0.70 at Gold and above.

The default input returns up to 20 pages, which costs about $0.02. Apify's free plan includes monthly credit that covers thousands of pages. Set **Maximum pages** or a maximum cost per run to cap spending.

### How to use it

1. Click **Try for free**.
2. Paste the page URLs, one per line. Leave crawl depth at 0 to convert just those pages, or set 1-2 to follow same-site links.
3. Click **Start**. Each page takes about a second; pages on the same site are fetched about one per second.
4. Download the results as JSON, CSV or Excel, or read the `markdown` field from the API in your RAG pipeline.

### Input

| Field | Type | Description | Default |
|---|---|---|---|
| `startUrls` | array | Pages to convert, one per line, e.g. `https://example.com/docs/intro`. A bare domain like `example.com` becomes `https://example.com/`. With a crawl depth above 0, these are also the starting points of the crawl. | `["https://crawlee.dev/js/docs/quick-start"]` |
| `crawlDepth` | integer | How many links deep to follow from each start page, on the same website only. `0` converts just the pages you list. `1` also converts the pages they link to, and so on (at most 5). The total is capped by Maximum pages. | `0` |
| `includeUrlsContaining` | array of strings | When crawling, follow only links whose URL contains one of these texts, e.g. `/docs/` or `/blog/`. Leave empty to follow every same-site link. Start pages are always converted. | `[]` |
| `excludeUrlsContaining` | array of strings | When crawling, never follow links whose URL contains one of these texts, e.g. `/tag/` or `?page=`. Login, cart, search and file links (PDF, images, archives) are always skipped. | `[]` |
| `onlyMainContent` | boolean | Strip navigation, headers, footers, sidebars, cookie banners and forms, and keep the main article or documentation body. Turn off to convert the whole page body. | `true` |
| `keepLinks` | boolean | Keep hyperlinks as Markdown links `[text](url)` with absolute URLs. Turn off for plain text with the link text only (fewer tokens). | `true` |
| `keepImages` | boolean | Keep images as Markdown `![alt](url)`. Off by default, which saves tokens for LLM use. | `false` |
| `includePlainText` | boolean | Add a `text` field with the same content as plain text, without Markdown syntax. | `false` |
| `maxCharacters` | integer | Cut each page's Markdown at this many characters (at a paragraph break where possible) and set `truncated` to true. `0` means no limit. | `0` |
| `maxItems` | integer | Stop after this many pages. You are charged per page, so this also caps the cost of a run. Use 0 for no limit. | `20` |
| `proxyConfiguration` | object | Optional. The target is a public page or API and normally works without a proxy. | `{"useApifyProxy":false}` |

Example input:

```json
{
  "startUrls": [
    "https://crawlee.dev/js/docs/quick-start"
  ],
  "crawlDepth": 0,
  "includeUrlsContaining": [],
  "excludeUrlsContaining": [],
  "onlyMainContent": true,
  "keepLinks": true,
  "keepImages": false,
  "includePlainText": false,
  "maxCharacters": 0,
  "maxItems": 20
}
```

### Output

Each page is one record in the dataset:

| Field | Type | Description |
|---|---|---|
| `url` | string | The page URL that was requested. |
| `finalUrl` | string | The URL after redirects. |
| `statusCode` | integer or null | HTTP status code of the final response. |
| `depth` | integer | 0 for a page you listed, 1 for a page linked from it, and so on. |
| `title` | string or null | Page title (og:title or <title>, else the first H1). |
| `description` | string or null | Meta description or og:description. |
| `language` | string or null | Language from the html lang attribute, e.g. `en`. |
| `canonicalUrl` | string or null | The canonical URL the page declares, if any. |
| `author` | string or null | Author from the author meta tag or article metadata, if published. |
| `publishedAt` | string or null | Publication date from article metadata, if published (as the page states it). |
| `markdown` | string | The page content as Markdown: headings, paragraphs, lists, tables, code blocks, quotes and (optionally) links and images. |
| `text` | string or null | The same content as plain text (only when Also save plain text is on). |
| `headings` | array | The page's H1-H3 headings in order, as `H2: Heading text`. |
| `wordCount` | integer | Words in the Markdown text. |
| `markdownLength` | integer | Characters in the Markdown, a quick proxy for LLM tokens (about 4 characters per token in English). |
| `truncated` | boolean | True when the Markdown was cut at Maximum characters per page. |
| `linksFollowed` | integer | Same-site links from this page queued for crawling (0 when the crawl depth is reached). |
| `scrapedAt` | string | When this record was scraped (ISO 8601). |

Sample:

```json
[
  {
    "url": "https://crawlee.dev/js/docs/quick-start",
    "finalUrl": "https://crawlee.dev/js/docs/quick-start",
    "statusCode": 200,
    "depth": 0,
    "title": "Quick Start | Crawlee for JavaScript · Build reliable crawlers. Fast.",
    "description": "With this short tutorial you can start scraping with Crawlee in a minute or two. To learn more, read the Introduction.",
    "language": "en",
    "canonicalUrl": "https://crawlee.dev/js/docs/quick-start",
    "author": null,
    "publishedAt": "2026-11-20T22:27:00.000Z",
    "markdown": "Version: 3.18\n\n# Quick Start\n\nWith this short tutorial you can start scraping with Crawlee in a minute or two. To learn in-depth how Crawlee works, read the [Introduction](https://crawlee.dev/js/docs/introduction), which is a comprehensive step-by-step guide for creating your first scraper.\n\n## Choo…",
    "text": null,
    "headings": [
      "H1: Quick Start",
      "H2: Choose your crawler",
      "H3: CheerioCrawler",
      "H3: PuppeteerCrawler",
      "H3: PlaywrightCrawler"
    ],
    "wordCount": 803,
    "markdownLength": 6772,
    "truncated": false,
    "linksFollowed": 0,
    "scrapedAt": "2026-10-20T12:00:00.000Z"
  }
]
```

### Limitations

- No JavaScript rendering: content that only appears after scripts run is not captured.
- HTML pages only. PDFs, images and other files are skipped.
- robots.txt is respected, so pages a site disallows for crawlers are skipped and logged.
- No logins, cookies or forms; paywalled text is not available.

### FAQ

**Does it run JavaScript?**

The Markdown crawler does not run JavaScript; it reads the HTML the server sends. That covers most articles, documentation, blogs and marketing pages, and keeps runs fast and cheap. Pages that build their content entirely in the browser (some single-page apps) come back with little or no text; their `wordCount` shows it.

**How is it different from Apify's Website Content Crawler?**

Website Content Crawler: Markdown for AI and RAG is an independent, lighter tool: plain HTTP with no headless browser, one flat price per page, and a small set of options aimed at getting clean Markdown quickly. Use a browser-based crawler when you need JavaScript rendering, logins or very large crawls.

**Will it crawl a whole website?**

The Markdown crawler follows same-site links up to the crawl depth you set (at most 5) and stops at Maximum pages (at most 1,000 per run when crawling). It respects robots.txt and fetches about one page per second per site.

**Which sites are not allowed?**

Sites whose terms forbid automated access are refused, including LinkedIn, Facebook, Instagram, X/Twitter, TikTok, Reddit, Indeed, Glassdoor and the review sites listed in this actor's policy. Pages behind a login are not supported.

**Is it legal to scrape this data?**

Website Content Crawler reads only publicly available, non-personal page content as Markdown data from the public web pages you list, without logging in and at a polite request rate. It respects robots.txt. You are responsible for how you use the results; check the target's terms and the laws that apply to you. If you are unsure, ask a lawyer.

**Can I call it from my own code, Make, Zapier, n8n, or an AI agent?**

Website Content Crawler has an HTTP API, official JavaScript and Python clients, and integrations with Make, Zapier, n8n and LangChain. AI agents can run it as a tool through the Apify MCP server: add `https://mcp.apify.com?tools=lowcountrytech/website-content-to-markdown` to your MCP client and the actor becomes the tool `lowcountrytech--website-content-to-markdown`. Set `maxTotalChargeUsd` in the call options to cap what one run can cost.

**Something broke or a field is missing. What now?**

Open an issue on the Issues tab with the input you used. The actor is tested daily and repaired quickly when the source site changes.

***

# Actor input Schema

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

Pages to convert, one per line, e.g. `https://example.com/docs/intro`. A bare domain like `example.com` becomes `https://example.com/`. With a crawl depth above 0, these are also the starting points of the crawl.

## `crawlDepth` (type: `integer`):

How many links deep to follow from each start page, on the same website only. `0` converts just the pages you list. `1` also converts the pages they link to, and so on (at most 5). The total is capped by Maximum pages.

## `includeUrlsContaining` (type: `array`):

When crawling, follow only links whose URL contains one of these texts, e.g. `/docs/` or `/blog/`. Leave empty to follow every same-site link. Start pages are always converted.

## `excludeUrlsContaining` (type: `array`):

When crawling, never follow links whose URL contains one of these texts, e.g. `/tag/` or `?page=`. Login, cart, search and file links (PDF, images, archives) are always skipped.

## `onlyMainContent` (type: `boolean`):

Strip navigation, headers, footers, sidebars, cookie banners and forms, and keep the main article or documentation body. Turn off to convert the whole page body.

## `keepLinks` (type: `boolean`):

Keep hyperlinks as Markdown links `[text](url)` with absolute URLs. Turn off for plain text with the link text only (fewer tokens).

## `keepImages` (type: `boolean`):

Keep images as Markdown `![alt](url)`. Off by default, which saves tokens for LLM use.

## `includePlainText` (type: `boolean`):

Add a `text` field with the same content as plain text, without Markdown syntax.

## `maxCharacters` (type: `integer`):

Cut each page's Markdown at this many characters (at a paragraph break where possible) and set `truncated` to true. `0` means no limit.

## `maxItems` (type: `integer`):

Stop after this many pages. You are charged per page, so this also caps the cost of a run. Use 0 for no limit.

## `proxyConfiguration` (type: `object`):

Optional. The target is a public page or API and normally works without a proxy.

## Actor input object example

```json
{
  "startUrls": [
    "https://crawlee.dev/js/docs/quick-start"
  ],
  "crawlDepth": 0,
  "includeUrlsContaining": [],
  "excludeUrlsContaining": [],
  "onlyMainContent": true,
  "keepLinks": true,
  "keepImages": false,
  "includePlainText": false,
  "maxCharacters": 0,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `summary` (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": [
        "https://crawlee.dev/js/docs/quick-start"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("lowcountrytech/website-content-to-markdown").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://crawlee.dev/js/docs/quick-start"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("lowcountrytech/website-content-to-markdown").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://crawlee.dev/js/docs/quick-start"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call lowcountrytech/website-content-to-markdown --silent --output-dataset

```

## MCP server setup

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

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/UZE8kV1sFhZ9ITZag/builds/4OBwYrdcO8VVLK7sh/openapi.json
