apyhub
FILE CONVERSION

Convert HTML to Word API

What it does

HTML to DOCX converts HTML files or public HTML URLs into Word documents. Send a .html or .htm file, or pass a publicly accessible page URL, and get back either a DOCX download or a generated S3 URL.

Use the file upload endpoints when you already have HTML on your server, and use the URL endpoints when the source page is hosted elsewhere. The /file/download and /url/download routes return the converted document as binary content. The /file/url and /url/url routes return a JSON object with a url field pointing to the generated DOCX.

You can also set an output filename stem on the file-download route to control the exported document name. That makes HTML to DOCX useful for exporting rendered reports, article archives, invoices, or CMS pages into a format that can be reviewed and edited in Microsoft Word.

If your workflow needs a document version of web content without building your own renderer, HTML to DOCX gives you a direct conversion path from HTML input to DOCX output.

▣ ENDPOINT 01 / 04
POST
Convert HTML to DOCX (file upload → download)
https://api.eu.apyverse.com/apyhub/convert-html-to-docx/file/download

QUICKSTART

GUIDE

Quickstart

Upload an HTML file to convert it to a DOCX download.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-html-to-docx/file/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.html"

What you'll get back

Returns a binary file download

TRY ITLIVE · 120 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
HTML file to convert (.html or .htm).
Output filename stem (without extension). Defaults to `converted`.

About this endpoint

What it does

Converts an uploaded HTML file to a DOCX file and returns the generated document as a binary response. Send the HTML file in the request body; the response is the downloadable DOCX file.

Request Body

ParameterTypeMandatoryDescription
fileStringYesHTML file to convert. Accepts .html or .htm file uploads.
outputStringNoOutput filename stem without extension. Defaults to converted.

Response

Returns a binary response containing the converted DOCX file.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 04
POST
Convert HTML to DOCX (file upload → S3 URL)
https://api.eu.apyverse.com/apyhub/convert-html-to-docx/file/url

QUICKSTART

GUIDE

Quickstart

Upload an HTML file to convert it into a DOCX file.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-html-to-docx/file/url" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.html"

What you'll get back

Returns a JSON object with an optional url string field containing the URI of the converted DOCX file.

{
  "url": "https://s3.amazonaws.com/bucket/converted.docx"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
HTML file to convert (.html or .htm).

About this endpoint

What it does

Converts an uploaded HTML file into a DOCX file and returns a URL where the converted document can be accessed.

Request Body

ParameterTypeMandatoryDescription
fileStringYesHTML file to convert. Must be a .html or .htm file.

Response

Returns a JSON object with a url string field containing the URI of the converted DOCX file.

ParameterTypeMandatoryDescription
urlStringNoURI for the converted DOCX file.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 03 / 04
POST
Convert HTML to DOCX (URL → download)
https://api.eu.apyverse.com/apyhub/convert-html-to-docx/url/download

QUICKSTART

GUIDE

Quickstart

Download a DOCX file from a public HTML page URL.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-html-to-docx/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.html"}'

What you'll get back

Returns a binary DOCX file as the response body.

TRY ITLIVE · 120 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Publicly accessible HTML page URL.

About this endpoint

What it does

Converts the HTML page at the given public URL into a DOCX file and returns the file as a binary response.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible HTML page URL. Must be a valid URI.

Response

Returns a binary file response containing the generated DOCX document. The output schema is a single binary string, so the response body is the file content itself.

ParameterTypeMandatoryDescription
binaryStringYesBinary DOCX file content returned by the endpoint.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 04 / 04
POST
Convert HTML to DOCX (URL → S3 URL)
https://api.eu.apyverse.com/apyhub/convert-html-to-docx/url/url

QUICKSTART

GUIDE

Quickstart

Convert a public HTML page URL into a DOCX file.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-html-to-docx/url/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.html"}'

What you'll get back

Returns a JSON object with a url string field — the download URL for the converted DOCX file.

{
  "url": "https://s3.amazonaws.com/bucket/converted.docx"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Publicly accessible HTML page URL.

About this endpoint

What it does

Converts a publicly accessible HTML page at the provided URL into a DOCX file and returns the resulting file URL. The response is a JSON object containing the converted document location.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible HTML page URL. Must be a URI.

Response

Returns a JSON object with a url string field containing the URI of the converted DOCX file.

ParameterTypeMandatoryDescription
urlStringYesURI of the converted DOCX file.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.