01

Use the styles the author set

Heading styles are the outline. Normal paragraphs, lists, and tables are different blocks. A conversion that ignores styles produces the same flat text as a copy-paste.

Lists should stay grouped. A numbered step split into neighboring paragraphs breaks procedures.

02

Tables and images inside the file

A DOCX table has rows and cells. Emit a readable table and keep the block type in DocIR. An embedded image is an asset, not a paragraph of nothing.

If the image needs text, that is a separate route, and the workspace has to allow image parsing.

03

Same job contract as a PDF

POST /v1/parse accepts the file. The result is still Markdown plus docir.v1, with the route and warnings on the job.

Legacy Office files are routed when the format is supported. Check the warnings if a feature in the document did not survive.

04

What the DOCX path keeps

A DOCX is one DocIR page. Paragraphs whose style name starts with heading become heading blocks. The level comes from the number in the style name, from 1 to 6. A style name that starts with list becomes a list block. Other non-empty paragraphs become paragraph blocks. Each Word table becomes a table block of cell text.

Comments and tracked changes are not separate blocks. An empty file, with no paragraphs and no tables, adds the warning that the DOCX contained no extractable paragraphs or tables. Legacy .doc files are converted when LibreOffice is available; otherwise that conversion fails closed.

Paragraphs and tables are written in body order, and each table becomes its own table block. A table that sat between two sections in Word stays between them. A list-styled paragraph becomes one list block, and the Markdown marker is a hyphen. Word's automatic number is not copied into the text. The style name is matched in lowercase, so Heading 1 and heading 1 both count.

  • Check heading styles, not bold text inside a Normal paragraph.
  • A list-styled paragraph becomes one list block, marked with a hyphen.
  • Read table rows from the table block.
  • Confirm the body is the version you meant to index, because comments are not extracted.
05

The file to send

Send one DOCX. The default route is container. The file is one DocIR page. Paragraphs and tables are written in body order, so a table that sat between two sections in Word stays between them.

A style name that starts with heading, matched in lowercase, becomes a heading. A list-styled paragraph becomes one list block and the Markdown marker is a hyphen. Comments and tracked changes are not extracted. A legacy .doc fails closed when LibreOffice is unavailable.

  • result.manifest.decision.route is container.
  • Check a Heading 1 and a list item in result.markdown.
  • Read table rows from the table block, between the paragraphs that surround it in Word.
export DOCPARSE_URL="https://docparse.genedai.me"
export DOCPARSE_API_KEY="your_key"

curl -fsS -X POST \
  "$DOCPARSE_URL/v1/parse?wait=true" \
  -H "Authorization: Bearer $DOCPARSE_API_KEY" \
  -F "file=@report.docx" \
  -F "mode=both" \
  -o result.json

jq -r '.result.markdown' result.json
jq '.result.document.schemaVersion, .result.document.pages[0].blockIds' result.json
jq '.result.manifest.decision.route, .result.manifest.parserVersion' result.json

Frequently asked questions

Questions this guide answers

Does DocParse accept DOCX?

Yes. DOCX is routed through POST /v1/parse with PDF, images, PPTX, XLSX, HTML, XML, and CSV. The outputs are Markdown and docir.v1, and the default route for a text-based DOCX is container.

Are Word heading styles preserved?

A paragraph whose style name starts with heading becomes a heading block. The level is the number in that style name, capped from 1 to 6. Bold text in a Normal paragraph stays a paragraph.

What happens to comments and tracked changes?

The DOCX path reads paragraph text, list styles, and tables. It does not emit a block for comments or tracked changes. If an empty file yields nothing, the warning says no extractable paragraphs or tables were found.