RAG Chunking Crawler — Web Pages to Text Chunks avatar

RAG Chunking Crawler — Web Pages to Text Chunks

Pricing

from $3.00 / 1,000 rag chunk returneds

Go to Apify Store
RAG Chunking Crawler — Web Pages to Text Chunks

RAG Chunking Crawler — Web Pages to Text Chunks

Crawl public web pages into RAG-ready text chunks with your chunk size and overlap, plus source URL, title and headings. USD 7 per 1,000 chunks.

Pricing

from $3.00 / 1,000 rag chunk returneds

Rating

0.0

(0)

Developer

Muhammad Afzal

Muhammad Afzal

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

22 days ago

Last modified

Features

Limited permissions

Share

RAG Chunking Crawler reads public web pages from the URLs you give it, optionally follows links on the same site, strips navigation and boilerplate, and returns the text already split into chunks of the size and overlap you choose, each with its source URL, title, and position. It is built for developers loading retrieval-augmented generation (RAG) pipelines, vector databases, and AI agents, and costs USD 7 per 1,000 chunks on the FREE pricing tier (USD 0.007 per chunk) plus a USD 0.005 start fee.

You get one dataset row per chunk, ready to embed. The Actor does not create embeddings and does not run web searches; it starts from your URLs.

What does the RAG chunking crawler return?

Each row is one text chunk from one page.

FieldWhat it contains
contentThe chunk text: about chunkSize characters, plus any overlap carried over from the previous chunk
chunkIndex, totalChunksPosition of this chunk within its page, and the page's chunk count
sourceUrlThe page the chunk came from
canonicalUrlThe page's declared canonical URL, or null
titlePage title (from og:title, <title>, or the first h1)
descriptionMeta description, or null
headingPathThe page's first eight h1–h4 headings, repeated on every chunk of that page
wordCountApproximate words in the chunk
crawlDepth0 for a start URL, 1 for pages linked from it, and so on
contentTypeAlways web-page
fetchedAtUTC time the chunk was produced
chunkIdA stable ID: a 16-character hash of the page's final URL plus the chunk index, unique for each page and chunk

The OUTPUT record in the key-value store reports pages fetched, chunks returned and charged, failed requests, the stop reason, and warnings such as pages with no readable text.

How does the chunking work?

Text is split at paragraph boundaries first, then by length.

  1. The page is parsed as static HTML. Scripts, styles, forms, nav, header, footer, aside, hidden elements, and elements with a cookie or cookies class are removed.
  2. Text is collected from headings, paragraphs, list items, code blocks, quotes, and table cells inside main or article when present, otherwise from the whole body.
  3. Paragraphs are joined until the next one would push the chunk past chunkSize.
  4. A paragraph longer than chunkSize is cut at fixed character positions.
  5. The last chunkOverlap characters of each chunk are repeated at the start of the next, so a sentence cut at a boundary keeps its context.

The defaults are 1,200 characters with a 150-character overlap, roughly 200 words per chunk.

How do I turn a website into RAG chunks?

Add one or more start URLs. To read more than those pages, turn on crawlLinks.

InputDefaultAccepted values
startUrlshttps://example.com1–100 public http or https URLs
crawlLinksfalsetrue follows links on the same domain
maxPages101–100 pages fetched in the whole run
maxDepth20–10 link hops from each start URL
chunkSize1200300–5,000 characters
chunkOverlap1500–1,000 characters, always less than chunkSize
requestTimeoutSecs4510–120 seconds per page
{
"startUrls": [{ "url": "https://docs.example.com/guide/" }],
"crawlLinks": true,
"maxPages": 30,
"maxDepth": 2,
"chunkSize": 1000,
"chunkOverlap": 120
}

Duplicate and non-HTTP start URLs are dropped and counted in OUTPUT warnings.

When should you use it, and when not?

Use it when:

  • you are building a knowledge base or support bot from documentation, help-center, or policy pages;
  • an AI agent needs short, source-linked passages it can cite;
  • you want chunking done before the data reaches your embedding step.

Do not use it when:

Use it from an AI assistant

RAG Chunking Crawler works from Claude, ChatGPT, Cursor, or any other MCP client through Apify's MCP server. Add https://mcp.apify.com/?tools=muhammadafzal/rag-web-browser to your client and ask, for example: "Crawl up to 20 pages of our help center starting at this URL and give me 800-character chunks I can load into our vector store."

Run it with the API

JavaScript (apify-client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/rag-web-browser').call({
startUrls: [{ url: 'https://docs.example.com/guide/' }],
crawlLinks: true,
maxPages: 20,
chunkSize: 800,
chunkOverlap: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const docs = items.map((c) => ({ id: `${c.sourceUrl}#${c.chunkIndex}`, text: c.content, title: c.title }));

Python (apify-client 3.x):

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("muhammadafzal/rag-web-browser").call(
run_input={"startUrls": [{"url": "https://docs.example.com/guide/"}], "crawlLinks": True, "maxPages": 20}
)
for chunk in client.dataset(run.default_dataset_id).iterate_items():
doc_id = f'{chunk["sourceUrl"]}#{chunk["chunkIndex"]}'
print(doc_id, chunk["wordCount"], chunk["content"][:60])

Output example

The first row shows what the default input produces for https://example.com (one short paragraph, no headings; text and timestamp shortened or illustrative). The second is an illustrative chunk from a crawled documentation page.

[
{
"chunkId": "0f115db062b7c0dd-0",
"sourceUrl": "https://example.com",
"canonicalUrl": null,
"title": "Example Domain",
"description": null,
"headingPath": [],
"content": "This domain is for use in documentation examples without needing permission. …",
"contentType": "web-page",
"chunkIndex": 0,
"totalChunks": 1,
"wordCount": 25,
"crawlDepth": 0,
"fetchedAt": "2026-10-27T09:12:04.511Z"
},
{
"chunkId": "da78b9a52ce0fe71-3",
"sourceUrl": "https://docs.example.com/guide/configure",
"canonicalUrl": "https://docs.example.com/guide/configure",
"title": "Configure the client | Example Docs",
"description": "Set credentials, regions, and retry options.",
"headingPath": ["Configure the client", "Credentials", "Retries"],
"content": "…retry options apply per request.\n\nRetries\n\nSet maxRetries to control how many times a failed call is repeated…",
"contentType": "web-page",
"chunkIndex": 3,
"totalChunks": 6,
"wordCount": 171,
"crawlDepth": 1,
"fetchedAt": "2026-10-27T09:14:40.208Z"
}
]

Use chunkId as your vector-store ID. It is a hash of the full page URL plus chunkIndex, so pages under the same long path never share an ID, and re-reading the same page gives the same IDs for upserts.

Pricing: how much does RAG chunking cost?

You pay per chunk returned, plus a start fee. Apify platform usage is included.

EventFREEBRONZESILVERGOLD, PLATINUM, DIAMOND
RAG chunk returned (primary event)USD 0.007USD 0.006USD 0.005USD 0.003
Per 1,000 chunksUSD 7.00USD 6.00USD 5.00USD 3.00
Actor start, per started GB of allocated memoryUSD 0.005USD 0.005USD 0.005USD 0.005

The default memory is 1 GB, so a run has one start event.

  • Default run, https://example.com, 1 chunk, FREE tier: USD 0.005 + USD 0.007 = USD 0.012.
  • A crawl that returns 60 chunks, FREE tier: USD 0.005 + 60 × USD 0.007 = USD 0.425 (USD 0.185 on GOLD).

The chunk count depends on page length and chunkSize: larger chunks mean fewer events. There is no chunk cap in the input, so set a maximum total charge on the run if you need a hard budget. The run stops cleanly before a chunk that the budget cannot cover, and every saved chunk is charged.

Limits and reliability

  • Up to 100 start URLs and 100 fetched pages per run, three pages at a time, with two retries per page.
  • crawlLinks follows links on the same domain, subdomains included, up to maxDepth.
  • The crawler does not read robots.txt and does not log in. Crawl only sites you are allowed to.
  • Pages with no readable text produce no chunks and a warning in OUTPUT. A start URL that redirects to a page already read is skipped, so its chunks are not returned or charged twice. If every request fails, the run ends as failed.

FAQ

What chunk size and overlap should I use for RAG?

Start with the default 1,200 characters and 150 overlap. Use 500–800 characters for precise question answering, or 2,000 or more when answers need more context.

Does it create embeddings or write to my vector database?

No. It returns text chunks and metadata. Embed them with your own model and load them into any vector store.

Can it crawl a whole website?

It can crawl up to 100 pages per run on one domain, up to 10 links deep. Split larger sites into several runs with different start URLs.

Does it work on JavaScript-heavy sites?

Only for text present in the initial HTML. It does not run page scripts.

Why are some chunks shorter than my chunk size?

A chunk ends where the next paragraph would not fit, and the last chunk of a page holds whatever text is left.

Can I search the web with a question instead of giving URLs?

No. It needs URLs. Find pages first, then pass their URLs in startUrls.

Only crawl public pages you are permitted to access and reuse. Respect site terms and copyright when you store or redistribute chunked text, and handle any personal data in it under the laws that apply to you.

Last verified: 2026-10-27