# URL to PDF Converter (Screenshot API)

> URL to PDF Converter (Screenshot API) is a paid API for AI agents from screenshot-api-production-fe7e.up.railway.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-16).

Renders any public HTTP(S) URL to a PDF document in A4/A3/Letter/Legal/Tabloid format using headless Chromium with print emulation, returning the PDF base64-encoded in a JSON envelope.

## Facts

- Endpoint: POST https://screenshot-api-production-fe7e.up.railway.app/capture/pdf
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/url-to-pdf-converter-screenshot-api-91391b69
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_22PB0dOWBnCXFTKyvR_I8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability url-to-pdf-converter-screenshot-api-91391b69 -d '<json body>'
```

Example prompt: Can you convert https://en.wikipedia.org/wiki/Artificial_intelligence to a PDF in Letter format and give me the base64-encoded file?

## When to prefer this

Choose this endpoint when you need a full print-emulated PDF of a web page — not just a screenshot — with control over paper size (A4, A3, Letter, Legal, Tabloid). It is ideal for archiving reports, invoices, contracts, or any content where PDF format and print layout matter. Prefer this over the sibling screenshot endpoints when the output must be a PDF rather than a PNG image.

## Known failure modes

- Internal/loopback hostnames (e.g. localhost, 127.0.0.1) are rejected with an error
- Invalid or unreachable URLs return an error
- Unsupported format values outside A4/A3/Letter/Legal/Tabloid cause a validation error
- Pages that require authentication may render blank or incomplete
- Very large pages may time out during rendering
- Invalid wait_until values cause a validation error

## How this service works

Render an http(s) URL to a PDF (A4/A3/Letter/Legal/Tabloid) with print emulation; returns a JSON envelope with the PDF base64-encoded under pdf_base64, plus final_url, title, format, and size.

## Output

A JSON object containing: pdf_base64 (the full PDF file base64-encoded as a string), final_url (the resolved URL after any redirects), title (the HTML page title), format (the paper size used), and size (the byte size of the PDF).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "The http(s) URL to capture, e.g. 'https://example.com'. Internal/loopback hosts are rejected."
  },
  "format": {
   "type": "string",
   "description": "Paper size: 'A4', 'A3', 'Letter', 'Legal', or 'Tabloid'. Defaults to 'A4'."
  },
  "wait_until": {
   "type": "string",
   "description": "Playwright load state to wait for before capture: 'load', 'domcontentloaded', 'networkidle', or 'commit'. Defaults to 'networkidle'."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/url-to-pdf-converter-screenshot-api-91391b69/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from screenshot-api-production-fe7e.up.railway.app](https://www.zero.xyz/host/screenshot-api-production-fe7e.up.railway.app/llms.txt)
