# Extract from DOCX

Use this extractor for `.docx` files. It can extract images, page renders, text, markdown, audio, video, embedded files into a ZIP result.

## Quick reference

| Field | Value |
| --- | --- |
| Source file type | `.docx` |
| Source group | Documents |
| Submit endpoint | `POST https://api.tools.fast/extract` |
| Estimate endpoint | `POST https://api.tools.fast/extract/estimate/docx` |
| Result | ZIP download |
| Default capabilities | `word.images`, `word.pages`, `word.text`, `word.markdown`, `word.audio`, `word.video`, `word.embeddedFiles` |
| Max file size | free: 50 MB; pro: 2048 MB |
| Document limits | free: 2000 document units; pro: 2000 document units |
| Duration limits | Not applicable |

## Capabilities

| Capability | Default | Options | Pricing | Description |
| --- | --- | --- | --- | --- |
| `word.images` | Yes | None | Included | Original image assets saved as separate files. |
| `word.pages` | Yes | None | Included | Page snapshots ready to skim without opening the document. |
| `word.text` | Yes | None | Included | Readable text files for review, migration, or search. |
| `word.markdown` | Yes | None | Included | Markdown preserving document text, headings, links, and tables. |
| `word.audio` | Yes | `audioFormat` | Included | Extracted audio files when present. |
| `word.video` | Yes | None | Included | Extracted video files when present. |
| `word.embeddedFiles` | Yes | None | Included | Embedded files recovered as separate files. |


## Capability options

### Audio

| Option | Type | Default | Allowed values | Limits |
| --- | --- | --- | --- | --- |
| `audioFormat` | `enum` | `mp3` | `mp3`, `wav`, `m4a`, `original`, `best` | None |

## Options payload with all capabilities

Use this shape when you want to explicitly configure every supported output for this source type.

```json
{
  "extraction": {
    "selectedCapabilities": [
      "word.images",
      "word.pages",
      "word.text",
      "word.markdown",
      "word.audio",
      "word.video",
      "word.embeddedFiles"
    ],
    "includeManifest": true,
    "capabilityOptions": {
      "word.audio": {
        "audioFormat": "mp3"
      }
    }
  }
}
```

## Estimate example

```bash
curl -sS -X POST "https://api.tools.fast/extract/estimate/docx" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "fileSizeMb": 10,
  "pageCount": 12,
  "options": {
    "extraction": {
      "selectedCapabilities": [
        "word.images",
        "word.pages",
        "word.text",
        "word.markdown",
        "word.audio",
        "word.video",
        "word.embeddedFiles"
      ],
      "includeManifest": true,
      "capabilityOptions": {
        "word.audio": {
          "audioFormat": "mp3"
        }
      }
    }
  }
}'
```

## Extract example with all options configured

```bash
curl -sS -X POST "https://api.tools.fast/extract" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -F "file=@input.docx" \
  -F 'options={
  "extraction": {
    "selectedCapabilities": [
      "word.images",
      "word.pages",
      "word.text",
      "word.markdown",
      "word.audio",
      "word.video",
      "word.embeddedFiles"
    ],
    "includeManifest": true,
    "capabilityOptions": {
      "word.audio": {
        "audioFormat": "mp3"
      }
    }
  }
}'
```

## Machine-readable discovery

```http
GET /options/docx
GET /extractors/docx
```
