Skip to main content

LlamaParse

LlamaParse is an API created by LlamaIndex to efficiently parse and represent files for efficient retrieval and context augmentation using LlamaIndex frameworks.

LlamaParse directly integrates with LlamaIndex.

Currently available for free. Try it out today!

NOTE: Currently, only PDF files are supported.

Getting Started

First, login and get an api-key from https://cloud.llamaindex.ai.

Then, make sure you have the latest LlamaIndex version installed.

NOTE: If you are upgrading from v0.9.X, we recommend following our migration guide, as well as uninstalling your previous version first.

pip uninstall llama-index  # run this if upgrading from v0.9.x or older
pip install -U llama-index --upgrade --no-cache-dir --force-reinstall

Lastly, install the package:

pip install llama-parse

Now you can run the following to parse your first PDF file:

import nest_asyncio

nest_asyncio.apply()

from llama_parse import LlamaParse

parser = LlamaParse(
    api_key="llx-...",  # can also be set in your env as LLAMA_CLOUD_API_KEY
    result_type="markdown",  # "markdown" and "text" are available
    verbose=True,
)

# sync
documents = parser.load_data("./my_file.pdf")

# sync batch
documents = parser.load_data(["./my_file1.pdf", "./my_file2.pdf"])

# async
documents = await parser.aload_data("./my_file.pdf")

# async batch
documents = await parser.aload_data(["./my_file1.pdf", "./my_file2.pdf"])

Using with SimpleDirectoryReader

You can also integrate the parser as the default PDF loader in SimpleDirectoryReader:

import nest_asyncio

nest_asyncio.apply()

from llama_parse import LlamaParse
from llama_index.core import SimpleDirectoryReader

parser = LlamaParse(
    api_key="llx-...",  # can also be set in your env as LLAMA_CLOUD_API_KEY
    result_type="markdown",  # "markdown" and "text" are available
    verbose=True,
)

file_extractor = {".pdf": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

Full documentation for SimpleDirectoryReader can be found on the LlamaIndex Documentation.

Examples

Several end-to-end indexing examples can be found in the examples folder

Terms of Service

See the Terms of Service Here.

Metadata

Release files for llama-index-readers-llama-parse 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-readers-llama-parse 0.1.3
File Size Uploaded
llama_index_readers_llama_parse-0.1.3.tar.gz 2.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-readers-llama-parse 0.1.3
File Interpreter ABI Platform
llama_index_readers_llama_parse-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.0 kB

Release files / llama_index_readers_llama_parse-0.1.3.tar.gz

Download URL llama_index_readers_llama_parse-0.1.3.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e0ee0c393e10fc80eac644788338bbd2032050c8b8a474f3d0b5ebd08e9867fe
BLAKE2b-256 checksum
How to use checksums
907b22b9f86ca2a8bc58117ed26460d27034cadfa1ebd747b1a4af5395c666cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.13 Darwin/23.0.0

Release files / llama_index_readers_llama_parse-0.1.3-py3-none-any.whl

Download URL llama_index_readers_llama_parse-0.1.3-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f52a06a2765a2ffe6c138cf1703ab1de6249ff069ba62d80b9147e849bbcbc27
BLAKE2b-256 checksum
How to use checksums
40054578db57ee5ae53e2bfa111671be27fa80dc936858ce753db917f61a4bd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.13 Darwin/23.0.0

Release history Release notifications | RSS feed

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.4

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page