Skip to main content
Extraction normalizes source content into document dicts that chunk() and ingest() can use.

Common Shape

All extraction methods return documents with the same core shape.

Parse Documents

Use parse() for local files, folders, remote file URLs, path dictionaries, or bytes from uploads/object storage.
Supported extensions include .pdf, .docx, .pptx, .xlsx, .csv, .md, .txt, .html, .json, .xml, .ipynb, .epub, .msg, .rss, .tsv, .xls, and .zip.
File URLs must end in a supported extension. Ragrails checks the URL path before downloading.

Scrape Websites

Website extraction needs the url extra and a browser runtime.
Always cap max_pages on full crawls.

Stream Website Extraction

scrape_stream() emits progress, page, error, and final events.

Dead-letter queue (DLQ)

Capture retryable scrape failures and retry only failed pages.
Use non-streaming scrape(..., dlq=...) when you need DLQ capture.

Fetch REST APIs

fetch() turns API responses into document dicts. It supports headers, query params, JSON bodies, pagination config, timeouts, and batches of endpoints.

Direct Markdown in ingest()

If your content is already Markdown, skip extraction methods and pass it directly to rag.ingest().

Save Outputs

All extraction methods can return in memory or save Markdown/JSON files.

Result Fields

Ingest

Run extraction through storage in one call.

Chunking

Split extracted documents into chunks.