Docs

REST API

Convert HWP/HWPX documents via HTTP

Endpoint

POST https://hwpx.io/api/v1/convert

Authentication

Include your API key in the X-API-Key header.

X-API-Key: YOUR_API_KEY

Parameters

ParameterTypeDescription
fileFileThe .hwp or .hwpx file to convert
formatStringOutput format: "md" (Markdown) or "html"

Request

Send a multipart/form-data POST request with the file and desired output format.

curl

curl -X POST "https://hwpx.io/api/v1/convert" \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@document.hwpx" \
  -F "format=md" \
  -o result.zip

Python

import requests

response = requests.post(
    "https://hwpx.io/api/v1/convert",
    headers={"X-API-Key": "YOUR_API_KEY"},
    files={"file": open("document.hwpx", "rb")},
    data={"format": "md"}
)

with open("result.zip", "wb") as f:
    f.write(response.content)

JavaScript (Node.js)

const form = new FormData();
form.append("file", fs.createReadStream("document.hwpx"));
form.append("format", "md");

const response = await fetch("https://hwpx.io/api/v1/convert", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY" },
  body: form,
});

const buffer = await response.arrayBuffer();
fs.writeFileSync("result.zip", Buffer.from(buffer));

Response

A ZIP file containing the converted document and any extracted images.

Rate Limits

20 requests per day per authenticated user. Bulk requests count once per file.

Error Codes

CodeDescription
400Invalid file type or format
401Missing or invalid API key
413File or total payload exceeds size limit
429Daily rate limit exceeded
500Internal server error

HWP → HWPX (bulk)

Convert HWP files to HWPX in a single request. Attach the file field multiple times for batch processing.

Endpoint

POST https://hwpx.io/api/v1/convert/hwp-to-hwpx

Parameters

ParameterTypeDescription
fileFile (repeatable)The .hwp file(s) to convert (attach multiple times, up to 50)

Up to 50 files per request, 50MB per file, 200MB total

Request

curl

curl -X POST "https://hwpx.io/api/v1/convert/hwp-to-hwpx" \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@document1.hwp" \
  -F "file=@document2.hwp" \
  -o result.zip

Python

import requests

files = [
    ("file", open("document1.hwp", "rb")),
    ("file", open("document2.hwp", "rb")),
]

response = requests.post(
    "https://hwpx.io/api/v1/convert/hwp-to-hwpx",
    headers={"X-API-Key": "YOUR_API_KEY"},
    files=files,
)

with open("result.zip", "wb") as f:
    f.write(response.content)

Response

A ZIP containing the converted .hwpx files. If any failed, errors.json is included.