Docs
REST API
Convert HWP/HWPX documents via HTTP
Endpoint
POST https://hwpx.io/api/v1/convertAuthentication
Include your API key in the X-API-Key header.
X-API-Key: YOUR_API_KEY
Parameters
| Parameter | Type | Description |
|---|---|---|
file | File | The .hwp or .hwpx file to convert |
format | String | Output 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.
Error Codes
| Code | Description |
|---|---|
400 | Invalid file type or format |
401 | Missing or invalid API key |
429 | Daily rate limit exceeded |
500 | Internal server error |