Source forms
Website scraping needs
pip install "ragrails[url]" and a one-time rag.setup_url() or ragrails setup-url in the environment that runs the scraper. The browser can be chromium, firefox, or webkit.Common shape
All extraction methods return normalized document objects. Downstream chunking only needs thetext field, but the metadata keeps source context for retrieval and citations.
Scrape websites
Usescrape() for exact URLs or full-site crawls.
Dead-letter queue retry is SDK-first. REST returns
errors and a dlq payload, but you resubmit failed URLs yourself. The CLI does not expose DLQ retry flags.Stream website extraction
Use streaming when a crawl may take a while and the caller should see progress before the final result.final event containing the same aggregate shape as scrape().
Parse documents
Useparse() for local files, folders, remote file URLs, path dictionaries with metadata, or raw bytes from uploads/object storage.
Use JSON
/v1/ingest/docs for files reachable by the server process. Use multipart /v1/ingest/docs/upload when a client is uploading file bytes to the API.Fetch REST APIs
Usefetch() for API responses. Each fetched page becomes a document, so paginated endpoints produce multiple documents.
The CLI covers common
GET/header/query-param use. Use SDK or REST for JSON request bodies, cursor/offset pagination details, timeout control, or SDK batch apis=[...] ingestion.Direct Markdown
If your content is already Markdown, skip extraction and pass it directly to the high-levelingest() workflow.
Ingest pipeline
Useingest() when extraction should immediately continue into chunking, embedding, and vector storage. The high-level pipeline accepts the same source families: docs, urls, api, and markdown.
concurrency="parallel" runs independent extraction sources at the same time before chunking. Use serial when source order or upstream rate limits matter more than speed.
The CLI pipeline exposes common extraction flags. Use SDK or REST when you need full per-source extraction options such as URL
max_pages, API pagination details, request bodies, or document metadata dictionaries.Output shapes
Each extraction method returns a small summary plus normalized document outputs.outputs is the part you pass to chunk() or inspect before running the full pipeline.
Possible errors
Most stage-level failures are returned in the resulterrors list instead of raising immediately. REST validation and setup failures may return an exception envelope instead. See Errors for the shared shapes.
Next steps
- Use Chunking to split extracted documents into searchable passages.
- Use Ingest when you want extraction, chunking, embedding, and storage in one call.
- Use Resilient Ingestion when large crawls or paginated APIs need retry strategy.

