# Turn Technical Documentation into RAG Markdown Chunks

**Use case:** 

Convert public technical documentation into clean Markdown chunks with source URLs, section context, estimated token counts and SHA-256 hashes. Preserve code blocks and tables for your retrieval pipeline. Start with the Apify Actors documentation page, then enable sitemap or llms.txt discovery to expand coverage.

## Input

```json
{
  "docsUrls": [
    "https://docs.apify.com/actors"
  ],
  "crawlViaSitemap": false,
  "maxPages": 2,
  "maxItems": 3,
  "maxTokensPerChunk": 500,
  "overlapTokens": 50,
  "timeoutSecs": 15,
  "maxConcurrency": 25
}
```

## Output

```json
{
  "sourceUrl": {
    "label": "Source URL",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "pageTitle": {
    "label": "Page title",
    "format": "string"
  },
  "sectionBreadcrumb": {
    "label": "Section breadcrumb",
    "format": "string"
  },
  "chunkIndex": {
    "label": "Chunk index",
    "format": "integer"
  },
  "totalChunksInPage": {
    "label": "Chunks in page",
    "format": "integer"
  },
  "estimatedTokens": {
    "label": "Estimated tokens",
    "format": "integer"
  },
  "programmingLanguages": {
    "label": "Programming languages",
    "format": "array"
  },
  "hasCodeBlock": {
    "label": "Contains code",
    "format": "boolean"
  },
  "sha256Hash": {
    "label": "SHA-256 hash",
    "format": "string"
  },
  "markdownChunk": {
    "label": "Markdown chunk",
    "format": "string"
  },
  "scrapedAt": {
    "label": "Scraped at",
    "format": "string"
  },
  "errorMessage": {
    "label": "Error message",
    "format": "string"
  }
}
```

## How it works

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

The Technical Docs To Rag Markdown Chunker Actor is ready to run with the inputs already set for "Turn Technical Documentation into RAG Markdown Chunks". [Sign up or log in](https://console.apify.com/create-task-from-example/kh627QFg8bh0GhqEz) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Turn Technical Documentation into RAG Markdown Chunks" task

The Technical Docs To Rag Markdown Chunker Actor will start running based on the input automatically. You can also change all the input fields, like documentation urls, discover documentation pages, and more, to match your specific use case.

### 3. Receive the "Turn Technical Documentation into RAG Markdown Chunks" 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 source url, status, page title, 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 Technical Documentation into RAG Markdown Chunks" task via API](https://apify.com/arezdev/technical-docs-to-rag-markdown-chunker.md).

## FAQ

### Does this create embeddings or populate a vector database?

It produces Markdown chunks and metadata for your ingestion pipeline. Your own embedding model and database handle vector generation, indexing and retrieval.

### How are additional documentation pages discovered?

Enable discovery to check llms-full.txt, llms.txt and sitemap.xml, including supported nested indexes. Candidates must stay on the allowed origin and documentation path prefix. Without usable discovery data, only the supplied page is processed.

### Are code examples and tables preserved?

The Actor keeps complete fenced code blocks and indivisible table rows. It removes common navigation and page furniture while retaining supported headings, lists, links and content structure.

### Why can a chunk exceed the target token count?

Token counts are estimated from UTF-8 byte length. Complete code blocks and table rows can exceed the target. Prose overlap is bounded, must be smaller than the chunk target, and is included only when space permits.

### What is the difference between page and output limits?

Maximum pages limits unique attempted documentation pages. Maximum output rows limits saved chunks and error records; one page can produce several rows. Client-only, protected or unreadable documentation can return errors instead of content.

## About this Actor

This example demonstrates how to use [Technical Docs To Rag Markdown Chunker](https://apify.com/arezdev/technical-docs-to-rag-markdown-chunker.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/arezdev/technical-docs-to-rag-markdown-chunker.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/arezdev/technical-docs-to-rag-markdown-chunker.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`).
