# Website Content Crawler — AI & RAG Ready (`santamaria-automations/website-content-crawler`) Actor

Crawl any website and extract clean Markdown and plain text optimized for AI ingestion, RAG pipelines, and LLM context. Readability-style main content extraction removes ads, navs, and footers. Configurable depth, concurrency, and page limits. Pay-per-page.

- **URL**: https://apify.com/santamaria-automations/website-content-crawler.md
- **Developed by:** [Ale](https://apify.com/santamaria-automations) (community)
- **Categories:** AI, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Website Content Crawler — AI & RAG Ready

Extract clean Markdown and plain text from any website, optimized for AI ingestion, RAG pipelines, and LLM context windows. Readability-style main content extraction strips navigation, footers, sidebars, and ads so your AI gets only the content that matters.

### Why This Actor?

- **AI-optimized output** — Markdown + plain text per page, with content type detection
- **Main content extraction** — Readability-style selectors remove noise (nav, footer, ads, sidebars)
- **Flexible crawl modes** — Fetch a list of URLs directly (depth=0) or crawl entire sites (depth=1-5)
- **Concurrent processing** — Up to 20 parallel workers for high-throughput extraction
- **Pay-per-page pricing** — Only pay for pages successfully crawled

### Use Cases

- Build RAG knowledge bases from company documentation sites
- Feed LLMs with up-to-date content from blog posts and news articles
- Extract article text for AI summarization pipelines
- Crawl competitor sites for content analysis
- Bulk-convert web pages to Markdown for offline use

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | array | required | URLs to crawl. Use `maxDepth=0` for flat fetch, `maxDepth>0` to follow links |
| `maxDepth` | integer | `0` | Crawl depth. 0 = start pages only, 1 = start pages + their links, 2 = two levels, etc. |
| `maxPagesPerCrawl` | integer | `100` | Maximum total pages to process across all start URLs |
| `maxPagesPerDomain` | integer | `50` | Maximum pages per unique domain |
| `maxConcurrency` | integer | `5` | Number of parallel workers (1–20) |
| `extractMainContent` | boolean | `true` | Strip nav/footer/ads using readability-style selectors |
| `proxyConfiguration` | object | Apify proxy | Proxy settings |

### Output

One record per crawled page:

| Field | Type | Description |
|-------|------|-------------|
| `url` | string | URL of the crawled page |
| `title` | string | Page title (og:title or HTML title tag) |
| `description` | string | Meta description (description or og:description) |
| `markdown` | string | Clean Markdown output, up to 50,000 characters |
| `text` | string | Plain text with all HTML removed, up to 10,000 characters |
| `word_count` | integer | Number of words in the extracted plain text |
| `content_type` | string | Detected type: `article`, `blog`, `documentation`, or `generic` |
| `depth` | integer | Crawl depth (0 = start URL) |
| `start_url` | string | Start URL that led to this page |
| `links_found` | integer | New internal links discovered and added to crawl queue |
| `status_code` | integer | HTTP status code |
| `scraped_at` | string | ISO 8601 UTC timestamp |

### Example Input

Fetch a list of documentation pages (no crawling):
```json
{
  "startUrls": [
    "https://docs.example.com/api/overview",
    "https://docs.example.com/api/authentication"
  ],
  "maxDepth": 0,
  "extractMainContent": true
}
````

Crawl an entire blog up to 2 levels deep:

```json
{
  "startUrls": ["https://blog.example.com"],
  "maxDepth": 2,
  "maxPagesPerCrawl": 200,
  "maxConcurrency": 10,
  "extractMainContent": true
}
```

### Pricing

| Event | Price |
|-------|-------|
| Actor start | $0.25 (flat) |
| Per 1,000 pages crawled | $1.00 |

### MCP Integration

Use this actor directly from Claude or any MCP-compatible AI tool:

```
Use apify/santamaria-automations/website-content-crawler to crawl https://docs.example.com with maxDepth=1 and extractMainContent=true, then summarize the documentation
```

Actor URL: `apify/santamaria-automations/website-content-crawler`

### Notes

- Challenge pages (Cloudflare, DataDome, PerimeterX) are detected and skipped automatically
- Deduplication prevents the same URL from being crawled twice in the same run
- Content type detection identifies articles, blog posts, and documentation pages
- Main content extraction uses CSS selector priority: article-specific classes → semantic tags → body fallback

# Actor input Schema

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

List of URLs to crawl. Set Max Depth to 0 to fetch only these pages (no link-following). Set to 1+ to also crawl linked pages.

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

How many link levels deep to crawl from each start URL. 0 = start pages only (no crawling), 1 = start pages + their links, 2 = two levels deep, etc.

## `maxPagesPerCrawl` (type: `integer`):

Maximum total pages to process across all start URLs combined. Controls your budget.

## `maxPagesPerDomain` (type: `integer`):

Maximum pages to crawl per unique domain. Prevents one large site from consuming the entire budget.

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

Number of parallel workers fetching pages simultaneously. Higher values increase throughput.

## `extractMainContent` (type: `boolean`):

When enabled (default), strips navigation, footers, sidebars, and ads using readability-style selectors. Produces cleaner AI/RAG content. Disable to get full page HTML converted to Markdown.

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

Optional Apify proxy. Most documentation/blog/marketing sites do not need a proxy; enable only at high volume or for sites that block direct traffic.

## Actor input object example

```json
{
  "startUrls": [
    "https://example.com"
  ],
  "maxDepth": 0,
  "maxPagesPerCrawl": 100,
  "maxPagesPerDomain": 50,
  "maxConcurrency": 5,
  "extractMainContent": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

One record per crawled page containing clean Markdown, plain text, title, description, content type, and crawl metadata

# 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://example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("santamaria-automations/website-content-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://example.com"] }

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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://example.com"
  ]
}' |
apify call santamaria-automations/website-content-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=santamaria-automations/website-content-crawler",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Website Content Crawler — AI & RAG Ready",
        "description": "Crawl any website and extract clean Markdown and plain text optimized for AI ingestion, RAG pipelines, and LLM context. Readability-style main content extraction removes ads, navs, and footers. Configurable depth, concurrency, and page limits. Pay-per-page.",
        "version": "1.0",
        "x-build-id": "HegbnPcWAbTDGWQLv"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/santamaria-automations~website-content-crawler/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-santamaria-automations-website-content-crawler",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/santamaria-automations~website-content-crawler/runs": {
            "post": {
                "operationId": "runs-sync-santamaria-automations-website-content-crawler",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/santamaria-automations~website-content-crawler/run-sync": {
            "post": {
                "operationId": "run-sync-santamaria-automations-website-content-crawler",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "List of URLs to crawl. Set Max Depth to 0 to fetch only these pages (no link-following). Set to 1+ to also crawl linked pages.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxDepth": {
                        "title": "Max Crawl Depth",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "How many link levels deep to crawl from each start URL. 0 = start pages only (no crawling), 1 = start pages + their links, 2 = two levels deep, etc.",
                        "default": 0
                    },
                    "maxPagesPerCrawl": {
                        "title": "Max Pages Per Crawl",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum total pages to process across all start URLs combined. Controls your budget.",
                        "default": 100
                    },
                    "maxPagesPerDomain": {
                        "title": "Max Pages Per Domain",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum pages to crawl per unique domain. Prevents one large site from consuming the entire budget.",
                        "default": 50
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Number of parallel workers fetching pages simultaneously. Higher values increase throughput.",
                        "default": 5
                    },
                    "extractMainContent": {
                        "title": "Extract Main Content Only",
                        "type": "boolean",
                        "description": "When enabled (default), strips navigation, footers, sidebars, and ads using readability-style selectors. Produces cleaner AI/RAG content. Disable to get full page HTML converted to Markdown.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Optional Apify proxy. Most documentation/blog/marketing sites do not need a proxy; enable only at high volume or for sites that block direct traffic.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
