pip install ai-parrot-loaders==1.2.0 Copy PIP instructions
ai-parrot-loaders provides document loaders for AI-Parrot RAG (Retrieval-Augmented Generation) pipelines. Each loader transforms a specific document format into text chunks that can be embedded and searched.
pip install ai-parrot-loaders Install only the extras you need:
pip install ai-parrot-loaders[pdf] pip install ai-parrot-loaders[youtube] pip install ai-parrot-loaders[audio] pip install ai-parrot-loaders[web] # Everything pip install ai-parrot-loaders[all] Available Extras Extra Description pdf PDF loading with OCR support (PaddleOCR) youtube YouTube transcript and video download audio Audio transcription (WhisperX, pyannote) web HTML/web page loading ebook Structured EPUB and MOBI e-book loading documents PDF, DOCX, EPUB, and MOBI ingestion without OCR dependencies video Video processing (MoviePy, FFmpeg) Supported Formats uv pip install 'ai-parrot[wiki]' automatically installs ai-parrot-loaders[documents] and the parsing dependencies for PDF, DOCX, EPUB, and MOBI. To use those loaders independently, install uv pip install 'ai-parrot-loaders[documents]'.
The documents extra uses the native PDF and DOCX loaders plus the ebook extra. The existing document extra is separate and supplies Mammoth for document conversion; pdf includes the broader OCR stack.
uv pip install 'ai-parrot-loaders[ebook]' This includes ebooklib, beautifulsoup4, markdownify, and mobi (KindleUnpack).
from parrot_loaders.epubloader import EpubLoader from parrot_loaders.mobiloader import MobiLoader from parrot.loaders.ebook import ebook_sections documents = await EpubLoader("book.epub").load() sections = ebook_sections(documents) await pageindex.insert_ebook("my-book", [section.model_dump() for section in sections]) # Same output contract and loader options for MOBI: mobi_documents = await MobiLoader("book.mobi").load() Create the PageIndex tree before inserting. Bookstore, GraphIndex and wiki ingestion select this structural path automatically for EPUB and MOBI documents.
bookstore add book.mobi --no-llm MOBI support handles unencrypted MOBI7 HTML/NCX and KF8 EPUB output. MOBI7 uses NCX navigation when present, then explicit nested HTML navigation, then HTML heading structure. If the source has no hierarchy, the loader cannot recover one that was never encoded. Invalid/encrypted books and PDF-only Print Replica output raise MobiLoaderError. Decoding runs off the event loop with serialized backend calls, and temporary files are removed on both success and failure. Section provenance always refers to the original .mobi source.
Navigation parents and short TOC sections are retained even when they have no body. Missing targets remain in the index with target_found=False. When a document has no TOC entries, HTML headings supply its fallback structure. Reading order follows the spine, while TOC order is recorded separately. Repeated targets retain distinct navigation identities; their body is stored once, on the last entry for that target, rather than duplicated.
Compatibility: load() defaults to split_documents=False for ebooks. Explicit chunking remains available for vector-store callers. Section bodies no longer carry synthetic Section:/Title: prefixes or duplicate chapter headings; titles and relationships are metadata. Use ebook_markdown(sections) for a readable Markdown export. The structural PageIndex path preserves all navigation levels and does not merge short nodes or infer parents from Markdown headings.
from parrot_loaders.factory import get_loader_class # Auto-detect loader by file extension LoaderClass = get_loader_class("report.pdf") loader = LoaderClass(source="report.pdf") documents = await loader.load() for doc in documents: print(doc.page_content[:200]) Or use a specific loader directly:
from parrot_loaders.youtube import YoutubeLoader loader = YoutubeLoader(source="https://www.youtube.com/watch?v=...") documents = await loader.load() Requirements Python >= 3.11 ai-parrot >= 0.23.18 License MIT
youtube audio pdf images web ebook documents video document scraping ml ml-heavy all
ai rag document-loaders pdf youtube agents asyncio
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.




