Formats

HTML → DOCX

Use this when the content already exists as markup — a CMS field, an email body, or the output of a rich-text editor.

Reading this with an AI agent?

The entire documentation lives in one Markdown file, built to be fetched and read by an LLM. Copy the prompt below and paste it into ChatGPT, Claude, Cursor or any agent with web access — it asks the agent to read the file before helping you.

Open the Markdown

https://api.searchops.io/doc/docxapi.md

Request

POST /v1/generate
{
  "input_type": "html",
  "content": "<h1>Invoice 2024-01</h1><p>Amount due: <strong>$1,250.00</strong></p><table><tr><th>Item</th><th>Price</th></tr><tr><td>Consulting</td><td>$1,250.00</td></tr></table>",
  "response_format": "file",
  "filename": "invoice-2024-01"
}

Send a fragment or a full document — <html> and <body> wrappers are optional.

Supported elements

WorksIgnored
h1–h6, p, br, hrstyle attributes and <style> blocks
strong, b, em, iCSS classes and external stylesheets
ul, ol, li<script> and any JavaScript
table, tr, th, tdRemote images and external resources
blockquote, code, pre, aiframe, video, form controls

Styling comes from the template, not from your HTML. Conversion maps structure — a heading becomes a Word heading — and the document template decides how it looks. Inline CSS is dropped, which is what keeps output consistent across sources.

Remote resources are blocked at the conversion layer for security. An <img src="https://…"> will not be fetched or embedded.

Cleaning CMS output

HTML from editors often carries wrappers and inline styles. They are harmless — unsupported markup is skipped, not rejected. If the result has unexpected gaps, strip empty <p> and <div> nodes before sending.

If you control the source and want tighter output, convert to Markdown first: it maps more predictably.