You can pass HTML text to a model, but that is rarely a good retrieval corpus. A page often includes menus, cookie notices, related links, scripts, hidden text, and duplicated templates. If you split by arbitrary character count, chunks can cross headings and tables or repeat the same navigation hundreds of times. Retrieval then ranks page chrome alongside the answer. Nstdata Crawl offers Markdown and other output artifacts, which is a useful starting point, but format conversion is only one quality gate.
Keep enough provenance to debug a bad answer: original URL, canonical URL, retrieval timestamp, page status, title, output format, crawl job ID, and a raw or recoverable artifact reference. Nstdata's Crawl documentation separates site-job status, page records, and storage reads. If a record contains markdownRef, fetch the referenced body before chunking. Do not treat a completed job as proof that every page is usable. A 403 page that says βAccess Deniedβ can be syntactically valid Markdown and semantically useless.
A practical HTML-to-document acceptance pipeline
Scope discovery. Define allowed domains, path rules, depth, and maximum URLs. Record skipped and out-of-scope links. URL discovery guidance covers the problem of finding pages without crawling forever.
Retrieve and classify. Record status code, content type, redirects, and crawl errors separately. Retry transient failures with a cap; do not retry permanent failures indefinitely.
Extract main content. Remove repeated site chrome while preserving headings, tables, code, and meaningful links. Markdown is useful when the conversion keeps that structure.
Normalize identity. Resolve canonicals and redirects, deduplicate, and assign stable IDs. Store the fetched timestamp so stale pages can be identified.
Validate. Reject empty pages, access-denied templates, near duplicates, and pages without meaningful body text. Keep a rejection reason for every URL.
Chunk and index. Split on section boundaries with a token budget; attach URL, title, heading path, and timestamp to each chunk. Chunking strategies gives alternatives.
Refresh and delete. Re-crawl on a schedule, upsert changed chunks, and delete documents no longer present or allowed.
The Scrapy overview shows the alternative of owning the crawler. The output contract should be an application-level document, not a vendor response. A minimal record might be {id, canonical_url, title, markdown, fetched_at, status, raw_ref}. Do not put a storage reference into the markdown field. The Firecrawl crawl guide likewise separates a crawl job from returned page data; both vendors need a normalizer before RAG indexing.
What should chunking preserve?
A chunk should be readable without the rest of the page but should retain its heading path and source URL. Keep code blocks intact where possible; split long tables by rows with repeated column headings; avoid stitching unrelated FAQ answers together. Overlap can help when a sentence crosses boundaries, but too much overlap increases index size and duplicate retrieval. Store the chunker version because changing split rules requires an index migration or reprocessing.
A useful quality sample includes pages with nested headings, code examples, tables, images with captions, and PDF-like layouts. Inspect the actual Markdown output, not only a rendered preview. If target pages include JavaScript content, check whether the crawler waits for the relevant body. The Crawl4AI documentation is a useful reference for extraction and rendering controls when you compare build and buy options.
How do you know the RAG corpus is ready?
Evaluate three layers. Acquisition: what share of expected URLs produced accepted documents, and what were the failure classes? Retrieval: for fixed questions, do the correct chunks appear in the top results? Answering: are claims supported by cited URLs, and does the model abstain when no evidence exists? Use a held-out question set and repeat after recrawls. A high crawl response count can coexist with a poor answer set if navigation or stale duplicates dominate the index.
Record full cost per accepted document and per successful answer. Nstdata's Crawl pricing page lists URL rates plus proxy traffic, while its product FAQ has a conflicting lower figure; confirm the current account rate. The RAG knowledge-base guide and crawl success-rate methodology give a path for measuring the end-to-end result rather than assuming the crawler solved it.
When should you use a managed Crawl API?
Use one when site discovery, rendered retrieval, and page artifacts would otherwise absorb scarce engineering time. Keep your own quality gates, metadata model, and index update logic so the corpus remains portable. If you already have a trustworthy URL list and only need page fetches, compare a fetch API too. The right contract is the one that reliably produces your accepted document, with a cost and error model your team can operate.
Experience Nstdata β Start Your Free Trial Today
Inspect a bounded Nstdata crawl on your own permitted site, then validate each artifact against your RAG document contract.