MegaParse is a Python-based document parser that aims to preserve information during parsing across PDFs, Word, PowerPoint, and other formats. It provides a vision module and API usage patterns, with installation via pip and example code snippets.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
MegaParse is a File Parser optimized for LLM ingestion that handles PDFs, DOCX, PPTX, and other document types to minimize information loss. It supports multiple formats and includes a MegaParse Vision module for multimodal inputs.
How it works
The repository offers a modular parser with a vision component (MegaParseVision) and an API interface. It includes usage examples for loading documents and using a vision model, indicating integration with LangChain OpenAI clients.
Getting started
Installation: ```bash pip install megaparse
Usage example:
```python
from megaparse import MegaParse
from langchain_openai import ChatOpenAI
megaparse = MegaParse()
response = megaparse.load("./test.pdf")
print(response)
Use MegaParse Vision:
from megaparse.parser.megaparse_vision import MegaParseVision
model = ChatOpenAI(model="gpt-4o", api_key=os.getenv("OPENAI_API_KEY")) # type: ignore
parser = MegaParseVision(model=model)
response = parser.convert("./test.pdf")
print(response)
Notes:
- The README mentions installing poppler and tesseract for images and PDFs, and libmagic on macOS via Homebrew.
Use as an API
There is a Makefile target named dev:
make dev
To explore endpoints, see localhost:8000/docs.
Recent releases
Latest releases show updates such as v0.0.55 (2025-02-14) and v0.0.54 (2025-02-11) for megaparse, plus v0.1.12 (2025-02-14) and v0.1.11 (2025-02-11) for megaparse-sdk, including features like removing tensorrt and adding layout detection.
Traction
Stars: 7408
Caveats
License: Apache-2.0 Created: 2024-05-29 Last push: 2025-02-21 Open issues: 33






