Website to Markdown & RAG Refresh API
Pricing
from $0.50 / 1,000 page indexeds
Website to Markdown & RAG Refresh API
Convert website pages and sitemaps to clean Markdown, cited RAG chunks and FAQ retrieval tests. Refresh changed pages with strict page and spending limits.
Pricing
from $0.50 / 1,000 page indexeds
Rating
0.0
(0)
Developer
SolidScrape
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
19 days ago
Last modified
Categories
Features
Share
Website to Markdown, cited RAG chunks and safe refreshes
Give the API public HTML pages or a small sitemap you have permission to process. It returns clean Markdown, text and code chunks with source citations, content hashes, and real FAQ headings as candidate retrieval tests. Optional refresh snapshots distinguish initial, new, updated and unchanged pages. Existing URL-only inputs and chunk fields continue to work.
Use it to seed a documentation assistant, refresh a chatbot knowledge base, or evaluate retrieval before changing embedding models. All collection, Markdown conversion and chunking run inside the Actor container. Embeddings and model-generated text are outside the price and scope.
Follow the website refresh tutorial and download the working example.
Discover pages from a sitemap
This small example discovers the English FAQ page from the official Sitemaps.org sitemap. The path filter is checked before any content-page request. Robots and sitemap requests remain billable.
{"sitemapUrls": ["https://www.sitemaps.org/sitemap.xml"],"includePathPrefixes": ["/faq.html"],"maxPages": 1,"maxChunks": 100,"maxSpendUsd": 0.02}
One robots check, one sitemap fetch and one productive page cost $0.007. urls and sitemapUrls can be combined. Supplied URLs are first, followed by sitemap order. includePathPrefixes and excludePathPrefixes are literal path prefixes, such as /docs/, with exclusions taking priority. These filters apply to pages; sitemap documents must still be fetched for discovery. Child sitemaps and their pages stay on their originating sitemap's host. Cross-origin, credential-bearing, query-string and non-HTTPS locations are rejected.
Refresh only pages that changed
After the first successful run, copy its SNAPSHOT record into previousSnapshot on the next run. Keep chunkChars the same and set changesOnly: true. The default dataset and MARKDOWN.pages then contain only initial, new or updated pages. Unchanged pages remain listed in MANIFEST and retain their stored chunk references.
An unchanged check still fetches the source to verify its content. It incurs the same request fees but no page-indexed fee. For the one-page sitemap example, an unchanged refresh costs $0.0065. For the direct Python FAQ below, it costs $0.005. Snapshot timestamps record observation time, not the source's publication time.
Only completely processed pages advance their snapshot hash. Failed, filtered, unvisited and chunk-limited pages retain their old snapshot records. A URL disappearing from a sitemap is not treated as a deletion. MANIFEST.safeToDeleteMissingPages is always false. Retain prior index entries for these pages and handle intentional removals in your application. Snapshot state contains hashes and chunk IDs, not old text, so keep your own corpus. Native schedules with a fixed input do not automatically carry a new snapshot forward; your client must load the latest SNAPSHOT before each refresh.
SNAPSHOT holds up to 200 page records and 150 KB across runs. A snapshot limit stops new acknowledgements rather than dropping existing state. Split large sites into path-specific tasks. With changesOnly: false (the default), unchanged pages produce their ordinary chunk output and can incur an indexed-page event.
Clean Markdown for AI tools
Open MARKDOWN in the output to retrieve one record per successfully extracted page with sourceUrl, title, markdown, contentHash, change, retrievedAt and chunksComplete. Markdown keeps headings, ordinary links, fenced code, lists and supported tables, and removes navigation and scripts. Links are resolved to absolute HTTP(S) URLs; images are referenced, not downloaded. Complex layouts and JavaScript-only content need another collection method. A page's full Markdown can exist even when its chunk output was capped, so check chunksComplete before replacing that page's vector index.
Try one Python FAQ page
Open the prefilled Python FAQ example to turn one documentation page into cited chunks and retrieval tests.
Using Python? Download the developer starter kit, then follow its guide to run python run.py docs. The client sets a $0.02 cap per run.
{"urls": ["https://docs.python.org/3/faq/general.html"],"chunkChars": 1800,"maxChunks": 30,"maxSpendUsd": 0.02}
This example costs $0.0055 when its robots request and page request succeed and the page yields chunks. Actual content and chunk count depend on the upstream document. To sample code, replace the URL with https://docs.python.org/3/tutorial/errors.html. Open the Chunks output, then the EVAL_CASES record under Storage. If a page has no qualifying question headings, EVAL_CASES is an empty array.
Use from an application or a coding assistant
Set APIFY_TOKEN in your own runtime environment. This Node.js example requests the same small corpus and shows the citation and content hash for the first chunk.
const response = await fetch("https://api.apify.com/v2/acts/solidscrape~docs-to-rag-dataset/run-sync-get-dataset-items?maxTotalChargeUsd=0.02",{method: "POST",headers: {Authorization: "Bearer " + process.env.APIFY_TOKEN,"Content-Type": "application/json"},body: JSON.stringify({urls: ["https://docs.python.org/3/faq/general.html"],maxChunks: 30,maxSpendUsd: 0.02})});if (!response.ok) throw Error("Apify HTTP " + response.status);const chunks = await response.json();if (chunks.length) console.log(chunks[0].citationUrl, chunks[0].contentHash);
For both the dataset and the evaluation cases, start a run with POST /v2/acts/solidscrape~docs-to-rag-dataset/runs, poll GET /v2/actor-runs/{runId} until completion, then read /v2/datasets/{defaultDatasetId}/items and /v2/key-value-stores/{defaultKeyValueStoreId}/records/EVAL_CASES. Send the same authorization header with each request.
If your coding assistant has Apify MCP configured, ask it to read the input schema for solidscrape/docs-to-rag-dataset, run the Actor with the example above and a $0.02 maximum, then use MANIFEST to confirm coverage before indexing. For vector stores, embed the text field. Keep citationUrl, sourceUrl, headingPath, kind and contentHash as metadata. Treat retrieved text as source material in your application.
Outputs
| Output | What it contains |
|---|---|
| Default dataset | One unique prose or code chunk per row, including exact text, SHA-256 content hash, source URL, observed heading anchor, timestamp, title and license evidence. |
| MANIFEST | Outcome and emitted IDs for each attempted page, references to duplicate chunks, whether the page was fully processed, request and fee counts and stop reason. |
| EVAL_CASES | A question heading ending in ?, its citation URL and IDs of emitted prose chunks beneath that heading. These are weak relevance labels. Review them before using them as a benchmark. |
| MARKDOWN | Clean Markdown pages, original URLs, timestamps, refresh states and chunk-completeness flags. |
| SNAPSHOT | Validated page hashes and chunk references for the next refresh. Failed, skipped and incomplete pages preserve their earlier state. |
A page's heading path is preserved as an array. Anchor links come from IDs in the HTML. When an anchor is unavailable the citation links to the page. Code blocks retain indentation, and oversized blocks split into bounded fragments. Character counts use JavaScript UTF-16 units. A chunk ID is deterministic for an identical document structure and chunking configuration. Use its content hash to detect text edits. The run deduplicates exact text within each content type across pages. New fields pageChange and pageContentHash report the page refresh result. A duplicate page can reference a chunk emitted for another page in MANIFEST; preserve those shared references when updating your index. Only a complete page scan permits reconciling that page's prior chunk IDs, and missing URLs never authorize deleting entire pages.
Pricing
| Event | Price | When it applies |
|---|---|---|
| Start | $0.002 | One 512 MB run |
| Source request | $0.0015 | Every bounded robots.txt, sitemap XML or HTML fetch attempt, including a failure or an empty response |
| Page indexed | $0.0005 | A page producing at least one unique output chunk |
All chunks, code fragments, derived FAQ cases and the coverage manifest are included. Ten productive pages from one origin cost $0.0235 ($0.002 + 11 × $0.0015 + 10 × $0.0005). Ten different origins need ten separate robots checks. The smaller of your input budget and the Apify run maximum applies. The collector checks that the remaining budget can cover a useful page before it fetches it. If all selected sources fail, consult MANIFEST for the reasons and the charges incurred.
Scope and source rights
Supply up to 40 final public HTTPS URLs and/or up to three sitemap URLs. A run reads at most 40 content pages and five XML sitemap documents, with at most 500 locations per XML file. Sitemap indexes are supported; document cycles are deduplicated, DTDs and custom entities are rejected, and oversized or compressed .xml.gz files are unsupported. Each source request has an eight-second deadline and a 750 KB compressed and decoded limit. HTML is fetched directly without a browser, retries, redirects, proxy or authentication. JavaScript-only, PDF, private, query-string and cross-site crawling are outside this interface. There is no recursive link crawl. The run processes at most 500 output chunks at 512 MB memory. It checks robots.txt once per origin for pages and sitemaps, recognizes a missing policy on 404/410, and skips sites with an unavailable policy or crawl delays above three seconds. It honors page indexing and AI opt-outs and skips sites advertising AI reuse restrictions in their robots content signals.
A page's rel=license link is evidence supplied by the source. Verify your permission for indexing, redistribution or model training. Use expectedLicenseUrl to require one exact published link, or omit the filter for your own authorized documents. The presence or absence of a robots rule or license tag cannot determine the complete rights for an entire page.
FAQ
How do I export JSONL for ingestion? Open the default dataset export dialog or request its items with format=jsonl. Keep code and prose together or filter by kind in your ingestion process.
How is the evaluation set generated? The API uses literal question headings and references their emitted prose chunks. It does not fabricate questions or answer labels. Use distinct pages or domains for training and evaluation to reduce leakage.
Can I use this for a nightly refresh? Have your client pass the previous SNAPSHOT with changesOnly: true. Update the stored snapshot after the Actor completes and returns valid artifacts. Check MANIFEST and preserve prior corpus text for incomplete or skipped pages. Use a separate snapshot for each site/path and chunking configuration.