Practical overview
When it fits
Use it when a pipeline already has HTML and needs to isolate the main content before indexing, research or data preparation.
Who it is for
- Developers preparing HTML content for RAG ingestion
- Research and data teams building web-content processing pipelines
- Builders adding a main-content extraction stage to deep-research agents
Documented uses
- Extract page body content while filtering navigation, advertisements and metadata.
- Prepare cleaner HTML for RAG indexing or training-data generation.
- Process a single HTML string or a batch through a chosen inference backend.
Requirements & limits
The repository lists an Apache-2.0 license and documents installation as a Python package or from source.
- The documented input is HTML supplied to the library; page retrieval is not part of the shown usage.
- VLLM is the recommended default backend and is shown for GPU use; Transformers and OpenAI-compatible API backends are alternatives.
- The model downloads automatically if no model path is provided, and manual local model download is also documented.
- Fallback configuration can use Trafilatura, return the raw HTML, or return an empty string.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Mineru Html and extract content from HTML
Set up the Python library and pass one or more HTML strings to retrieve their extracted main content.
Before you start
- Python environment
- Select a supported inference backend: VLLM, Transformers, or OpenAI-compatible API
- For the VLLM route, the repository recommends a GPU
Steps
Install with the command below for VLLM, the command below for Transformers, or the command below for the OpenAI API backend.
pip install mineru_html[vllm]pip install mineru_htmlpip install mineru_html[openai]Import
MinerUHTMLand initialize an extractor. The model path is optional; without it, the default model downloads automatically.Pass an HTML string or list of HTML strings to
extractor.process(...).Read
result.output_data.main_contentfrom the returned result or results.
Expected outcome
The library returns extracted main-content HTML for the supplied page or batch.
Guide limitations
- The examples begin with HTML strings; they do not document fetching web pages.
- Backend setup and resource needs differ; VLLM is shown as the default GPU backend.
- This recipe follows repository instructions and is not a compatibility or execution guarantee.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 12 October 2026
- Original website title
- opendatalab/MinerU-HTML · Official homepage title · retained in its source language

