# Extract API – URL to PDF

> Extract API – URL to PDF is a paid API for AI agents from extract-x402.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-24).

Renders a live web page at a given URL and returns a downloadable PDF file, with options for paper size, orientation, margins, and media type.

## Facts

- Endpoint: GET https://extract-x402.vercel.app/v1/pdf?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/extract-api-url-to-pdf-18e4523e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XktSGUK40BkkOAWjzE7EB

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 extract-api-url-to-pdf-18e4523e
```

Example prompt: Can you convert this webpage to a PDF for me — https://example.com/report — in A4 portrait format with print media styling and 10mm margins?

## When to prefer this

Choose this endpoint when you need a full-fidelity rendered PDF of a live web page — including JavaScript-rendered content — with control over paper format, orientation, margins, and media type. It is better than static HTML-to-PDF converters when the page requires JavaScript rendering. It is distinct from the screenshot endpoint (which returns an image, not a PDF). Use it when the output must be a printable, archivable PDF document.

## Known failure modes

- Invalid or inaccessible URL returns an error — target site may block headless rendering
- Payment failure via x402 if insufficient USDC balance on Base
- Timeout if waitMs is too short for heavy JavaScript pages to load
- Incorrect paper/media enum values cause a validation error
- Protected pages behind authentication cannot be rendered
- Very large pages may time out or produce oversized PDFs

## How this service works

Paid web & document extraction (single or batch), rendering, screenshots, URL-to-PDF and site intelligence for AI agents. Payment via x402 (HTTP 402) in USDC on Base (eip155:8453). $0.01 per extract/sitemap/feed, $0.02 per render/screenshot/pdf, $0.03 per site-intel, $0.05 per 10-URL batch.

## Output

Returns binary PDF bytes with content-type application/pdf — a fully rendered PDF document of the target web page, ready to save or display, reflecting the page's visual state at time of capture.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Absolute http(s) URL"
      },
      "media": {
       "enum": [
        "print",
        "screen"
       ],
       "type": "string"
      },
      "paper": {
       "enum": [
        "a4",
        "a3",
        "letter",
        "legal",
        "tabloid"
       ],
       "type": "string"
      },
      "waitMs": {
       "type": "string"
      },
      "marginMm": {
       "type": "string"
      },
      "landscape": {
       "type": "string"
      },
      "background": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "body": "binary PDF bytes",
  "contentType": "application/pdf"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/extract-api-url-to-pdf-18e4523e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from extract-x402.vercel.app](https://www.zero.xyz/host/extract-x402.vercel.app/llms.txt)
