---
title: "POST /url2pdf"
method: POST
path: "/url2pdf"
tags: ["url2pdf"]
---

# POST /url2pdf

`POST /url2pdf`

Capture a full-page Url2Pdf of a website

## Request body

- Url2PdfDto
  - `url` string, required — Target URL
  - `device` 'desktop' | 'mobile' — Device type to emulate. Defaults to desktop.
  - `proxyCountry` string — Proxy country code to route the request
  - `format` 'letter' | 'legal' | 'a0' | 'a1' | 'a2' | 'a3' | 'a4' | 'a5' | 'a6' — Paper format
  - `orientation` 'portrait' | 'landscape' — Orientation
  - `margin` MarginDto
    - `top` number — Top margin in mm
    - `bottom` number — Bottom margin in mm
    - `right` number — Right margin in mm
    - `left` number — Left margin in mm
  - `scale` number — Rendering scale between 0–2
  - `hideCookie` boolean — Hide cookie popups
  - `skipCaptcha` boolean — Try to skip captcha
  - `addTimestamp` boolean — Add timestamp watermark

## Response `200`

Successfully captured Url2Pdf

- Url2PdfResponseDto
  - `timestamp` number, required — Timestamp of the request in milliseconds
  - `apiStatus` 'success' | 'failure', required — API status message
  - `apiCode` number, required — API status code
  - `meta` Url2PdfMetaDto, required
    - `url` string, required — The target URL
    - `device` string, required — Device type used
    - `proxyCountry` string — Proxy country used, if any
    - `format` string, required — Paper format
    - `orientation` string, required — Orientation
    - `margin` MarginDto
      - `top` number — Top margin in mm
      - `bottom` number — Bottom margin in mm
      - `right` number — Right margin in mm
      - `left` number — Left margin in mm
    - `scale` number, required — Rendering scale
    - `test` TestMetaDto, required
      - `id` string, required — Unique test identifier
  - `data` string, required — Generated PDF URL

## Other responses

- `400` — Bad request (e.g. invalid URL or parameters)
- `500` — Internal server error while capturing Url2Pdf

---

[API](https://skmtc.net/geekflare/apis/geekflare-api.md) · [All operations](https://skmtc.net/geekflare/apis/geekflare-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/geekflare/geekflare-api/versions/936993afc936/schema)
