The MegaPDF API enables you to convert, manipulate, secure, and process PDF documents through simple HTTP requests. Our REST API supports a wide range of operations from basic conversions to advanced text extraction, editing, and security features.
https://mega-pdf.com/api
All API requests require authentication with an API key. You can include your API key in either the x-api-key
header or as a query parameter in your requests.
All API responses include a success
boolean indicating if the request was successful, along with other relevant data. When processing files, a fileUrl
will be provided to download the result.
// Example success response
{
"success": true,
"message": "PDF processed successfully",
"fileUrl": "/api/file?folder=compressions&filename=abc123.pdf",
"filename": "abc123.pdf"
}
// Example error response
{
"success": false,
"error": "No PDF file provided"
}