# ocrdocx: OCR DOCX – Word to Markdown

> ocrdocx (OCR DOCX – Word to Markdown) is a 1001fx API function in the group Files & PDF: POST https://api.1001fx.com/files/ocrdocx, 6 credits per item. It works as a ready-made module in Make or as a plain HTTP call.

Converts a Word document (DOCX) into Markdown or plain text, with tables, headings and embedded images. Works with scanned documents, photos, tables and handwriting. Processed in the EU by Mistral AI (no training on your data). Charged per page (6 credits), at most 8 pages per call.

- Group: Files & PDF
- Endpoint: `POST https://api.1001fx.com/files/ocrdocx`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: multipart/form-data
- Credits: 6 credits per item
- Ready-made in: Make
- Service provider: Mistral
- Docs: https://1001fx.com/functions/ocrdocx

## Parameters

- `file` (file, optional) – File: The Word document to read. Either file or fileUrl.
- `fileUrl` (string, optional) – File URL: Public URL of the Word document. Either file or fileUrl.
- `pages` (string, optional) – Pages: Pages to read, e.g. 1-3,7 (first page = 1). At most 8 pages per call; without it all pages (documents up to 8 pages).
- `outputFormat` (enum, optional, one of `markdown`, `text`, default `markdown`) – Output format: markdown (default) keeps headings and tables; text is plain text.
- `tableFormat` (enum, optional, one of `inline`, `markdown`, `html`, default `inline`) – Table format: inline (default): tables as Markdown in the text; markdown or html: tables separately in pages[].tables.
- `extractHeaderFooter` (boolean, optional, default `false`) – Separate header and footer: Return page headers and footers separately instead of in the text.
- `extractImages` (enum, optional, one of `urls`, `none`, `base64`, default `urls`) – Embedded images: urls (default): photos and figures as download links (48 h) in the text and in pages[].images; base64: inline; none: left out.
- `describeImages` (boolean, optional, default `false`) – Describe images: Adds a short description of every image, chart and figure. Costs 18 instead of 6 credits per page.

## Example: OCR DOCX

```bash
curl -X POST 'https://api.1001fx.com/files/ocrdocx' \
  -H 'X-API-KEY: YOURSECRETAPIKEY'
```
