Website to RAG Dataset with Source Spans avatar

Website to RAG Dataset with Source Spans

Pricing

$30.00 / 1,000 source-linked rag corpus reports

Go to Apify Store
Website to RAG Dataset with Source Spans

Website to RAG Dataset with Source Spans

Prepare website content with heading paths, original anchors and exact text spans. The report exports pages and compatible chunks for retrieval. Send public URLs or saved HTML through the input to create one bounded corpus report.

Pricing

$30.00 / 1,000 source-linked rag corpus reports

Rating

0.0

(0)

Developer

Daniel Michałek

Daniel Michałek

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

10 days ago

Last modified

Categories

Features

Limited permissions

Share

What it does

Prepare static website content for a retrieval workflow with evidence that can be traced back to a document snapshot. Choose a bounded public HTML crawl or supply exported HTML. The result contains heading paths, paragraphs, list items, code and table blocks, original anchors and exact positions in normalized text. It also includes pages and chunks compatible with the existing RAG Delta Sync character-based contract.

This is a preprocessing tool. It makes no model or embedding calls and does not connect to a vector database. Input text remains untrusted source data. An extracted citation identifies a location; it does not prove that an answer is true or that the live website is unchanged.

Input

Set mode to suppliedHtml and provide documents with id, sourceUrl and html. A sourceUrl in this mode is a label supplied by you. Set mode to crawl and provide startUrls for public static HTML pages. Use one mode at a time. The defaults demonstrate supplied HTML; examples/network-input.json demonstrates a real public URL.

The optional selector identifies the main content. A missing or invalid selector rejects that source. Without a selector, one main element is preferred, followed by one article; a body fallback is explicitly flagged. Scripts and forms are excluded. Navigation and other boilerplate are removed by default. Static HTML extraction does not execute JavaScript.

Limits are 20 documents or page attempts, 500000 bytes per HTML source, 2000000 serialized supplied-input bytes, 25000 DOM nodes and 256 levels per document, 20000 UTF-16 text units per exported page, 2000 blocks and 2000 chunks per report, and 6000000 serialized report bytes. Limits interact. Pages exceeding a text limit are rejected with an explicit error. Long title and heading labels may be shortened with explicit metadata. Source text spans remain intact.

Output

One dataset record contains pages, documents, blocks, chunks, duplicate groups and explicit source errors. PAGES_JSONL and CHUNKS_JSONL contain one JSON record per line. CHUNKS_CSV is a spreadsheet export and REPORT is a Markdown overview. All exact duplicate content is retained with its source references. No automatic cross-source deduplication discards context.

Blocks and chunks use start-inclusive/end-exclusive offsets in NFC_NORMALIZED_TEXT_V1, measured in UTF16_CODE_UNITS. These are positions in the exported text, not byte positions in raw HTML. DOM paths refer to the original parsed static DOM before boilerplate removal. Citation URLs use an existing unique ancestor or heading anchor, or the document URL. A block ID is never presented as a fabricated URL fragment.

The htmlSha256 hashes the UTF-8 encoding of the decoded HTML string. Fetched evidence separately records the hash of decompressed HTTP body bytes and the content type. Supplied evidence labels the input string and does not assert a network fetch. Metadata, source URLs and content can contain sensitive information; use authorized material and review exports before sharing.

Downstream integration

Pass report.pages as currentPages to RAG Delta Sync. This Actor dataset contains one aggregate record, so its dataset ID is not a page-per-row input dataset. Alternatively import PAGES_JSONL into a separate page dataset. Keep chunkChars unchanged: chunk IDs use the exact rag-delta-v1 URL/content-hash/occurrence contract. Offsets use UTF-16, while the chunk budget counts Unicode code points.

siteCoverage is always NOT_ASSERTED and downstreamSnapshotComplete is false. A successful bounded crawl or supplied batch does not authorize deletion of missing website pages. Review partial sources and configure deletion gates independently. CSV formula prefixes are made literal for spreadsheet safety; JSONL preserves the exact original chunk text.

Pricing and cost control

Pricing uses one aggregate corpus report. The active price, when published, is shown on the Pricing tab. Cost measurements apply to the tested input and pricing tier; they do not establish a universal maximum cost, paid demand or realized margin. A local build does not activate a Store price. Local SDK execution uses local storage without billed events.

The runtime allows one aggregate report, at most 80 HTTP requests and 120 seconds overall, with a shorter transport deadline and time reserved for exports. Redirect and robots requests count. The bounded body reader caps individual responses and separately tracks observed HTTP body payload and decoded data. Total billed network traffic requires provider measurements. The final read chunk can cross an observed-body threshold before the connection is closed. No proxy or retry service is used.

Only a delivered report is eligible for its event. When no source can be exported, the run fails with FETCH_DIAGNOSTICS and no report delivery. A PREPARED delivery requires reconciliation. A verified COMPLETE replay reuses stored exports and makes no new crawl or charge.

Limitations and fair use

Use websites and HTML you are authorized to process. The crawler uses its transparent GnyPciorRAGDataset product identity, honors the exact robots decision for each destination, and checks policies again after allowed redirects. Missing404/410 robots files permit a page request; authentication failures, rate limits, server failures and malformed policies do not become an empty allowed policy. A conservative maximum Crawl-delay is respected; delays beyond the bounded run policy are refused.

Crawls stay within declared seed origins, with same-host HTTP-to-HTTPS upgrades. Cross-origin redirects and base elements cannot silently extend the crawl. CAPTCHA/challenge pages, protected content and explicit noai/noarchive or ai-input=no restrictions are not exported. The Actor does not solve CAPTCHA, authenticate, render browser-only pages, infer legal rights or guarantee complete crawling. Public IP checks, pinned DNS lookup and normal TLS certificate checks protect the request route.

Example

examples/input.json provides two demonstration HTML documents with headings and existing anchors. Source URLs there are supplied labels. examples/output.json is generated from the actual SDK entry point. examples/network-input.json requests example.com with a one-page bound. Source storage remains in the requesting account dataset and key-value store under its retention settings.

Build and tests

The package uses exact SDK/parser versions and retains the existing basic-ftp override. npm ci runs with lifecycle scripts disabled. npm test runs pure extraction, crawl-policy and delivery tests. npm start runs the normal Apify SDK entry point with an explicit heap budget. Local/runtime and future cloud receipts state their own evidence scope; local success alone is not publication or a measured commercial margin.