# Website Content Crawler: Markdown for AI & RAG, $1/1K (`laptime/website-content-crawler`) Actor

$1 per 1,000 pages, JavaScript pages included, no start fee. 20 pages in about 3 s. No login. Websites, docs, blogs or URL lists to clean Markdown and text for LLMs, RAG and AI agents: menus, footers and cookie banners removed, title, language, headings, RAG chunks, sitemaps, PDFs.

- **URL**: https://apify.com/laptime/website-content-crawler.md
- **Developed by:** [Laptime](https://apify.com/laptime) (community)
- **Categories:** AI, Agents, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.65 / 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/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

<p><strong>From Laptime.</strong> We benchmark our scrapers on Apify and date the results, and an automated check runs this Actor's example input every morning.</p>

> **Update, 30 November 2026:** start URLs can be plain links as well as `{ "url": … }` objects, and pages that need JavaScript render about twice as fast.

### Why choose Website Content Crawler?

<ul>
<li><strong>It reads pages over plain HTTP and opens a browser only for the pages that need one.</strong> 20 documentation pages took 3.1 seconds (median of eight runs on Apify, 27 Nov 2026), and you never have to pick a crawler type.</li>
<li><strong>Every row is the page's own text, ready for an LLM.</strong> Menus, headers, footers, sidebars, cookie banners and text a website repeats on most pages are left out; on four test websites, lines repeated across pages were at most 2.7% of the saved text (27 Nov 2026).</li>
<li><strong>You pay for pages, not for compute.</strong> 1,000 saved pages cost $1, JavaScript pages and PDFs included. There is no start fee, and failed, duplicate and empty pages are free.</li>
</ul>

### Try it with one website

[![How to use Website Content Crawler without coding: 1. Try for free 2. Paste a website link + Start 3. Pages as clean Markdown 4. Export the Pages view to Excel](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-website-content-crawler-steps.jpg?v=7501f6b8)](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-website-content-crawler-steps.jpg?v=7501f6b8)

No code needed: click **Try for free**, keep the example input, click **Start**, then export to Excel. Or paste this into the **JSON** tab of the input:

```json
{
  "startUrls": ["https://docs.apify.com/academy/scraping-basics-javascript"],
  "maxCrawlPages": 20
}
```

That crawls 20 pages of a web scraping course and returns each lesson as Markdown and plain text with its title, description, language and headings. Put your own website or a section of it (`https://example.com/docs/`) in **Start URLs**.

**Apify free plan:** the $5 of monthly credit covers about 5,000 pages with this Actor. No card needed.

### Pick the right tool for AI-ready text

#### Using an AI assistant?

Paste this into ChatGPT, Claude, Cursor or any AI agent, then say what you want. It gives the assistant what it needs to run this Actor with your Apify account: inputs, examples, prices and a check of the results.

```text
Help me get data with the Apify Actor laptime/website-content-crawler ("Website Content Crawler" by Laptime). $1 per 1,000 pages, JavaScript pages included, no start fee. 20 pages in about 3 s. No login. Websites, docs, blogs or URL lists to clean Markdown and text for LLMs, RAG and AI agents: menus, footers and cookie banners removed, title, language, headings, RAG chunks, sitemaps, PDFs. Full docs (every input field, pricing): https://apify.com/laptime/website-content-crawler.md; the essentials are below. If I have not said what I want yet, ask me in one question. Before the first run, show me the input and the estimated cost.
Run it: with Apify MCP tools (https://mcp.apify.com), call-actor "laptime/website-content-crawler" with the input, then get-dataset-items with the run's dataset ID. Otherwise, with my Apify token (https://console.apify.com/settings/integrations; keep it in an environment variable, not in a URL or file): POST https://api.apify.com/v2/acts/laptime~website-content-crawler/run-sync-get-dataset-items, header "Authorization: Bearer $APIFY_TOKEN", JSON body = the input; it returns the rows as a JSON array and waits up to 300 s (longer runs: POST /v2/acts/laptime~website-content-crawler/runs, poll the run, then GET /v2/datasets/{defaultDatasetId}/items). No token yet: a free Apify account includes $5 of usage a month, no card.
Input (JSON; other fields in the docs): startUrls: Websites, sections or pages to crawl, e.g. https://docs.example.com/, example.com/blog/ or one article; maxCrawlPages (default 100): Most pages saved in this run (all start URLs together); crawlScope (one of path|site|domain|pages): Which links to follow: path (default) = pages under the start URL (https://example.com/docs/ reads only /docs/... pages); site = every page of that host, www or not…; chunkSize (default 0): Split each page into chunks of at most this many characters for embeddings, each with the headings above it (field chunks, view Chunks); chunkOverlap (default 0): Each chunk starts with up to this many characters from the end of the one before, cut at a word.
Example (the input the Store form opens with): {"startUrls":["https://docs.apify.com/academy/scraping-basics-javascript"],"maxCrawlPages":20}
Example (documentation site to Markdown chunks for RAG): {"startUrls":["https://docs.python.org/3/tutorial/"],"maxCrawlPages":50,"chunkSize":1500,"chunkOverlap":150}
Example (whole website to text for an AI chatbot): {"startUrls":["https://paulgraham.com/articles.html"],"crawlScope":"site","maxCrawlPages":100}
Cost: pay per result, no start fee (Free-plan prices; paid Apify plans pay less): Page $1 per 1,000. To cap a run's charge, add ?maxTotalChargeUsd=<dollars> to the API URL (MCP: callOptions.maxTotalChargeUsd).
Output: Main fields: url, title, wordCount, language, renderedWith, markdown.
After the run: tell me how many rows came back and what they cost, then show the first 5 rows as a table (url, title, wordCount, language, renderedWith, markdown). If nothing came back, read the run's statusMessage (API: GET /v2/acts/laptime~website-content-crawler/runs/last; MCP: get-actor-run) and suggest one change to the input.
```

### What can Website Content Crawler do?

- **It crawls a whole website, a section, or only the URLs you give.** A start URL like `https://example.com/docs/` stays under `/docs/`; the scope can also be the whole website, its subdomains, or no links at all.
- **It finds pages through links and sitemaps.** Linked pages come first, nearest first; pages listed in the website's sitemap that no link led to come after them.
- **It renders JavaScript only where it has to.** A page whose HTML has almost no text and an app shell is opened in a headless browser, and a website whose pages all need it skips plain HTTP from then on.
- **It cleans pages for language models.** The main content keeps headings, lists, GFM tables, code blocks with their language and absolute links; page furniture and repeated text are left out.
- **It splits pages into chunks for embeddings.** With a chunk size set, every chunk carries the headings above it, a long table keeps its header row and a long code block its fence.
- **It reads PDF and text files.** With **Read PDF files** on, PDFs inside the scope become rows with their text, title, author and date.
- **It gets past websites that refuse crawlers when it can.** A website that refuses the plain route is retried through a datacenter proxy, then a residential one, then a browser, and stays on the route that worked.
- **It takes inputs written for Apify's Website Content Crawler.** `startUrls`, `crawlerType`, URL globs, `maxCrawlPages`, `maxResults` and the HTML selectors work as they are, and rows keep its `url`, `markdown`, `text`, `crawl` and `metadata` fields.

### How to crawl a website to Markdown

Paste one of these into the **JSON** tab of the input, or send it through the API.

#### A documentation site for RAG, in chunks

```json
{
  "startUrls": [{ "url": "https://docs.python.org/3/tutorial/" }],
  "maxCrawlPages": 100,
  "chunkSize": 1500,
  "chunkOverlap": 150
}
```

Every page of the tutorial with its chunks of up to 1,500 characters. Open the **Chunks** view for one row per chunk with the page URL and its heading path. 100 pages cost $0.10.

#### A whole website for a chatbot knowledge base

```json
{
  "startUrls": [{ "url": "https://www.example.com/" }],
  "crawlScope": "site",
  "maxCrawlPages": 500
}
```

Every page of the website, www or not, up to 500 pages, for $0.50 at most. Add patterns to **Skip URLs matching** for parts you don't want, such as `/tag/` or `?page=`.

#### A list of pages, no crawling

```json
{
  "startUrls": [
    { "url": "https://www.bbc.com/news" },
    { "url": "https://en.wikipedia.org/wiki/Web_crawler" },
    { "url": "https://react.dev/learn" }
  ],
  "crawlScope": "pages"
}
```

One row per URL, nothing else fetched. For agents that need a few pages as Markdown.

#### Only the blog, without tag and page listings

```json
{
  "startUrls": [{ "url": "https://wordpress.org/news/" }],
  "maxCrawlPages": 50,
  "excludeUrlGlobs": ["/tag/", "/category/", "/page/"]
}
```

#### The PDFs a website links to

```json
{
  "startUrls": [{ "url": "https://www.irs.gov/forms-pubs/about-form-w-9" }],
  "crawlScope": "site",
  "maxCrawlDepth": 1,
  "crawlPdfs": true,
  "includeUrlGlobs": ["/pub/irs-pdf/"]
}
```

The page and the PDF forms and instructions it links to, each PDF as one row with its text.

### Input parameters

Nothing is required except at least one start URL. **Max pages** counts saved pages for the whole run, all start URLs together.

| Parameter | Type | Default | What it does |
|---|---|---|---|
| `startUrls` | array | prefill: one docs URL | Websites, sections or pages: plain URLs, Apify's `{ "url": "…" }` objects, or `{ "requestsFromUrl": "…" }` for a text file of URLs. `urls` works too. |
| `maxCrawlPages` | integer | `100` | Most pages saved in the run; 0 = no limit |
| `crawlScope` | string | `path` | `path` (under the start URL), `site` (whole website), `domain` (with subdomains), `pages` (start URLs only) |
| `maxCrawlDepth` | integer | `20` | Links away from a start URL; 0 = start URLs only |
| `includeUrlGlobs` | array | `[]` | Crawl only links matching: a full-URL glob sets the scope, `/docs/**` matches the path, plain text matches anywhere |
| `excludeUrlGlobs` | array | `[]` | Never fetch links matching these |
| `useSitemaps` | boolean | `true` | Also read the website's sitemap pages that no link led to |
| `outputFormats` | array | `["markdown","text"]` | `markdown`, `text`, `html` (cleaned main content) |
| `extractMainContent` | boolean | `true` | Leave out menus, footers, banners and repeated text; off keeps the whole page |
| `removeElementsCssSelector` | string | | More elements to leave out |
| `keepElementsCssSelector` | string | | Read only these elements |
| `chunkSize` | integer | `0` | Chunk size in characters for embeddings; 0 = no chunks |
| `chunkOverlap` | integer | `0` | Characters repeated from the previous chunk (at most a quarter of the size) |
| `crawlPdfs` | boolean | `false` | Read linked PDF files as rows |
| `renderingType` | string | `auto` | `auto` (browser only when needed), `http` (never), `browser` (every page) |
| `respectRobotsTxt` | boolean | `false` | Skip pages robots.txt disallows and follow its Crawl-delay |
| `telemetry` | boolean | `true` | Anonymous error reports (what is sent: see the FAQ) |

Input names from other website crawlers work as they are: Apify's `crawlerType` (browser types become `auto`), `maxResults`, `htmlTransformer`, `saveHtml`, `saveMarkdown`, `respectRobotsTxtFile`, `customHttpHeaders`, `initialCookies`; `maxPages`, `includeUrls`, `excludeUrls`, `splitIntoChunks`, `crawlMode`, `renderJavaScript`, `maxDepth`.

### Output

One row per saved page with 30 fields; views **Pages**, **Content for AI**, **Chunks**, **Metadata** and **Crawl details**.

[![Website Content Crawler output: one row per page with URL, title, word count, language and clean Markdown](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-website-content-crawler-output.jpg?v=5c0f2fa7)](https://api.apify.com/v2/key-value-stores/uhvb1I0vozUDDdhcp/records/howto-website-content-crawler-output.jpg?v=5c0f2fa7)

| Group | Fields |
|---|---|
| Page | `url`, `title`, `description`, `language`, `wordCount` |
| Content | `markdown`, `text`, `html`, `chunks` (`chunkIndex`, `text`, `headings`, `chars`), `chunkCount`, `headings`, `links` |
| Metadata | `author`, `publishedAt`, `modifiedAt`, `canonicalUrl`, `image`, `siteName`, `keywords` |
| Crawl | `startUrl`, `depth`, `foundVia`, `referrerUrl`, `statusCode`, `renderedWith`, `contentType`, `crawledAt`, `contentHash` |
| Apify WCC compatible | `crawl` (`loadedUrl`, `loadedTime`, `referrerUrl`, `depth`, `httpStatusCode`), `metadata` (`title`, `description`, `languageCode`, …) |

#### Example page (shortened)

```json
{
  "url": "https://docs.apify.com/academy/scraping-basics-javascript/parsing-html",
  "title": "Parsing HTML with Node.js | Academy | Apify Documentation",
  "description": "Lesson about building a Node.js application for watching prices. Using the Cheerio library to parse HTML code of a product listing page.",
  "language": "en",
  "wordCount": 1029,
  "markdown": "# Parsing HTML with Node.js\n\n**In this lesson we'll look for products in the downloaded HTML. We'll use Cheerio to turn the HTML into objects which we can work with in our Node.js program.**\n\n---\n\nFrom lessons about browser DevTools we know …",
  "text": "Parsing HTML with Node.js\n\nIn this lesson we'll look for products in the downloaded HTML. …",
  "headings": [{ "level": 1, "text": "Parsing HTML with Node.js" }, { "level": 2, "text": "Processing HTML" }],
  "canonicalUrl": "https://docs.apify.com/academy/scraping-basics-javascript/parsing-html",
  "contentType": "html",
  "renderedWith": "http",
  "statusCode": 200,
  "depth": 1,
  "foundVia": "link",
  "referrerUrl": "https://docs.apify.com/academy/scraping-basics-javascript",
  "startUrl": "https://docs.apify.com/academy/scraping-basics-javascript",
  "crawledAt": "2026-11-27T14:59:50.716Z",
  "contentHash": "b1afab232e66f578",
  "crawl": { "loadedUrl": "https://docs.apify.com/academy/scraping-basics-javascript/parsing-html", "depth": 1, "httpStatusCode": 200 },
  "metadata": { "title": "Parsing HTML with Node.js | Academy | Apify Documentation", "languageCode": "en" }
}
```

#### Export to Excel or CSV

Open the run's **Export** button and pick a view before you download: the dialog starts on **All fields**, which spreads headings, links and chunks over hundreds of columns. **Content for AI** gives one readable row per page with the URL, title, Markdown and text. Choose JSON for a document loader or a vector database.

### Benchmarks

Measured on Apify with the example input. Time is the run's total time as Apify reports it, start-up included.

| Task | Website Content Crawler | Date |
|---|---|---|
| 20 documentation pages (the example input) | **3.1 s** (median of 8 runs) | 27 Nov 2026 |
| 515 pages of docs.python.org and kubernetes.io, with chunks | **98 s** (5.4 pages per second) | 27 Nov 2026 |
| Lines repeated across a website's pages, share of the saved text (4 websites, 20 pages each) | **0% to 2.7%** | 27 Nov 2026 |
| 50 popular home pages in one run (Amazon, BBC, IKEA, gov.uk…) | **43 saved in 16.4 s**, 4 of them through a browser | 27 Nov 2026 |

### How much does it cost to crawl a website?

Pay per event. There is no start fee and empty runs are free.

| Event | Price |
|---|---|
| Page saved (web page, PDF or text file) | $1.00 per 1,000 |

Higher Apify plans pay less: $0.90 (Bronze), $0.80 (Silver), $0.65 (Gold and up) per 1,000 pages.

| Job | Cost |
|---|---|
| The example input (20 pages) | $0.02 |
| A documentation site of 500 pages, with chunks | $0.50 |
| 10,000 product and blog pages of an online shop | $10 |

Never charged: pages that fail, refuse the crawler, redirect out of scope, have no text, or repeat another page's text, and chunks (a page split into 30 chunks is one page). **Max pages** caps a run, and so does the run's maximum cost in the Console.

### Integrations

Save your input as a task, schedule it, and send the rows to Google Sheets, Make, n8n, Zapier or Slack. New to schedules? Apify's one-minute video shows how:

https://www.youtube.com/watch?v=1jI7WcVQmwM

- **LangChain and LlamaIndex:** the Apify dataset loader reads `url` and `markdown` (or `text`) from each row, exactly as with Apify's Website Content Crawler.
- **Pinecone, Qdrant, Weaviate:** use the **Chunks** view (`view=chunks`) to get one row per chunk with its heading path for the metadata.
- **n8n, Make, Zapier:** the Apify node or app, "Run an Actor and get dataset", Actor `laptime/website-content-crawler`.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("laptime/website-content-crawler").call(run_input={
    "startUrls": [{"url": "https://docs.python.org/3/tutorial/"}],
    "maxCrawlPages": 50,
    "chunkSize": 1500,
})
for chunk in client.dataset(run["defaultDatasetId"]).iterate_items(view="chunks"):
    print(chunk["url"], chunk["headings"], len(chunk["text"]))
```

#### One HTTP call

```bash
curl -X POST "https://api.apify.com/v2/acts/laptime~website-content-crawler/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>&view=content" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": [{"url": "https://react.dev/learn"}], "crawlScope": "pages"}'
```

#### Claude, ChatGPT, Cursor and other MCP clients

Add `https://mcp.apify.com?tools=laptime/website-content-crawler` as an MCP server, then ask: "Read the first 30 pages of the Kubernetes concepts docs and summarise how Pods, Deployments and Services relate."

### Switch from another website crawler

Inputs written for these work unchanged:

- **apify/website-content-crawler:** `startUrls`, `crawlerType` (`cheerio` = HTTP only; browser types and `playwright:adaptive` = auto), `maxCrawlPages`, `maxResults`, `maxCrawlDepth`, `includeUrlGlobs`, `excludeUrlGlobs`, `useSitemaps`, `htmlTransformer` (`none` keeps the whole page), `removeElementsCssSelector`, `keepElementsCssSelector`, `saveMarkdown`, `saveHtml`, `respectRobotsTxtFile`, `customHttpHeaders`, `initialCookies`, `keepUrlFragments`, `ignoreCanonicalUrl`.
- **pumpkinapi/website-content-crawler:** `maxPages`, `crawlScope` (`path`, `site`, `pages`), `includeUrls`, `excludeUrls`, `splitIntoChunks`, `chunkSize`, `chunkOverlap`, `removeRepeatedText`, `respectRobotsTxt` (start URLs as plain URLs, `{ "url": … }` objects or under `urls`).
- **topapi/website-content-crawler:** `crawlMode`, `renderJavaScript`, `maxCrawlPages`, `chunkSize`, `chunkOverlap`, `outputFormats`.

| Their field | Here |
|---|---|
| `url`, `markdown`, `text` | same |
| `crawl.loadedUrl`, `crawl.depth`, `crawl.httpStatusCode` | same (also flat: `url`, `depth`, `statusCode`) |
| `metadata.title`, `metadata.description`, `metadata.languageCode` | same (also flat: `title`, `description`, `language`) |
| pumpkin `chars`, `chunkIndex`, `headings` | `chunks[].chars`, `chunks[].chunkIndex`, `chunks[].headings` |

### FAQ

#### Do I need an account, cookies or an API key for the website?

No. The Actor reads public pages, logged out. For pages behind a login, pass your own session in `customHttpHeaders` or `initialCookies` through the API; they are sent only to the start URLs' websites.

#### Is it reliable?

An automated check runs the example input every morning. A website that refuses the crawler is retried through a datacenter proxy, a residential proxy and a browser, and a start URL that gives nothing is named in the run's final status with the reason (not found, refused, no readable text), at no charge.

#### Why did a website give fewer pages than I expected?

The scope keeps the crawl under the start URL by default: `https://example.com/docs/` never leaves `/docs/`. Set **Crawl scope** to **Whole website** to follow every link of the site. `RUN_STATS` in the run's storage counts, per start URL, the pages skipped and why (duplicate, out of scope, no text, refused).

#### Is it legal to crawl websites?

Crawling public pages is generally allowed, but personal data, copyright and a website's terms need care. Turn on **Respect robots.txt** for websites you don't own. Apify explains the rules in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

#### Does it send any data back?

Only anonymous error reports, so we hear about a broken page the day it breaks. A report has the Actor's name and build, the step that failed, the error type and HTTP status, and counts. It never has your input, your results, URLs or your Apify account. Untick **Anonymous error reports** (`telemetry: false`) to turn it off.

### More Laptime scrapers

- [Video Transcript Scraper](https://apify.com/laptime/video-transcript-scraper): transcripts of YouTube, TikTok, Instagram, Facebook and X videos, for the same AI pipelines.
- [Reddit Scraper](https://apify.com/laptime/reddit-scraper): posts, full comment threads, search and monitoring, with RAG-ready formats.
- [Google Trends Scraper](https://apify.com/laptime/google-trends-scraper): interest over time and rising related searches.

### Support

Found a bug, or missing a field? Open an issue and we'll answer within a day. Fixes and new fields are listed on the **Changelog** tab.

If it saved you time, a short review on the Actor page helps other people find it.

*Website Content Crawler is an independent tool. It is not affiliated with or endorsed by the websites it reads or by Apify's own Website Content Crawler.*

# Changelog

This Actor's version history is a separate document: https://apify.com/laptime/website-content-crawler/changelog.md

# Actor input Schema

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

Websites, sections or pages to crawl, e.g. https://docs.example.com/, example.com/blog/ or one article. The crawl follows links under each start URL (see Crawl scope). Plain URLs and Apify's {"url": "…"} objects both work, as does {"requestsFromUrl": "…"} for a text file of URLs.

## `maxCrawlPages` (type: `integer`):

Most pages saved in this run (all start URLs together). You pay only for saved pages, so this also caps the cost. 0 = no limit. Default 100.

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

Which links to follow: path (default) = pages under the start URL (https://example.com/docs/ reads only /docs/... pages); site = every page of that host, www or not; domain = also subdomains (blog.example.com etc.); pages = only the start URLs, no links followed.

## `maxCrawlDepth` (type: `integer`):

How many links away from a start URL the crawl goes. 0 = only the start URLs, 1 = start URLs and the pages they link to. Default 20.

## `includeUrlGlobs` (type: `array`):

Optional. Crawl only links matching one of these. A full-URL glob (https://example.com/blog/**) sets the scope itself, as in Apify's Website Content Crawler; /docs/** matches the path; plain text such as /guide/ matches any URL containing it.

## `excludeUrlGlobs` (type: `array`):

Optional. Links matching one of these are never fetched, e.g. https://example.com/**/tag/**, /blog/page/\*, or ?replytocom=. Same forms as above. Start URLs are always read.

## `useSitemaps` (type: `boolean`):

Also read the pages listed in the website's sitemaps (from robots.txt or /sitemap.xml) that no link led to. They follow the same scope and patterns and come after the linked pages.

## `outputFormats` (type: `array`):

Any of: markdown (keeps headings, lists, tables, links and code blocks), text (the same content without formatting), html (the cleaned main content as HTML). Default: markdown and text.

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

Keep the page's own content and leave out menus, headers, footers, sidebars, cookie banners, share buttons and text the website repeats on most pages. Untick to keep the whole page.

## `removeElementsCssSelector` (type: `string`):

Optional CSS selector of more elements to leave out, e.g. .newsletter, #comments, table.ads.

## `keepElementsCssSelector` (type: `string`):

Optional CSS selector: only matching elements are read, e.g. article or .docs-content. A page where nothing matches is skipped and not charged.

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

Optional. Split each page into chunks of at most this many characters for embeddings, each with the headings above it (field chunks, view Chunks). 1,000-2,000 suits most models. 0 = no chunks. Same price.

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

Each chunk starts with up to this many characters from the end of the one before, cut at a word. At most a quarter of the chunk size. 0 = no overlap.

## `crawlPdfs` (type: `boolean`):

Also read PDF files linked inside the crawl scope (and PDF start URLs) and save their text as rows, same price per file. Off: PDF links are skipped.

## `renderingType` (type: `string`):

auto (default) = fast HTTP for every page, a headless browser only for pages that build their text with JavaScript; http = never a browser (fastest); browser = every page in a browser (slow; for sites that need it).

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

Skip pages the website's robots.txt disallows and wait as long as its Crawl-delay asks (up to 10 s). Off by default, like Apify's Website Content Crawler; turn on for websites you don't own.

## `telemetry` (type: `boolean`):

Sends the Actor's author an anonymous report when a run hits an error (error type, failing step, HTTP status, counts). Never your input, results, URLs or account. Untick to turn it off.

## Actor input object example

```json
{
  "startUrls": [
    "https://docs.apify.com/academy/scraping-basics-javascript"
  ],
  "maxCrawlPages": 20,
  "crawlScope": "path",
  "maxCrawlDepth": 20,
  "includeUrlGlobs": [],
  "excludeUrlGlobs": [],
  "useSitemaps": true,
  "outputFormats": [
    "markdown",
    "text"
  ],
  "extractMainContent": true,
  "chunkSize": 0,
  "chunkOverlap": 0,
  "crawlPdfs": false,
  "renderingType": "auto",
  "respectRobotsTxt": false,
  "telemetry": true
}
```

# Actor output Schema

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

Every saved page with all its fields, in the order crawled.

## `overview` (type: `string`):

One row per page: URL, title, words, language, how it was read, Markdown.

## `content` (type: `string`):

URL, title, description, Markdown and text: what an LLM or a document loader needs.

## `chunks` (type: `string`):

With Chunk size set: one row per chunk with the page URL, title and the headings above the chunk, ready for embeddings.

## `metadata` (type: `string`):

Title, description, language, author, dates, canonical URL, site name, keywords, share image.

## `crawl` (type: `string`):

Start URL, depth, how each page was found, HTTP status, browser or not, text hash.

## `runStats` (type: `string`):

RUN_STATS: pages, seconds, pages skipped by reason per start URL, routes, browser pages.

# 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.apify.com/academy/scraping-basics-javascript"
    ],
    "maxCrawlPages": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("laptime/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://docs.apify.com/academy/scraping-basics-javascript"],
    "maxCrawlPages": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("laptime/website-content-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.apify.com/academy/scraping-basics-javascript"
  ],
  "maxCrawlPages": 20
}' |
apify call laptime/website-content-crawler --silent --output-dataset

```

## MCP server setup

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