# Chunk product docs for a support chatbot

**Use case:** 

Three pages of product documentation go in, chunks ready to embed come out: each chunk keeps its source URL, its heading path and exact token counts, the pricing table stays in one piece, and the page that is mirrored on a second URL is delivered once with both URLs kept. Change the records for your own pages, or point the Actor at a dataset from a crawler.

## Input

```json
{
  "records": [
    {
      "schemaVersion": "1.0",
      "inputId": "pricing",
      "status": "succeeded",
      "finalUrl": "https://docs.example.com/billing/pricing",
      "title": "Pricing",
      "language": "en",
      "markdown": "# Pricing\n\nEvery plan includes the API, webhooks and email support.\n\n## Plans\n\n| Plan | Monthly | Seats |\n|------|---------|-------|\n| Starter | $29 | 3 |\n| Team | $99 | 15 |\n\n## Billing questions\n\n### When am I charged?\n\nOn the first day of each billing period, for the period ahead.\n\n### Can I change plan mid-month?\n\nYes. The change takes effect immediately and the next invoice is prorated."
    },
    {
      "schemaVersion": "1.0",
      "inputId": "install",
      "status": "succeeded",
      "finalUrl": "https://docs.example.com/start/install",
      "title": "Install the agent",
      "language": "en",
      "markdown": "# Install the agent\n\nThe agent runs on Linux and macOS.\n\n```bash\ncurl -fsSL https://example.com/install.sh | sh\nagent login --token \"$TOKEN\"\nagent start\n```\n\n- Windows support is in preview.\n- The agent needs outbound HTTPS only."
    },
    {
      "schemaVersion": "1.0",
      "inputId": "pricing-mirror",
      "status": "succeeded",
      "finalUrl": "https://mirror.example.net/billing/pricing",
      "title": "Pricing",
      "language": "en",
      "markdown": "# Pricing\n\nEvery plan includes the API, webhooks and email support.\n\n## Plans\n\n| Plan | Monthly | Seats |\n|------|---------|-------|\n| Starter | $29 | 3 |\n| Team | $99 | 15 |\n\n## Billing questions\n\n### When am I charged?\n\nOn the first day of each billing period, for the period ahead.\n\n### Can I change plan mid-month?\n\nYes. The change takes effect immediately and the next invoice is prorated."
    }
  ],
  "sourceWaitSeconds": 900,
  "tokenizer": "cl100k_base",
  "chunkSize": 256,
  "chunkOverlap": 32,
  "sourceField": "auto",
  "dedupeMode": "exact",
  "nearDuplicateThreshold": 0.95,
  "minDocumentCharacters": 1,
  "maxDocuments": 1000,
  "maxDocumentCharacters": 500000,
  "maxTotalCharacters": 20000000,
  "maxChunks": 20000,
  "saveNormalizedSources": false
}
```

## Output

```json
{
  "sourceUrl": {
    "label": "Source",
    "format": "string"
  },
  "headingPath": {
    "label": "Section",
    "format": "array"
  },
  "chunkIndex": {
    "label": "#",
    "format": "integer"
  },
  "tokenCount": {
    "label": "Tokens",
    "format": "integer"
  },
  "text": {
    "label": "Text",
    "format": "string"
  },
  "chunkId": {
    "label": "Chunk ID",
    "format": "string"
  },
  "documentId": {
    "label": "Document ID",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [RAG Dataset Builder - Source-Linked Chunks for Retrieval](https://apify.com/leadproof/rag-dataset-builder.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/leadproof/rag-dataset-builder.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/leadproof/rag-dataset-builder.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`).
