LlamaParse

0.6.94 · deprecated · verified Sat Feb 28

GenAI-native cloud document parser by LlamaIndex for RAG-optimized output. Parses PDFs, PPTX, DOCX, XLSX, HTML and more into markdown, text, or structured JSON with accurate table extraction and multimodal support. Cloud API service — requires an API key from cloud.llamaindex.ai. NOT a local/offline tool. CRITICAL: The llama-parse package (and its successor llama-cloud-services) are DEPRECATED as of early 2026. The replacement is 'llama-cloud' (pip install llama-cloud), which targets LlamaParse API v2. The old packages are maintained until May 1, 2026 only.

Warnings

Install

Imports

Quickstart

Cloud API — requires internet and valid API key. Free tier available. For notebooks, call nest_asyncio.apply() before using sync methods or use aload_data() for async.

# NEW API (llama-cloud, v2) — recommended
# pip install llama-cloud
import os
from llama_cloud.services.parse import LlamaParse

parser = LlamaParse(
    api_key=os.environ["LLAMA_CLOUD_API_KEY"],
    tier="cost_effective",  # fast | cost_effective | agentic | agentic_plus
    result_type="markdown",
)

documents = parser.load_data("./my_file.pdf")
print(documents[0].text[:500])

# ---
# OLD API (llama-parse, v1) — deprecated, works until May 2026
# pip install llama-parse
import nest_asyncio
nest_asyncio.apply()  # required in notebooks

from llama_parse import LlamaParse

parser = LlamaParse(
    api_key=os.environ["LLAMA_CLOUD_API_KEY"],
    result_type="markdown",
    num_workers=4,
    verbose=True,
)

documents = parser.load_data("./my_file.pdf")
documents_batch = parser.load_data(["./file1.pdf", "./file2.pdf"])
documents_async = await parser.aload_data("./my_file.pdf")

view raw JSON →