DocuAPI 推出文档转换 API,可将文档转为结构化 Markdown/JSON
来源标题:DocuAPI
DocuAPI 提供一个 API,将 PDF、Office 等格式文档转换为结构化 Markdown、JSON 或可直接注入向量数据库的分块数据,无需自建文档处理基础设施。支持 PDF、DOCX、PPTX、XLSX、HTML、EPUB 及多种图片格式,图片需 OCR。官方称不保留用户文档。
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Turn PDFs, office and other supported documents into structured Markdown, JSON, or chunks ready to inject into any vector database. One API, without the document-processing infrastructure to maintain.
curl --request POST "https://docuapi.dev/convert"
--header "Authorization: Bearer $DOCUAPI_API_KEY"
--form "file=@./annual-report.pdf"
--form "output_format=json"
Example request cURL
Explore a conversion.
Use sample data instantly, or upload a document to try the DocuAPI document conversion.
PDF, DOCX, PPTX, XLSX, HTML, Markdown, TXT, CSV, EPUB, JPG, JPEG, PNG, BMP, GIF, TIF or TIFF. Images require OCR. See all supported formats in the documentation.
No document retention
SAMPLE DOCUMENT
Annual Report 2025
PDF · 12 pages5 content blocks
OUTPUT SAMPLE
JSONMarkdownChunks
Copy output
document.jsonJSON
{ "document": { "title": "Annual Report 2025", "source": "annual-report.pdf", "page_count": 12 }, "content": [ { "id": "block_001", "type": "heading", "text": "Revenue and growth", "page": 2 }, { "id": "block_002", "type": "paragraph", "text": "Revenue increased by 12% in 2025, driven by expansion in the European market and stronger customer retention.", "page": 2 }, { "id": "block_003", "type": "heading", "text": "Regional performance", "page": 3 }, { "id": "block_004", "type": "table", "text": "Revenue by region", "page": 3, "rows": [ [ "Region", "Revenue", "Growth" ], [ "Europe", "CHF 8.4M", "+15%" ], [ "North America", "CHF 5.1M", "+9%" ], [ "Asia Pacific", "CHF 2.7M", "+11%" ] ] }, { "id": "block_005", "type": "paragraph", "text": "The company plans to continue investing in platform reliability and customer support during the next financial year.", "page": 4 } ], "metadata": { "extraction_mode": "sample", "ocr_enabled": false } }
✓Illustrative sample output12 sample pages
A small API between you and document chaos.
Focus on retrieval and product logic. Let the conversion layer handle the messy first mile.
Keep headings, tables, reading order, and useful document metadata where the source supports them.
Choose Markdown, normalized JSON, or ready-to-ingest chunks for any vector database.
Use a direct response for small conversions or submit a job for longer-running documents.
Clear monthly allowances and explicit limits, designed for developers building production systems.
A predictable conversion layer should be easy to understand, test, and replace if your needs change.
Submit a supported file with your API request. Set the output format and conversion options.
Receive Markdown, normalized JSON, or paragraph-based chunks with source and section metadata.
Send the returned chunks to your embedding and indexing workflow, then store them in any vector database.
With API libraries for pretty much every programming language you can think of, DocuAPI fits seamlessly into any stack.
cURLPythonJSNode.jsphpPHP
cURLCopy
curl --request POST "https://docuapi.dev/convert"
--header "Authorization: Bearer $DOCUAPI_API_KEY"
--form "file=@./annual-report.pdf"
--form "output_format=json"
Good questions, straight answers.
Browse documentation ↗
What does DocuAPI do?−DocuAPI converts supported documents into Markdown, structured JSON, or structured chunks for retrieval-augmented generation (RAG). Chunks include source and section metadata, so you can send them to your embedding model and vector database.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。