To turn a webpage into a PDF with CloudConvert API v2, create a job with a capture-website task, set output_format to pdf, and export the result. For an HTML file you already have, use CloudConvert’s HTML-file input route or a job with the appropriate import and conversion tasks; check the live operation reference for the exact payload for that input method. CloudConvert authenticates API requests with a Bearer token, and its jobs are asynchronous by default.
Choose the right input and output path
CloudConvert describes its HTML-to-PDF API as accepting either a webpage URL or an HTML file. A URL capture is the direct route for a page served on the web. An HTML-file route is appropriate when your application has already assembled or rendered the document. The product overview does not, by itself, establish the exact request body for every HTML-file workflow, so confirm that route in the current operation reference or Job Builder before implementing it. CloudConvert HTML-to-PDF API
- Webpage URL: use the
capture-websiteoperation with the page’s URL. - HTML file: use the dedicated HTML-file input path or construct the relevant import and conversion tasks; the required import operation depends on where the file is stored.
- Retrieve the PDF: use
export/urlfor a temporary download URL, or select a matching storage export operation to write the result to an integrated storage provider.
CloudConvert’s product page says its rendering is based on Chrome and lists options such as page size, margins, zoom, headers, and footers. That is the vendor’s description, not an independent guarantee for every website or document. Test pages that rely on scripts, custom fonts, protected resources, long content, or print styles before depending on the output. CloudConvert HTML-to-PDF API
Prepare a CloudConvert API key
- Create an API key in CloudConvert and restrict it to the scopes your integration needs. Keep the key on your server, not in browser-side code.
- Send it in the HTTP header as
Authorization: Bearer API_KEY. Creating jobs requires thetask.writescope; reading task status requirestask.read. Getting Started Jobs Tasks - Use the standard asynchronous jobs endpoint for queued or longer-running work. The documented synchronous website-capture example uses a separate synchronous host and
redirect: true; use it only when an on-the-fly response suits your workload.
Capture a webpage URL as PDF
This is the core API v2 job pattern from CloudConvert’s website-capture example. The JSON below shows the task structure; the following cURL command submits it to the synchronous endpoint shown in CloudConvert’s example. Replace the URL and API key, and verify supported options and values in the current operation documentation. Capture Website HTML-to-PDF API
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →#1 Best Overall
- Convert your PDF files into Word, Excel & Co. the easy way
- Convert scanned documents thanks to our new 2022 OCR technology
- Adjustable conversion settings
- No subscription! Lifetime license!
- Compatible with Windows 11, 10, 8.1, 7 - Internet connection required
{
"tasks": {
"capture-my-website": {
"operation": "capture-website",
"url": "https://example.com",
"output_format": "pdf",
"css_media_type": "screen"
},
"export-my-file": {
"operation": "export/url",
"input": "capture-my-website"
}
},
"redirect": true
}
Runnable cURL submission:
curl -X POST "https://sync.api.cloudconvert.com/v2/jobs"
-H "Authorization: Bearer YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"tasks": {
"capture-my-website": {
"operation": "capture-website",
"url": "https://example.com",
"output_format": "pdf",
"css_media_type": "screen"
},
"export-my-file": {
"operation": "export/url",
"input": "capture-my-website"
}
},
"redirect": true
}'
The official example uses css_media_type set to screen. Choose the media style and page options that match the desired PDF, then inspect the result on representative content. For longer or production jobs, use the asynchronous job lifecycle described below instead of holding a network request open. Capture Website Jobs
Convert an HTML file rather than a live URL
The API supports an HTML-file input category, but the correct job payload depends on how the file reaches CloudConvert. If it lives at a URL, an import/url task may be part of a general job; if it is in object storage, use the matching provider-specific import operation. A typical general conversion job has an import task, a convert task with output_format set to pdf, and an export task. Do not assume that a generic file conversion payload is interchangeable with the dedicated HTML-file route: confirm the supported input operation and fields for your source in the current docs or Job Builder. Quickstart Guide Convert Files
Rank #2
- Convert over 50 document file formats.
- Preview your files from Doxillion before converting them.
- Use batch conversion to convert thousands of files at once.
- Enjoy an easy-to-use, intuitive interface with a Drag and Drop file option.
- Burn your converted or original files directly to disc.
When using S3, Azure, Google Cloud, or OpenStack, CloudConvert’s quickstart recommends the provider-specific import and export tasks rather than routing files through a generic URL path. Choose export/url when a temporary download link fits your application; choose a storage export when the output should land directly in an integrated storage service. Quickstart Guide
Handle job completion reliably
Job creation is asynchronous by default, and the initial response normally reports a job in processing status. A queued job can take longer than an HTTP client’s request timeout, so production code should not rely on a single open request waiting until the PDF is ready. Jobs Tasks
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- EDIT text, images & designs in PDF documents. ORGANIZE PDFs. Convert PDFs to Word, Excel & ePub.
- READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.
- CREATE, COMBINE, SCAN and COMPRESS PDFs
- FILL forms & Digitally Sign PDFs. PROTECT and Encrypt PDFs
- LIFETIME License for 1 Windows PC or Laptop. 5GB MobiDrive Cloud Storage Included.
- Submit the job and retain its identifier.
- Wait for completion using a configured webhook or retrieve job/task status from the API. If polling, use a sensible interval and stop when the job reaches a terminal state rather than polling indefinitely.
- When the export task completes, read its result and retrieve the downloadable URL or use the configured storage output.
- Handle failed tasks explicitly: record the relevant status and error details, and decide whether to retry based on the failure rather than blindly resubmitting every job.
Use a webhook for production workflows that should resume when work finishes; use status retrieval or polling when it is simpler for a small integration. The job and task references describe the status-oriented workflow and completion handling. Jobs Tasks
Choose rendering options deliberately
- CSS media: the documented capture example selects
screen. Use the media type that matches the intended on-screen or print styling, and check the actual page output. - Page layout: the HTML-to-PDF product page lists page size, margins, zoom, headers, and footers. Select only the options needed and consult the operation documentation for exact parameter names and supported values.
- Dynamic pages: test whether scripts, fonts, authentication, or protected assets load in your intended capture workflow. The product description is not an independent test of every site configuration.
- Long documents: inspect multiple pages, page breaks, and content near the end of the document. A successful job status alone does not prove the PDF is visually complete.
CloudConvert describes its output as based on the latest Chrome browser “for the best possible, accurate PDF files.” This is a vendor claim; the available information does not establish independent accuracy or speed measurements. HTML-to-PDF API
Rank #4
- Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.
- Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
- Read & Annotate. Enjoy intuitive reading modes and powerful tools to comment, highlight, and mark up PDFs.
- Create & Manage PDFs. Create new PDFs, combine multiple files, scan documents, and compress for easy sharing.
- Fill & Sign Forms. Complete forms and digitally sign documents with secure e-signature tools.
Cost and performance considerations
CloudConvert’s HTML-to-PDF product page displayed a starting price of $0.008 per file when accessed on October 3, 2026. This is a volatile starting price, not a complete quote or a guaranteed total for a particular workload; check the live pricing page and applicable plan conditions before estimating costs. HTML-to-PDF API
No independent conversion-speed statistic is established here. Actual elapsed time can be affected by queueing and the page or file being processed, and CloudConvert warns that network clients can time out while jobs queue. For reliability, favor async completion handling for variable-duration work, and measure your own representative documents before setting timeouts or throughput expectations. Jobs Tasks
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Best Value
- ALL-IN-ONE SOLUTION – read, edit, convert, merge and protect your PDF files
- MAXIMUM FUNCIONALITY – create interactive forms, compare PDFs, bates numbering, find and replace text or colors, convert documents, OCR engine, comment, highlight, fill out and print forms, document protection and others
- EASY TO INSTALL AND USE – well-structured user-interface, in-program instructions, free tech support whenever you need it
- GREAT VALUE FOR MONEY - why spend a fortune if you can have maximum functionality at a reasonable price - this also fits the requirements of companies very well
Troubleshooting common problems
| Symptom | Likely cause | What to check |
|---|---|---|
| Request is unauthorized or forbidden | The Bearer key is missing, invalid, or lacks the required scope. | Send Authorization: Bearer YOUR_API_KEY; confirm task.write for job creation and task.read for status retrieval. Getting Started |
| Client times out before receiving a PDF | The job may still be queued or processing; synchronous waiting is unsuitable for its duration. | Use the asynchronous job endpoint and handle completion by webhook or status retrieval. Jobs Tasks |
| Job or task fails | A task configuration, input source, or operation parameter may not match the chosen route. | Inspect task status and error details; verify the operation and fields in the current capture or conversion reference. Capture Website Convert Files |
| PDF has missing or incorrect styling | The page may depend on a different CSS media type, scripts, or unavailable resources. | Check css_media_type, test the page’s assets and scripts, and compare screen and print-oriented output where relevant. HTML-to-PDF API |
| Cannot retrieve the result | The export task may not have completed, or the chosen output route may not match the application. | Check export task status; use its result URL when using export/url, or verify the destination configuration for storage export. Quickstart Guide |
Or skip the browser setup: ScreenshotNeo for webpage screenshots
ScreenshotNeo is a website screenshot API and MCP server, not a general HTML-file-to-PDF conversion service. For a webpage image capture, a single GET request can return PNG, JPEG, WebP, or a PDF. Its capture flow accepts cookie and consent banners like a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, with the outcome identified in response headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. ScreenshotNeo
For a PDF from a webpage URL, here is the cURL call; replace the target URL and API key. See the ScreenshotNeo API documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Free usage includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. For an existing HTML file that needs conversion rather than a webpage capture, use the CloudConvert workflow above. Sign up for ScreenshotNeo free.
Frequently asked questions
Can I use CloudConvert to save a public website as a PDF?
Yes. Use the capture-website job operation with the page URL and PDF output format. Pages that require special access or resources should be tested with your intended setup.
Recommended Free Tools
Can I convert a local HTML file with the same capture request?
Not necessarily. The capture example is for a URL; an HTML file needs the supported file-input route or appropriate import task for where that file is stored. Confirm the exact fields in the current docs.
Should I use screen or print CSS?
Use the media style whose layout you want in the PDF, then compare output on representative pages; the documented example uses screen.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




