PDF Munk API Reference
Creates a PDF from either HTML content or a URL. Supports custom page sizes, fonts, viewport dimensions, and dynamic parameters.
Note: Either url or html_content must be provided, but not both.
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL of the webpage to convert to PDF
https://example.comHTML content to convert to PDF
<html><body><h1>Hello World</h1></body></html>Optional CSS to apply to the HTML
body { font-family: Arial; }Output format:
url: Returns a URL to the uploaded PDF (default)pdf,binary,file: Returns the PDF file directly
urlPossible values: Paper size for the PDF
A4Possible values: Set to true for landscape orientation
falseWhether to print background graphics
trueWhether to display header and footer
falseWhether to prefer CSS-defined page size
trueMaximum number of pages to generate (tier-dependent)
10Custom paper width in pixels
800Custom paper height in pixels
1200Viewport width for rendering
1080Example: 1920Viewport height for rendering
720Example: 1080Google Font name(s) to include (use | separator for multiple)
Roboto|Open SansTime to wait in seconds before generating PDF
0Example: 2PDF generated successfully
Bad request - validation error
Unauthorized - invalid or missing API key
Internal server error
Creates a PNG image from either HTML content or a URL. Supports custom dimensions, quality settings, fonts, and dynamic parameters.
Note: Either url or html_content must be provided, but not both.
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL of the webpage to capture as image
https://example.comHTML content to render as image
<div style='padding: 20px;'><h1>Hello</h1></div>Optional CSS to apply to the HTML
div { background: white; }Output format:
url: Returns a URL to the uploaded image (default)base64: Returns base64-encoded image stringboth: Returns both URL and base64image,png,binary,file: Returns the image file directly
urlPossible values: Width of the output image in pixels
1280Example: 800Height of the output image in pixels
720Example: 600Viewport width for rendering (if different from output width)
1920Viewport height for rendering (if different from output height)
1080Device scale factor for higher resolution
1Example: 2Image quality (30-100)
80Example: 90Capture full page (for URLs only)
falseTime to wait in seconds before capturing
0Example: 2When to consider navigation successful (for URLs)
loadPossible values: Google Font name(s) to include (use | separator for multiple)
Poppins|MontserratImage generated successfully
Bad request
Unauthorized
Rate limit exceeded
Internal server error
Creates a chart image using Chart.js library. Supports various chart types including line, bar, pie, doughnut, radar, and more.
API key for authentication. Get your key from https://pdfmunk.com/dashboard
Type of chart to generate
barPossible values: Width of the chart in pixels
800Example: 1000Height of the chart in pixels
600Example: 600Output format for the chart image
urlPossible values: Chart generated successfully
Bad request
Unauthorized
Compresses an image from a URL or base64 string with adjustable quality settings. Maximum file size: 3MB.
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL of the image to compress
https://example.com/image.jpgBase64-encoded image (alternative to image_url)
data:image/jpeg;base64,/9j/4AAQSkZJRg...Format of the compressed image output
urlPossible values: Compression quality (1-100, higher = better quality)
85Example: 80Image compressed successfully
Bad request
Merges multiple PDF files from URLs into a single PDF document.
Limits:
Maximum 15 input PDFs
Maximum 200 pages per PDF
Maximum 500 total pages combined
API key for authentication. Get your key from https://pdfmunk.com/dashboard
Array of PDF URLs to merge
["https://example.com/doc1.pdf","https://example.com/doc2.pdf","https://example.com/doc3.pdf"]PDFs merged successfully
Bad request
Splits a PDF or extracts specific pages based on page ranges.
Page Range Format:
Single page:
"3"Range:
"1-5"Multiple ranges:
"1-3,5,7-10"Open-ended:
"10-"(from page 10 to end)
Limits:
Maximum 200 pages per PDF
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL of the PDF to split
https://example.com/document.pdfPage range specification
1-5,8,10-PDF split successfully
Bad request
Removes password protection from a PDF file. Supports both user and owner passwords.
Maximum file size: 10MB
API key for authentication. Get your key from https://pdfmunk.com/dashboard
PDF file to unlock
Password to unlock the PDF
secret123Optional custom name for output file
unlocked_document.pdfPDF unlocked successfully
Bad request or incorrect password
Fetches and returns the HTML content of a webpage with configurable wait conditions and viewport settings.
API key for authentication. Get your key from https://pdfmunk.com/dashboard
URL to fetch HTML from
https://example.comWhen to consider navigation successful
loadPossible values: Maximum wait time in milliseconds
30000Example: 60000CSS selector to wait for before returning HTML
#contentAdditional wait time in milliseconds after page load
0Example: 2000Viewport width
1920Example: 1920Viewport height
1080Example: 1080Custom user agent string
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36HTML fetched successfully
Bad request
Last updated