# MinerU-API-examples **Repository Path**: pandaoknight/mineru-api-examples ## Basic Information - **Project Name**: MinerU-API-examples - **Description**: MinerU-API-examples - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-26 - **Last Updated**: 2025-05-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MinerU API 示例 这个仓库包含了使用 MinerU API 的示例代码。 ## 目录结构 - `keys/`: 存放API密钥 (已通过 .gitignore 保护,不会被提交到仓库) - `scripts/`: 包含各种示例脚本 ## 准备工作 1. 访问 [MinerU API管理页面](https://mineru.net/apiManage) 获取您的API密钥 2. 将API密钥保存到 `keys/mineru_local.txt` 文件中 ## 安装依赖 ```bash pip install requests ``` ## 示例脚本 ### 通过URL解析文档 使用 `scripts/task.py` 可以通过URL解析文档: ```bash python scripts/task.py 文档URL ``` 示例: ```bash python scripts/task.py https://cdn-mineru.openxlab.org.cn/demo/example.pdf ``` 执行后会在当前目录下生成一个解析结果的JSON文件。 ## API调用参数说明 主要参数: - `url`: 待解析文档的URL - `is_ocr`: 是否启用OCR (默认为True) - `enable_formula`: 是否启用公式识别 (默认为False) ## 参考文档 - [MinerU API管理页面](https://mineru.net/apiManage)