{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "opendatalab-mineru--build-a-searchable-local-document-library",
 "repo": "opendatalab/MinerU",
 "repo_url": "https://github.com/opendatalab/MinerU",
 "repo_slug": "opendatalab-mineru",
 "title": "Search inside your parsed documents from Python",
 "page_title": "How to search inside your parsed documents from Python with MinerU",
 "summary": "Run the MinerU server and use DoclibClient to parse, cache and read documents from your own scripts.",
 "who": "A developer building an internal tool that needs to search and quote from a folder of PDFs.",
 "problem": "Re-parsing documents every time a script runs is slow, and raw text loses where each passage came from.",
 "outcome": "A local document library your code can parse into once, then search and read by page or block.",
 "steps": [
  "Install MinerU 4.x as in the README and start the server with `mineru server start`",
  "In Python, create a `DoclibClient` and submit a file with `ensure_parse`, passing a ParseRequest with the path and tier",
  "Poll each parse ID until its status is done, as the README example does",
  "Read content by locator with `read_content`, for example page 1 of the standard tier",
  "Use `mineru find` to locate documents by filename; DoclibClient also covers search, watched directories and result invalidation"
 ],
 "agent_prompt": "Using opendatalab/MinerU, start the server and write a Python script with DoclibClient that parses every PDF in <folder>, waits for each parse, and prints page 1 of each with its locator. Then search the library for <phrase>.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "Documents are not uploaded to the official service by default; remote parsing only happens if you configure it.",
 "category": "Research",
 "tags": [
  "Research"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.11 to 3.14 in a virtual environment",
  "Windows, Linux or macOS; CPU works, compatible GPUs are used automatically",
  "Model downloads for the tier you choose",
  "Optional: Node.js for npx to install the agent skill"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/opendatalab-mineru/build-a-searchable-local-document-library/",
 "md": "https://dedupedai.com/use-cases/opendatalab-mineru/build-a-searchable-local-document-library/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/opendatalab-mineru--build-a-searchable-local-document-library.json",
 "api_version": "v1"
}
