apyhub
Back
FILE CONVERSION · FILE MANIPULATION

PDF to Word API: Convert PDFs to Editable DOCX

Hosted on ApyHub

What it does

The PDF to Word API converts PDFs into editable DOCX documents. Upload a PDF (up to 10 MB), send the URL of one hosted elsewhere, or pass it as a base64 string, and get the Word file back either directly in the response or as a link you can store or share. The PDF must not be password-protected.

Use it to let users edit contracts, forms, and reports that only exist as PDFs, reuse content from generated documents, or bring PDFs into review workflows built around Word. For scanned PDFs, run them through an OCR API first so the text becomes editable. To go the other way, use the Word to PDF API. To create Word files from web content, use the HTML to Word API.

Pick the endpoint that fits where your PDF is: upload endpoints when the file is in your app, URL endpoints when it's hosted elsewhere, and base64 endpoints when the PDF is already encoded in your data. You can start on ApyHub's free tier with no card required.

▣ ENDPOINT 01 / 06
POST
Convert PDF to DOCX (base64 → download)
https://api.eu.apyhub.com/apyhub/convert-pdf-to-docx/base64/download

QUICKSTART

GUIDE

Quickstart

Convert a Base64-encoded PDF into a downloadable DOCX file.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-pdf-to-docx/base64/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pdf_base64": "JVBERi0xLjQK...example-base64-content..."
  }' \
  -o converted.docx

Replace the example pdf_base64 value with the Base64-encoded content of your PDF.

What you'll get back

Returns the converted DOCX document as a binary file response.

The example above saves the downloaded file locally as converted.docx.

TRY ITLIVE · 150 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*
Base64-encoded PDF content (standard or URL-safe encoding).

About this endpoint

What it does

Converts a PDF provided as base64-encoded content into a downloadable DOCX file. The request body supplies the PDF data, and the response returns the converted file as binary content.

Request Body

ParameterTypeMandatoryDescription
pdf_base64StringYesBase64-encoded PDF content, using standard or URL-safe encoding.

Response

Returns a binary file response containing the converted DOCX document.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 06
POST
Convert PDF to DOCX (base64 → S3 URL)
https://api.eu.apyhub.com/apyhub/convert-pdf-to-docx/base64/url

QUICKSTART

GUIDE

Quickstart

Convert a Base64-encoded PDF into a DOCX download link.

curl -X POST "https://api.eu.apyhub.com/apyhub/convert-pdf-to-docx/base64/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pdf_base64": "JVBERi0xLjQK...example-base64-content..."
  }'

Replace the example pdf_base64 value with the Base64-encoded content of your PDF.

What you'll get back

Returns a JSON object with an optional download_url string containing the generated DOCX file URL.

{
  "download_url": "https://s3.amazonaws.com/bucket/document.docx"
}
TRY ITLIVE · 150 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*
Base64-encoded PDF content.

About this endpoint

What it does

Converts a PDF provided as Base64-encoded content into a DOCX file and returns a download URL for the generated document.

Request Body

ParameterTypeMandatoryDescription
pdf_base64StringYesBase64-encoded PDF content.

Response

Returns a JSON object with a download_url string field — a URI where the generated DOCX file can be downloaded.

ParameterTypeMandatoryDescription
download_urlStringNoDownload URL for the generated DOCX file. Format: URI.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 06
POST
Convert PDF to DOCX (file upload → download)
https://api.eu.apyhub.com/apyhub/convert-pdf-to-docx/file/download

QUICKSTART

GUIDE

Quickstart

Upload a PDF to convert it to DOCX.

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

What you'll get back

Returns a binary file response containing the converted DOCX document.

TRY ITLIVE · 150 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*
PDF file to convert. Must be a valid, non-password-protected PDF. Max 10 MB.

About this endpoint

What it does

Converts an uploaded PDF file into a DOCX file and returns the generated file as a binary response.

Request Body

ParameterTypeMandatoryDescription
fileStringYesPDF file to convert. Must be a valid, non-password-protected PDF. Max 10 MB.

Response

Returns a binary file response containing the converted DOCX document.

Notes

The uploaded PDF must be valid and not password-protected, and the file size must not exceed 10 MB.

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 04 / 06
POST
Convert PDF to DOCX (file upload → S3 URL)
https://api.eu.apyhub.com/apyhub/convert-pdf-to-docx/file/url

QUICKSTART

GUIDE

Quickstart

Upload a PDF file to convert it to DOCX.

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

What you'll get back

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

{
  "download_url": "https://s3.amazonaws.com/bucket/document.docx"
}
TRY ITLIVE · 150 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*
PDF file to convert. Max 10 MB.

About this endpoint

What it does

Converts an uploaded PDF file into a DOCX file and returns a download URL for the generated document.

Request Body

ParameterTypeMandatoryDescription
fileStringYesPDF file to convert. Max 10 MB.

Response

Returns a JSON object with a download_url string field — a URI pointing to the generated DOCX file.

ParameterTypeMandatoryDescription
download_urlStringNoURI of the generated 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 05 / 06
POST
Convert PDF to DOCX (URL → download)
https://api.eu.apyhub.com/apyhub/convert-pdf-to-docx/url/download

QUICKSTART

GUIDE

Quickstart

Convert a publicly accessible PDF URL into a DOCX file by sending the PDF link in the request body.

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

What you'll get back

Returns a binary file response containing the converted DOCX document.

TRY ITLIVE · 150 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 PDF URL. Must point to a .pdf file.

About this endpoint

What it does

Converts a publicly accessible PDF at the supplied URL into a DOCX file and returns the converted file as a binary response.

Request Body

ParameterTypeMandatoryDescription
file_urlStringYesPublicly accessible PDF URL. Must be a valid URI and point to a .pdf file.

Response

Returns a binary file response containing the converted DOCX document.

Body

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

QUICKSTART

GUIDE

Quickstart

Convert a public PDF URL to a DOCX file by sending the PDF link in the request body.

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

What you'll get back

Returns a JSON object with an optional download_url string field containing the DOCX file URL.

{
  "download_url": "https://s3.amazonaws.com/bucket/document.docx"
}
TRY ITLIVE · 150 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 PDF URL.

About this endpoint

What it does

Converts a PDF available at a public URL into a DOCX file. The request sends the PDF URL, and the response returns a downloadable DOCX URL.

Request Body

ParameterTypeMandatoryDescription
file_urlStringYesPublicly accessible PDF URL. Must be a URI.

Response

Returns a JSON object with a download_url string field containing the DOCX file URL.

ParameterTypeMandatoryDescription
download_urlStringNoDownload URL for the generated DOCX file. Must be a URI.

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.