---
title: "POST /web/html_to_any"
method: POST
path: "/web/html_to_any"
---

# POST /web/html_to_any

`POST /web/html_to_any`

## Request

- Base URL: `https://api.jigsawstack.com/v1`
- URL: `https://api.jigsawstack.com/v1/web/html_to_any`
- Auth: API key in header `x-api-key`

## Request body

- object
  - `html` string, nullable
  - `url` string, nullable
  - `goto_options` object, nullable
    - `timeout` number, nullable
    - `wait_until` 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2', nullable
  - `full_page` boolean
  - `omit_background` boolean
  - `quality` number
  - `type` 'png' | 'jpeg' | 'webp' | 'pdf'
  - `width` number
  - `height` number
  - `scale` number
  - `is_mobile` boolean
  - `dark_mode` boolean
  - `use_graphic_renderer` boolean
  - `size_preset` 'QVGA' | 'VGA' | 'SVGA' | 'HD' | 'SXGA' | 'HD+' | 'FHD' | '2K' | '2K QHD' | '5K' | '4K UHD' | '8K UHD' | 'iPhone 13 Pro' | 'iPhone XR' | 'iPhone XS' | 'iPhone XS Max' | 'iPhone X' | 'iPhone 8 Plus' | 'iPhone 8' | 'iPhone 7 Plus' | 'iPhone 7' | 'iPhone 6 Plus/6S Plus' | 'iPhone 6/6S' | 'iPhone 5' | 'iPod Touch' | 'iPad Pro' | 'iPad Third & Fourth Generation' | 'iPad Air 1 & 2' | 'iPad Mini 2 & 3' | 'iPad Mini' | 'Nexus 6P' | 'Nexus 5X' | 'Google Pixel 7 Pro' | 'Google Pixel 4 XL' | 'Google Pixel 4' | 'Google Pixel 3a XL' | 'Google Pixel 3a' | 'Google Pixel 3 XL' | 'Google Pixel 3' | 'Google Pixel 2 XL' | 'Google Pixel XL' | 'Google Pixel' | 'Samsung Galaxy Note 10+' | 'Samsung Galaxy Note 10' | 'Samsung Galaxy Note 9' | 'Samsung Galaxy Note 5' | 'LG G5' | 'One Plus 3' | 'Samsung Galaxy S9+' | 'Samsung Galaxy S9' | 'Samsung Galaxy S8+' | 'Samsung Galaxy S8' | 'Samsung Galaxy S7 Edge' | 'Samsung Galaxy S7' | 'Nexus 9' | 'Nexus 7 (2013)' | 'Pixel C' | 'Samsung Galaxy Tab 10' | 'Chromebook Pixel' | 'Letter' | 'Legal' | 'Tabloid' | 'Ledger' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6' | 'Letter landscape' | 'Legal landscape' | 'Tabloid landscape' | 'Ledger landscape' | 'A0 landscape' | 'A1 landscape' | 'A2 landscape' | 'A3 landscape' | 'A4 landscape' | 'A5 landscape' | 'A6 landscape', nullable
  - `pdf_display_header_footer` boolean
  - `pdf_print_background` boolean
  - `pdf_page_range` string, nullable
  - `return_type` 'url' | 'base64' | 'binary'

## Response `200`

Successful response

- object
  - `success` boolean: Whether the request was successful
  - `data` object: Response data
  - `error` object: Error details if request failed
    - `message` string: Error message
    - `code` string: Error code

## Other responses

- `400`: Bad Request - The request was malformed or contained invalid parameters
- `401`: Unauthorized - Authentication credentials are missing or invalid
- `403`: Forbidden - The request is not allowed
- `404`: Not Found - The requested resource was not found
- `500`: Internal Server Error - Something went wrong on our end

---

[API](https://skmtc.dev/jigsawstack/apis/jigsawstack-api.md) · [All operations](https://skmtc.dev/jigsawstack/apis/jigsawstack-api/llms.txt) · [OpenAPI document](https://skmtc.dev/jigsawstack/apis/jigsawstack-api/revisions/8bd803916bde?raw)
