# Turn the Crawlee docs into Markdown for a RAG knowledge base

**Use case:** 

Crawl the Crawlee for JavaScript guides one link deep from the quick start and get each page as clean Markdown: main content only, with headings, lists, tables and code blocks kept, plus title, description, word count and character count per page. Swap in your own documentation or help-center URL to build a knowledge base for an LLM or AI agent.

## Input

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

## Output

```json
{
  "url": {
    "label": "Url",
    "format": "string"
  },
  "title": {
    "label": "Title",
    "format": "string"
  },
  "depth": {
    "label": "Depth",
    "format": "integer"
  },
  "wordCount": {
    "label": "Word Count",
    "format": "integer"
  },
  "markdownLength": {
    "label": "Markdown Length",
    "format": "integer"
  },
  "statusCode": {
    "label": "Status Code",
    "format": "integer"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Website Content Crawler: Markdown for AI and RAG Actor is ready to run with the inputs already set for "Turn the Crawlee docs into Markdown for a RAG knowledge base". [Sign up or log in](https://console.apify.com/create-task-from-example/V7okmCDiKRaM0sXOD) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Turn the Crawlee docs into Markdown for a RAG knowledge base" task

The Website Content Crawler: Markdown for AI and RAG Actor will start running based on the input automatically. You can also change all the input fields, like page urls, crawl depth, and more, to match your specific use case.

### 3. Receive the "Turn the Crawlee docs into Markdown for a RAG knowledge base" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as url, title, depth, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Turn the Crawlee docs into Markdown for a RAG knowledge base" task via API](https://apify.com/lowcountrytech/website-content-to-markdown.md).

## FAQ

### What does this docs-to-Markdown task return?

One record per page: the URL, title, meta description, language, the page's main content as Markdown (headings, lists, tables, code blocks, links), its H1-H3 headings, a word count and a character count for sizing LLM context.

### Can I convert my own documentation or help center?

The Crawlee docs to Markdown task works for any docs site: duplicate it, set the start URL to your docs page and the URL filter to the section, e.g. /docs/ or /help/. Depth 1 follows links from the start page; depth 2 one level further.

### How many pages does one run convert?

At most the item limit, here 10. Raise it for a full section (up to 1,000 pages per crawl). Pages on one site are fetched about one per second, and robots.txt is respected, so a large section takes a few minutes.

### Does it render JavaScript?

The Crawlee docs to Markdown task reads the HTML the server sends without rendering JavaScript. That works for most docs, blogs and help centers and keeps runs cheap; pages built entirely in the browser come back short.

## About this Actor

This example demonstrates how to use [Website Content Crawler: Markdown for AI and RAG](https://apify.com/lowcountrytech/website-content-to-markdown.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/lowcountrytech/website-content-to-markdown.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/lowcountrytech/website-content-to-markdown.md

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`).
