Guide
Capture website
Turn a URL into an image, PDF or HTML.
Instead of uploading a file, you can point the API at a web page and have it rendered for you. By choosing a remote input with a capture engine, a single job can turn any URL into a screenshot image, a PDF, or a self-contained HTML snapshot. This guide shows the three engines with complete, copy-pasteable job bodies.
How it works
The capture happens on the input side: you set type to remote, point source at the page URL, and pick an engine. The conversion block then defines the output you want. Set process to true to run the job immediately.
x-oc-api-key header. The capture engines live alongside the other download engines — see the Download engines guide for the full reference.Screenshot to image
The screenshot engine renders the page in a headless browser and captures it as a raster image. Pair it with an image conversion such as image/png or image/jpg.
{
"input": [
{
"type": "remote",
"source": "https://www.online-convert.com",
"engine": "screenshot",
"options": {
"screen_width": 1280,
"screen_height": 1024,
"device_scale_factor": 1
}
}
],
"conversion": [
{ "category": "image", "target": "png" }
],
"process": true
}
curl -X POST https://api.api2convert.com/v2/jobs \
-H "x-oc-api-key: <your-api-key>" \
-H "Content-Type: application/json" \
--data @job.json
Screenshot options
These options control the virtual viewport used to render the page. They apply to both the screenshot and screenshot_pdf engines.
| Option | Description | Default |
|---|---|---|
screen_width |
Viewport width in pixels. | 1440 |
screen_height |
Viewport height in pixels. | 3851 |
device_scale_factor |
Pixel density multiplier; raise it for sharper, higher-resolution captures. | 1 |
Screenshot to PDF
The screenshot_pdf engine renders the page and writes it straight to a PDF document. The same screenshot options apply.
{
"input": [
{
"type": "remote",
"source": "https://www.online-convert.com",
"engine": "screenshot_pdf",
"options": {
"screen_width": 1280,
"screen_height": 1024,
"device_scale_factor": 1
}
}
],
"conversion": [
{ "category": "document", "target": "pdf" }
],
"process": true
}
Full page to HTML
The website engine downloads the page and its assets and produces a self-contained HTML snapshot. Use a document/html conversion for the output.
{
"input": [
{
"type": "remote",
"source": "https://www.online-convert.com",
"engine": "website"
}
],
"conversion": [
{ "category": "document", "target": "html" }
],
"process": true
}