{"id":22465178,"url":"https://github.com/quivrhq/megaparse","last_synced_at":"2025-08-02T06:32:46.076Z","repository":{"id":241906935,"uuid":"807512074","full_name":"QuivrHQ/MegaParse","owner":"QuivrHQ","description":"File Parser optimised for LLM Ingestion with no loss 🧠 Parse PDFs, Docx, PPTx in a format that is ideal for LLMs. ","archived":false,"fork":false,"pushed_at":"2024-12-03T00:58:46.000Z","size":5352,"stargazers_count":707,"open_issues_count":13,"forks_count":51,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-12-03T01:34:07.894Z","etag":null,"topics":["docx","llm","parser","pdf","powerpoint"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/megaparse/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuivrHQ.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-29T08:40:29.000Z","updated_at":"2024-12-03T00:58:25.000Z","dependencies_parsed_at":"2024-10-25T20:12:07.432Z","dependency_job_id":"6967d230-87df-4390-b8f1-f046a877f384","html_url":"https://github.com/QuivrHQ/MegaParse","commit_stats":null,"previous_names":["quivrhq/megaparse"],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuivrHQ%2FMegaParse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuivrHQ%2FMegaParse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuivrHQ%2FMegaParse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuivrHQ%2FMegaParse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuivrHQ","download_url":"https://codeload.github.com/QuivrHQ/MegaParse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228446456,"owners_count":17921105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docx","llm","parser","pdf","powerpoint"],"created_at":"2024-12-06T10:02:04.096Z","updated_at":"2025-08-02T06:32:46.063Z","avatar_url":"https://github.com/QuivrHQ.png","language":"HTML","funding_links":[],"categories":["Recently Updated","Large Language Models (LLMs)"],"sub_categories":["[Dec 04, 2024](/content/2024/12/04/README.md)","Contribute to our Repository"],"readme":"# MegaParse - Your Parser for every type of documents\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/QuivrHQ/MegaParse/main/logo.png\" alt=\"Quivr-logo\" width=\"30%\"  style=\"border-radius: 50%; padding-bottom: 20px\"/\u003e\n\u003c/div\u003e\n\nMegaParse is a powerful and versatile parser that can handle various types of documents with ease. Whether you're dealing with text, PDFs, Powerpoint presentations, Word documents MegaParse has got you covered. Focus on having no information loss during parsing.\n\n## Key Features 🎯\n\n- **Versatile Parser**: MegaParse is a powerful and versatile parser that can handle various types of documents with ease.\n- **No Information Loss**: Focus on having no information loss during parsing.\n- **Fast and Efficient**: Designed with speed and efficiency at its core.\n- **Wide File Compatibility**: Supports Text, PDF, Powerpoint presentations, Excel, CSV, Word documents.\n- **Open Source**: Freedom is beautiful, and so is MegaParse. Open source and free to use.\n\n## Support\n\n- Files: ✅ PDF ✅ Powerpoint ✅ Word\n- Content: ✅ Tables ✅ TOC ✅ Headers ✅ Footers ✅ Images\n\n### Example\n\nhttps://github.com/QuivrHQ/MegaParse/assets/19614572/1b4cdb73-8dc2-44ef-b8b4-a7509bc8d4f3\n\n## Installation\n\nrequired python version \u003e= 3.11\n\n```bash\npip install megaparse\n```\n\n## Usage\n\n1. Add your OpenAI or Anthropic API key to the .env file\n\n2. Install poppler on your computer (images and PDFs)\n\n3. Install tesseract on your computer (images and PDFs)\n\n4. If you have a mac, you also need to install libmagic ```brew install libmagic```\n\nUse MegaParse as it is : \n```python\nfrom megaparse import MegaParse\nfrom langchain_openai import ChatOpenAI\n\nmegaparse = MegaParse()\nresponse = megaparse.load(\"./test.pdf\")\nprint(response)\n```\n\n### Use MegaParse Vision\n\n```python\nfrom megaparse.parser.megaparse_vision import MegaParseVision\n\nmodel = ChatOpenAI(model=\"gpt-4o\", api_key=os.getenv(\"OPENAI_API_KEY\"))  # type: ignore\nparser = MegaParseVision(model=model)\nresponse = parser.convert(\"./test.pdf\")\nprint(response)\n\n```\n**Note**: The model supported by MegaParse Vision are the multimodal ones such as claude 3.5, claude 4, gpt-4o and gpt-4.\n\n## Use as an API\nThere is a MakeFile for you, simply use :\n```make dev```\nat the root of the project and you are good to go.\n\nSee localhost:8000/docs for more info on the different endpoints !\n\n## BenchMark\n\n\u003c!---BENCHMARK--\u003e\n| Parser                        | similarity_ratio |\n| ----------------------------- | ---------------- |\n| megaparse_vision              | 0.87             |\n| unstructured_with_check_table | 0.77             |\n| unstructured                  | 0.59             |\n| llama_parser                  | 0.33             |\n\u003c!---END_BENCHMARK--\u003e\n\n_Higher the better_\n\nNote: Want to evaluate and compare your Megaparse module with ours ? Please add your config in ```evaluations/script.py``` and then run ```python evaluations/script.py```. If it is better, do a PR, I mean, let's go higher together .\n\n## In Construction 🚧\n- Improve table checker\n- Create Checkers to add **modular postprocessing** ⚙️\n- Add Structured output, **let's get computer talking** 🤖\n\n\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=QuivrHQ/MegaParse\u0026type=Date)](https://star-history.com/#QuivrHQ/MegaParse\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquivrhq%2Fmegaparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquivrhq%2Fmegaparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquivrhq%2Fmegaparse/lists"}