# AI use cases for MinerU (opendatalab/MinerU)

Repo: [opendatalab/MinerU](https://github.com/opendatalab/MinerU) | Use cases: 3 | Page: https://dedupedai.com/use-cases/opendatalab-mineru/

MinerU turns PDFs, images and office documents into LLM-ready Markdown and JSON. Version 4 adds four parsing tiers (Flash, Basic, Standard, Advanced), a local document library with search and stable citation locators for page and block continuation, a Python SDK, a V1 API, a Gradio WebUI and an agent skill, with CPU inference plus automatic GPU acceleration on Intel, AMD, NVIDIA and Apple Silicon.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Parse a hard PDF into Markdown on your own machine: https://dedupedai.com/use-cases/opendatalab-mineru/parse-a-pdf-into-markdown-with-mineru/
- Let your agent read long documents page by page: https://dedupedai.com/use-cases/opendatalab-mineru/let-an-agent-read-long-documents-page-by-page/
- Search inside your parsed documents from Python: https://dedupedai.com/use-cases/opendatalab-mineru/build-a-searchable-local-document-library/

## How to parse a hard PDF into Markdown on your own machine with MinerU

Repo: [opendatalab/MinerU](https://github.com/opendatalab/MinerU) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install MinerU 4, check which tier your hardware suits and convert a document locally.

**Who it is for:** A researcher with scanned papers, reports and slide decks that ordinary extractors mangle.

**The problem:** Complex layouts, scans and formulas need OCR and layout models, which are hard to set up by hand.

**The outcome:** A parsed document in Markdown or JSON, produced locally at the quality tier your machine can handle.

### Steps

1. Install MinerU 4.x in a Python 3.11 to 3.14 virtual environment with uv, as the Install Manually section of the README shows
2. Run `mineru-kit hardware detect` to see your devices and get a tier recommendation
3. For a quick read of a document, run `mineru parse document.pdf --json`, which defaults to the first 10 PDF pages
4. For a full conversion of all pages, use the stateless `mineru-kit parse` command
5. Choose Flash for fast previews, Basic for OCR, or Standard and Advanced for demanding layouts

### Prompt to paste into your agent

```text
Install opendatalab/MinerU 4 in a uv virtual environment, run `mineru-kit hardware detect`, then convert <file> with mineru-kit parse at the tier it recommends. Tell me how long it took and whether tables and formulas survived.
```

### Caveat

Version 4.1 requires Python 3.11 to 3.14 and changed the HTTP APIs, so older deployments must upgrade servers, Routers, SDKs and clients together.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/opendatalab-mineru/parse-a-pdf-into-markdown-with-mineru/

## How to let your agent read long documents page by page with MinerU

Repo: [opendatalab/MinerU](https://github.com/opendatalab/MinerU) | Difficulty: Intermediate | Time: 20 minutes | Basis: From the README

Install the MinerU skill so an agent parses a file, reads it in chunks and keeps stable citation locators.

**Who it is for:** A Claude Code or Codex user asking questions about a 300 page contract or book.

**The problem:** Dumping a whole long document into context overflows it, and answers come without page references.

**The outcome:** An agent that reads progressively, follows continuation locators and cites the page and block it used.

### Steps

1. Send your agent the README's install message, which starts with `npx skills add opendatalab/MinerU --skill mineru --global --yes`
2. Ask it to read a file; it starts with `mineru parse document.pdf --json`, which covers the first 10 PDF pages
3. Let it continue with the returned locators instead of re-parsing the whole file
4. Ask it to keep the doc, tier, page and block locators in its answers so every claim is traceable
5. Expect it to ask before using remote parsing, adding watches or changing persistent config, as the Agent Contract requires

### Prompt to paste into your agent

```text
Install the opendatalab/MinerU skill, then read <document> progressively with mineru parse and the returned locators. Answer <question> and cite the page and block locator for every claim.
```

### Caveat

The skill install message also asks the agent to record a global preference for MinerU, so read it before sending if you do not want that.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/opendatalab-mineru/let-an-agent-read-long-documents-page-by-page/

## How to search inside your parsed documents from Python with MinerU

Repo: [opendatalab/MinerU](https://github.com/opendatalab/MinerU) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Run the MinerU server and use DoclibClient to parse, cache and read documents from your own scripts.

**Who it is for:** A developer building an internal tool that needs to search and quote from a folder of PDFs.

**The problem:** Re-parsing documents every time a script runs is slow, and raw text loses where each passage came from.

**The outcome:** A local document library your code can parse into once, then search and read by page or block.

### Steps

1. Install MinerU 4.x as in the README and start the server with `mineru server start`
2. In Python, create a `DoclibClient` and submit a file with `ensure_parse`, passing a ParseRequest with the path and tier
3. Poll each parse ID until its status is done, as the README example does
4. Read content by locator with `read_content`, for example page 1 of the standard tier
5. Use `mineru find` to locate documents by filename; DoclibClient also covers search, watched directories and result invalidation

### Prompt to paste into your agent

```text
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>.
```

### Caveat

Documents are not uploaded to the official service by default; remote parsing only happens if you configure it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/opendatalab-mineru/build-a-searchable-local-document-library/
