> For the complete documentation index, see [llms.txt](https://guide.docmaker.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.docmaker.co/features/extract-documents-to-markdown/documents-extract-api-parameters.md).

# documents/extract API parameters

Use all of our below options to personalize your document extraction

**API documentation:** <https://docmaker.co/API>

**Endpoint URL:** <https://api.v3.docmaker.co/documents/extract>

### List of API call parameters:

<table><thead><tr><th width="214">Parameter</th><th width="180">Values enum</th><th>Description</th></tr></thead><tbody><tr><td><code>"file_url"</code></td><td></td><td><strong>Required.</strong> Public URL of the file to parse (max 50 MB). Multipart upload is not supported — by-URL only.</td></tr><tr><td><code>"input_type"</code></td><td><code>docx</code>, <code>pptx</code>, <code>pdf</code>, <code>jpg</code>, <code>jpeg</code>, <code>png</code>, <code>tiff</code>, <code>webp</code>, <code>eml</code>, <code>md</code>, <code>markdown</code>, <code>txt</code>, <code>html</code>, <code>htm</code></td><td>Explicit format hint, overriding MIME/extension auto-detection. Usually not needed.</td></tr><tr><td><code>"output_format"</code></td><td><code>markdown</code>, <code>structured</code></td><td>Defaults to <code>markdown</code>. <code>structured</code> (extract against a template's tag schema) is accepted but not yet implemented — always returns markdown regardless.</td></tr><tr><td><code>"template_id"</code></td><td></td><td>Required when <code>output_format</code> is <code>structured</code> (not yet implemented).</td></tr><tr><td><code>"parsingEngine"</code></td><td><code>docling</code>, <code>mistral-ocr</code></td><td>Force the parser for PDF input, bypassing automatic digital-vs-scanned detection. Only valid for PDF input. <code>docling</code> on a scanned PDF runs Docling's own built-in OCR rather than returning empty text. <code>mistral-ocr</code> is exclusive when forced — if it fails, the error is returned as-is, with no fallback. Mutually exclusive with <code>fast_pdf_extraction</code>.</td></tr><tr><td><code>"fast_pdf_extraction"</code></td><td><code>true</code>, <code>false</code></td><td>Defaults to <code>false</code>. Skip Docling/Mistral OCR and read the PDF's embedded text layer directly — no network round-trip, no OCR, much faster and cheaper. Returns little/no text for a genuinely scanned PDF. Only valid for PDF input. Mutually exclusive with <code>parsingEngine</code>.</td></tr><tr><td><code>"pages"</code></td><td></td><td>Only valid when <code>fast_pdf_extraction</code> is true. Restrict extraction to specific pages/ranges, e.g. <code>"1-3,5,7-9"</code>. Out-of-range page numbers are silently dropped as long as at least one requested page exists.</td></tr><tr><td><code>"webhook_url"</code></td><td></td><td>URL of the webhook where you want the result sent once parsing completes.</td></tr><tr><td><code>"webhook_token"</code></td><td></td><td>You may provide an auth token to authenticate the webhook call to your server. docMaker adds it as a Bearer token in the "Authorization" header.</td></tr></tbody></table>

### Result shape (`structured_data` on the job, or the webhook payload):

<table><thead><tr><th width="214">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>markdown</code></td><td>The extracted content as Markdown.</td></tr><tr><td><code>page_count</code></td><td>Number of pages parsed (used to compute credits).</td></tr><tr><td><code>parser_used</code></td><td>Which parser actually ran: <code>docling</code>, <code>mistral-ocr</code>, <code>fast_pdf_extraction</code>, <code>mailparser</code>, or passthrough.</td></tr><tr><td><code>scanned</code></td><td>Whether the input PDF was detected as scanned/image-based.</td></tr><tr><td><code>parse_duration_ms</code></td><td>How long parsing took.</td></tr><tr><td><code>metadata</code></td><td>Extra detail, e.g. <code>fallback_from</code> (auto-routing fell back from Mistral OCR to Docling) or <code>lowTextWarning</code>/<code>warning</code> (fast_pdf_extraction found little/no text layer).</td></tr></tbody></table>

### Example request:

```json
{
  "file_url": "https://example.com/scanned-invoice.pdf",
  "output_format": "markdown"
}
```

As with every docMaker route, the call returns `202` immediately with a `jobId`. Poll `GET /jobs/{jobId}` or set a `webhook_url` to retrieve the result once parsing completes — this route can take several minutes for large or scanned documents.
