---
title: "Website to PDF"
method: POST
path: "/v1/websitetopdf"
tags: ["Documents"]
---

# Website to PDF

`POST /v1/websitetopdf`

## Request

- Base URL: `https://api.apiverve.com`
- URL: `https://api.apiverve.com/v1/websitetopdf`
- Auth: API key in header `x-api-key`

Convert a website to a PDF file

## Request body

- object
  - `url` string, required: The URL of the website to convert to PDF
  - `marginTop` number: The top margin of the PDF in inches (e.g., 0.4)
  - `marginRight` number: The right margin of the PDF in inches (e.g., 0.4)
  - `marginBottom` number: The bottom margin of the PDF in inches (e.g., 0.4)
  - `marginLeft` number: The left margin of the PDF in inches (e.g., 0.4)
  - `landscape` boolean: Set to true for landscape orientation

## Response `200`

Successful Response

- object
  - `status` string: status
  - `error` string: error
  - `data` object: data

## Other responses

- `401`: Your request was not authorized, or your API Key was invalid
- `404`: Requested resource was not found
- `500`: A server error has occurred, try again later

---

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