Registry / llm-agents / llama-index-readers-llama-parse

llama-index-readers-llama-parse

JSON →
library0.6.1pypypi✓ verified 24d ago

The `llama-index-readers-llama-parse` library provides a LlamaIndex reader that integrates with LlamaParse. It enables parsing of various complex file types (like PDFs, PPTs, etc.) into structured markdown, which can then be easily ingested and processed by LlamaIndex for RAG and other LLM applications. The current version is 0.6.1, and it's part of the broader LlamaIndex ecosystem, implying a regular release cadence with LlamaIndex.

pip install llama-index-readers-llama-parse llama-parse
INSTALL
IMPORT
SIG · LLAMA-INDEX-READER
L
llama-index-readers-llama-parse
llm-agentspythonv0.6.1
Install
19.5s avg
Import
Disk
255MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 244.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 19.5s · import 0.000s · 240MB
255MB installed
● package 255MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LlamaParseReader
from llama_index.readers.llama_parse import LlamaParseReader

This quickstart demonstrates how to initialize the `LlamaParseReader` and load data from a local file. It highlights the mandatory `LLAMAPARSE_API_KEY` and shows how to access the parsed documents. Remember to replace 'path/to/your/document.pdf' with an actual file path.

import os from llama_index.readers.llama_parse import LlamaParseReader # Ensure you have your LlamaParse API key set as an environment variable # os.environ["LLAMAPARSE_API_KEY"] = "your-api-key" api_key = os.environ.get('LLAMAPARSE_API_KEY', '') if not api_key: raise ValueError("LLAMAPARSE_API_KEY environment variable not set.") # Initialize the LlamaParse reader # For advanced options, see LlamaParseReader documentation (e.g., result_type='markdown') parser = LlamaParseReader(api_key=api_key, verbose=True) # Load data from a file (replace 'path/to/your/document.pdf' with an actual file) # LlamaParse supports various file types like PDF, PPTX, DOCX, TXT, CSV, JSON, XML # Note: This is an asynchronous operation and may take time to complete. # The load_data method will poll LlamaParse until the parsing is complete. try: documents = parser.load_data("path/to/your/document.pdf") print(f"Successfully parsed {len(documents)} document(s).") for doc in documents: print(f"Document ID: {doc.id_}") print(f"First 200 chars: {doc.text[:200]}...") except Exception as e: print(f"Error parsing document: {e}") print("Make sure 'path/to/your/document.pdf' exists and your API key is valid.")
Debug
Known issues
gotchaA `LLAMAPARSE_API_KEY` is mandatory for using LlamaParseReader. This key must be obtained from LlamaIndex and provided either directly during initialization or via the environment variable `LLAMAPARSE_API_KEY`.
fix
Set `os.environ['LLAMAPARSE_API_KEY'] = 'your_key_here'` or pass `api_key='your_key_here'` to the `LlamaParseReader` constructor.
affects: All
gotchaLlamaParse is a commercial service. While a free tier may be available, extensive usage or specific features might incur costs or be subject to rate limits. Be aware of your LlamaParse plan and associated usage policies.
fix
Monitor your LlamaParse usage and consult the LlamaParse documentation for pricing and rate limit details.
affects: All
gotchaThe `llama-parse` package is a separate dependency and must be explicitly installed alongside `llama-index-readers-llama-parse`. Failing to install `llama-parse` will result in runtime errors.
fix
Ensure both `llama-index-readers-llama-parse` and `llama-parse` are installed using `pip install llama-index-readers-llama-parse llama-parse`.
affects: All
gotchaParsing large or complex documents with LlamaParse can be time-consuming. The `load_data()` method by default polls the LlamaParse API until the job is complete, which can lead to long execution times for synchronous calls. Consider using `load_data_async()` for non-blocking operations in production environments.
fix
For improved responsiveness in asynchronous applications, use `await parser.load_data_async(...)`.
affects: All
Upgrade
Version history
0.6.1latest on PyPI · released Mar 25, 2026
Audit
Dependencies
llama-parserequiredCore parsing engine used by the reader.
llama-index-corerequiredBase LlamaIndex package (peer dependency for LlamaIndex applications).
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
llama-index-readers-llama-parse — pip install llama-index-readers-llama-parse · libregistry