# Markdown to PDF Converter (`automation-lab/markdown-to-pdf`) Actor

Convert Markdown documents to beautifully formatted PDFs using three themes: GitHub, clean docs, and minimal. Supports tables, code blocks, images, and syntax highlighting. API-first with ready-made examples for Node.js, Python, and cURL. Ideal for automated report and documentation generation.

- **URL**: https://apify.com/automation-lab/markdown-to-pdf.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Markdown to PDF Converter

Turn any Markdown text into a polished, print-ready PDF — in seconds, without installing anything. Paste your Markdown, pick a theme, and get a download link.

Whether you're generating reports, documentation, invoices, release notes, or beautifully formatted changelogs, **Markdown to PDF Converter** handles it automatically with headless Chromium rendering for pixel-perfect output.

---

### What does it do?

This actor takes raw Markdown text as input, converts it to HTML using `marked`, applies a styled theme, and renders it to a PDF via headless Chromium (Playwright). The resulting file is stored in the Apify key-value store and a download URL is returned in the dataset.

**Supported Markdown features:**
- Headings (H1–H6)
- Bold, italic, strikethrough text
- Ordered and unordered lists (nested supported)
- Code blocks (inline and fenced)
- Tables (GitHub-flavored)
- Blockquotes
- Horizontal rules
- Links and images
- Inline HTML

---

### Who is it for?

- **Developers** generating documentation or API references from Markdown
- **Technical writers** converting README files or specs to shareable PDFs
- **Bloggers** exporting posts as downloadable documents
- **Business users** automating report generation from templates
- **DevOps teams** generating changelogs or release notes as PDFs
- **No-code users** who need quick Markdown-to-PDF without installing tools

---

### Why use it?

Most Markdown-to-PDF tools require local installs (pandoc, wkhtmltopdf, LaTeX) or are limited free-tier SaaS tools. This actor runs on demand via the Apify platform:

- **No install required** — fully cloud-hosted
- **API-first** — integrate into any workflow, CI/CD pipeline, or no-code tool
- **Multiple themes** — GitHub style, clean docs, or minimal
- **PPE billing** — pay only for what you generate (no monthly subscriptions)
- **Playwright-powered** — uses real Chromium, so tables, code blocks, and styling render exactly as in a browser

---

### Themes

Three built-in themes are available:

#### GitHub (default)
Mirrors the GitHub Markdown rendering style. Uses the system UI font stack, light gray code block backgrounds, blue links, and horizontal rules under H1/H2. Ideal for README files, technical documentation, and anything that looks good on GitHub.

#### Clean Docs
A documentation-oriented theme with serif headings (Helvetica Neue for headers, Georgia for body text). Blue accent blockquotes, subtle borders, and generous spacing. Ideal for user manuals, product docs, and professional reports.

#### Minimal
No-frills, maximum readability. Plain sans-serif font, minimal decorations, tight spacing. Great for internal documents, notes, or anything where content matters more than style.

---

### Output data fields

| Field | Type | Description |
|-------|------|-------------|
| `pdfUrl` | string | Direct download URL for the generated PDF (from Apify key-value store) |
| `pageCount` | number | Estimated number of pages in the generated PDF |
| `fileSizeBytes` | number | Size of the PDF file in bytes |
| `theme` | string | Theme used for rendering (`github`, `clean`, or `minimal`) |
| `pageSize` | string | Paper size (`A4`, `Letter`, or `Legal`) |
| `convertedAt` | string | ISO 8601 timestamp of when the PDF was generated |

---

### Pricing

This actor uses **Pay Per Event (PPE)** billing — you only pay for actual usage:

| Event | Price |
|-------|-------|
| Actor start (one-time per run) | $0.020 |
| PDF generated | $0.005 |

**Typical cost per run: ~$0.025** (start + one PDF).

You can convert hundreds of documents per dollar.

---

### How to use

#### Via the Apify Console

1. Go to [Markdown to PDF Converter](https://apify.com/automation-lab/markdown-to-pdf) on Apify Store
2. Click **Try for free**
3. Paste your Markdown into the **Markdown content** field
4. Choose a **Theme**, **Page size**, and whether to include margins
5. Click **Start** and wait a few seconds
6. Download your PDF from the **Output** tab → click the `pdfUrl` link

#### Via the API

See the API usage section below for Node.js, Python, and cURL examples.

---

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `markdown` | string | Yes | — | Markdown text to convert |
| `theme` | string | No | `github` | Visual theme: `github`, `clean`, or `minimal` |
| `pageSize` | string | No | `A4` | Paper size: `A4`, `Letter`, or `Legal` |
| `margins` | boolean | No | `true` | Add standard page margins (1 cm top/bottom, 1.5 cm sides) |

#### Markdown field
The `markdown` field accepts any valid Markdown string including GitHub-flavored Markdown (GFM). There is no hard character limit, but very long documents may produce multi-page PDFs which may take slightly longer to render.

#### Theme field
- `github` — GitHub-flavored style with system fonts, gray code blocks, bordered tables
- `clean` — Professional docs style with serif body text and blue accents
- `minimal` — Stripped-down style for maximum readability

#### PageSize field
- `A4` — 210 × 297 mm (most common internationally)
- `Letter` — 8.5 × 11 inches (North American standard)
- `Legal` — 8.5 × 14 inches (for legal and formal documents)

#### Margins field
When `true` (default), the PDF includes 1 cm top/bottom margins and 1.5 cm left/right margins. Set to `false` for full-bleed or banner-style layouts.

---

### Output

The actor produces two outputs:

#### Dataset item
A single dataset item containing all metadata fields listed in the **Output data fields** table above.

#### Key-value store
The PDF binary is stored as `output.pdf` in the default key-value store. The `pdfUrl` in the dataset item is a direct link to this file.

---

### Tips

- **Long documents**: For very long Markdown files (10,000+ characters), the actor handles them gracefully but rendering may take a few extra seconds.
- **Images in Markdown**: External images (`![alt](https://...)`) are rendered if they are publicly accessible. Local file paths will not work in the cloud environment.
- **Code syntax highlighting**: The actor does not currently apply syntax-colored code highlighting. Code blocks are rendered in a monospace font with a light background. Full syntax highlighting may be added in a future version.
- **Custom fonts**: All three themes use web-safe system fonts to avoid font loading issues in the headless browser.
- **Multi-page documents**: Long Markdown documents automatically flow across multiple pages. The `pageCount` field in the output tells you how many pages were generated.
- **Repeated runs**: Each run generates a fresh `output.pdf` in the key-value store. If you need to keep multiple PDFs, download them before starting a new run.

---

### Integrations

#### Zapier / Make / n8n
Use the **Apify** integration in your automation platform to call this actor via its API. Pass the `markdown` input field with your dynamic content from the previous step, then use the `pdfUrl` from the output to send the PDF via email, save to Google Drive, or attach to a Slack message.

#### GitHub Actions
Add a step in your CI/CD workflow to generate release notes as a PDF on every tag push:

```yaml
- name: Generate release notes PDF
  run: |
    curl -X POST "https://api.apify.com/v2/acts/automation-lab~markdown-to-pdf/runs?token=$APIFY_TOKEN" \
      -H "Content-Type: application/json" \
      -d "{\"markdown\": \"$(cat CHANGELOG.md | jq -Rs .)\"}"
````

#### Webhooks

Configure a webhook on the actor run to receive the `pdfUrl` immediately after generation completes, then trigger downstream processing automatically.

***

### API usage

#### Node.js (apify-client)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('automation-lab/markdown-to-pdf').call({
    markdown: '## Hello World\n\nThis is my **first PDF**.\n\n- Item 1\n- Item 2',
    theme: 'github',
    pageSize: 'A4',
    margins: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log('PDF URL:', items[0].pdfUrl);
```

#### Python (apify-client)

```python
from apify_client import ApifyClient

client = ApifyClient(token="YOUR_APIFY_TOKEN")

run = client.actor("automation-lab/markdown-to-pdf").call(run_input={
    "markdown": "## Hello World\n\nThis is my **first PDF**.\n\n- Item 1\n- Item 2",
    "theme": "clean",
    "pageSize": "Letter",
    "margins": True,
})

dataset_items = client.dataset(run["defaultDatasetId"]).list_items()
print("PDF URL:", dataset_items.items[0]["pdfUrl"])
```

#### cURL

```bash
## Start the run
curl -X POST "https://api.apify.com/v2/acts/automation-lab~markdown-to-pdf/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "## My Document\n\nHello **world**!",
    "theme": "github",
    "pageSize": "A4",
    "margins": true
  }'

## Get results (replace RUN_ID with the id from the response above)
curl "https://api.apify.com/v2/datasets/DEFAULT_DATASET_ID/items?token=YOUR_APIFY_TOKEN"
```

***

### Use with Claude AI (MCP)

This actor is available as a tool in Claude AI through the Model Context Protocol (MCP). Add it to Claude Desktop, Cursor, Windsurf, or any MCP-compatible client.

#### Setup for Claude Code

```bash
claude mcp add --transport http apify "https://mcp.apify.com"
```

#### Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com"
        }
    }
}
```

#### Example prompts

- "Convert this Markdown to a PDF using the GitHub theme on A4 paper and give me the download link: \[markdown]."
- "Take my README.md content and generate a clean PDF document I can share with stakeholders."
- "Convert these release notes to a Letter-size PDF using the minimal theme."

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

***

### Legality

This actor converts text you provide — it does not scrape or access any external websites. There are no legal concerns with converting your own Markdown content to PDF format.

Ensure you have rights to any content you convert (e.g., do not convert copyrighted documents without permission).

***

### FAQ

**Q: How long does conversion take?**
A: Typically 5–15 seconds for standard-length documents. The browser launch takes the majority of the time, not the conversion itself.

**Q: Is there a maximum Markdown length?**
A: No hard limit is enforced. Documents up to hundreds of kilobytes work fine. Extremely long documents (500KB+) may approach the 300-second timeout.

**Q: Can I embed images in my Markdown?**
A: Yes, images referenced by public HTTP/HTTPS URLs will be embedded. Data URIs (base64) also work. Local file paths do not work in the cloud environment.

**Q: Can I use HTML in my Markdown?**
A: Yes, inline HTML is supported by `marked`. You can use `<div>`, `<span>`, `<table>`, custom styles, etc.

**Q: Why is my page count 1 even for long documents?**
A: The page count is estimated from the PDF structure. It may occasionally under-count for complex layouts. The file size and visual output are always accurate.

**Q: Can I add headers and footers?**
A: Not yet supported in the current version. This is planned for a future update.

**Q: What if I need custom CSS?**
A: The current version uses built-in themes. Custom CSS injection is planned for a future version.

**Q: Does it support Mermaid diagrams or LaTeX math?**
A: Not in the current version. These require additional rendering libraries and are under consideration for future releases.

***

### Related tools

- [HTML to PDF Converter](https://apify.com/automation-lab/) — Convert raw HTML to PDF
- [Base64 Converter](https://apify.com/automation-lab/base64-converter) — Encode/decode Base64 strings
- [Broken Link Checker](https://apify.com/automation-lab/broken-link-checker) — Find broken links across your website
- [Accessibility Checker](https://apify.com/automation-lab/accessibility-checker) — Audit web pages for accessibility issues

***

### Support

If you encounter any issues or have feature requests, please use the [Apify community forum](https://community.apify.com/) or open an issue on the actor page.

Built and maintained by [automation-lab](https://apify.com/automation-lab).

# Actor input Schema

## `markdown` (type: `string`):

The Markdown text to convert to PDF. Supports headings, lists, code blocks, tables, bold, italic, links, and all standard Markdown syntax.

## `theme` (type: `string`):

Visual theme for the generated PDF. 'github' mirrors GitHub's Markdown style, 'clean' is ideal for documentation, 'minimal' strips styling for maximum readability.

## `pageSize` (type: `string`):

Paper size for the PDF. A4 is standard internationally, Letter is common in North America, Legal is used for legal documents.

## `margins` (type: `boolean`):

Add standard page margins (1 cm top/bottom, 1.5 cm left/right) to the PDF. Disable for edge-to-edge layouts or banner-style documents.

## Actor input object example

````json
{
  "markdown": "# My Document\n\nThis is a **bold** statement and this is _italic_ text.\n\n## Features\n\n- Supports **Markdown** syntax\n- Multiple themes available\n- Generates print-ready PDFs\n\n## Code Example\n\n```javascript\nconst greeting = 'Hello, World!';\nconsole.log(greeting);\n```\n\n## Data Table\n\n| Name | Role | Status |\n|------|------|--------|\n| Alice | Developer | Active |\n| Bob | Designer | Active |\n| Carol | Manager | Active |\n\n## Summary\n\nThis document was generated by the **Markdown to PDF Converter** actor on [Apify](https://apify.com). It supports all standard Markdown features including:\n\n1. Headings (H1–H6)\n2. Lists and nested lists\n3. Code blocks with syntax hints\n4. Tables\n5. Links and images\n6. Blockquotes\n\n> This is a blockquote — great for callouts and notes.\n\nEnjoy your PDF!",
  "theme": "github",
  "pageSize": "A4",
  "margins": true
}
````

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

````javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "markdown": `# My Document

This is a **bold** statement and this is _italic_ text.

## Features

- Supports **Markdown** syntax
- Multiple themes available
- Generates print-ready PDFs

## Code Example

```javascript
const greeting = 'Hello, World!';
console.log(greeting);
````

## Data Table

| Name | Role | Status |
|------|------|--------|
| Alice | Developer | Active |
| Bob | Designer | Active |
| Carol | Manager | Active |

## Summary

This document was generated by the **Markdown to PDF Converter** actor on [Apify](https://apify.com). It supports all standard Markdown features including:

1. Headings (H1–H6)
2. Lists and nested lists
3. Code blocks with syntax hints
4. Tables
5. Links and images
6. Blockquotes

> This is a blockquote — great for callouts and notes.

Enjoy your PDF!\`
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/markdown-to-pdf").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

````

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "markdown": """# My Document

This is a **bold** statement and this is _italic_ text.

## Features

- Supports **Markdown** syntax
- Multiple themes available
- Generates print-ready PDFs

## Code Example

```javascript
const greeting = 'Hello, World!';
console.log(greeting);
````

## Data Table

| Name | Role | Status |
|------|------|--------|
| Alice | Developer | Active |
| Bob | Designer | Active |
| Carol | Manager | Active |

## Summary

This document was generated by the **Markdown to PDF Converter** actor on [Apify](https://apify.com). It supports all standard Markdown features including:

1. Headings (H1–H6)
2. Lists and nested lists
3. Code blocks with syntax hints
4. Tables
5. Links and images
6. Blockquotes

> This is a blockquote — great for callouts and notes.

Enjoy your PDF!""" }

# Run the Actor and wait for it to finish

run = client.actor("automation-lab/markdown-to-pdf").call(run\_input=run\_input)

# Fetch and print Actor results from the run's dataset (if there are any)

print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run\["defaultDatasetId"])
for item in client.dataset(run\["defaultDatasetId"]).iterate\_items():
print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

````

## CLI example

```bash
echo '{
  "markdown": "# My Document\\n\\nThis is a **bold** statement and this is _italic_ text.\\n\\n## Features\\n\\n- Supports **Markdown** syntax\\n- Multiple themes available\\n- Generates print-ready PDFs\\n\\n## Code Example\\n\\n```javascript\\nconst greeting = '\''Hello, World!'\'';\\nconsole.log(greeting);\\n```\\n\\n## Data Table\\n\\n| Name | Role | Status |\\n|------|------|--------|\\n| Alice | Developer | Active |\\n| Bob | Designer | Active |\\n| Carol | Manager | Active |\\n\\n## Summary\\n\\nThis document was generated by the **Markdown to PDF Converter** actor on [Apify](https://apify.com). It supports all standard Markdown features including:\\n\\n1. Headings (H1–H6)\\n2. Lists and nested lists\\n3. Code blocks with syntax hints\\n4. Tables\\n5. Links and images\\n6. Blockquotes\\n\\n> This is a blockquote — great for callouts and notes.\\n\\nEnjoy your PDF!"
}' |
apify call automation-lab/markdown-to-pdf --silent --output-dataset

````

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/markdown-to-pdf",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Markdown to PDF Converter",
        "description": "Convert Markdown documents to beautifully formatted PDFs using three themes: GitHub, clean docs, and minimal. Supports tables, code blocks, images, and syntax highlighting. API-first with ready-made examples for Node.js, Python, and cURL. Ideal for automated report and documentation generation.",
        "version": "0.1",
        "x-build-id": "gQ5pTnaqQabUWJPXE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~markdown-to-pdf/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-markdown-to-pdf",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/automation-lab~markdown-to-pdf/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-markdown-to-pdf",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/automation-lab~markdown-to-pdf/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-markdown-to-pdf",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "markdown"
                ],
                "properties": {
                    "markdown": {
                        "title": "Markdown content",
                        "type": "string",
                        "description": "The Markdown text to convert to PDF. Supports headings, lists, code blocks, tables, bold, italic, links, and all standard Markdown syntax."
                    },
                    "theme": {
                        "title": "Theme",
                        "enum": [
                            "github",
                            "clean",
                            "minimal"
                        ],
                        "type": "string",
                        "description": "Visual theme for the generated PDF. 'github' mirrors GitHub's Markdown style, 'clean' is ideal for documentation, 'minimal' strips styling for maximum readability.",
                        "default": "github"
                    },
                    "pageSize": {
                        "title": "Page size",
                        "enum": [
                            "A4",
                            "Letter",
                            "Legal"
                        ],
                        "type": "string",
                        "description": "Paper size for the PDF. A4 is standard internationally, Letter is common in North America, Legal is used for legal documents.",
                        "default": "A4"
                    },
                    "margins": {
                        "title": "Include page margins",
                        "type": "boolean",
                        "description": "Add standard page margins (1 cm top/bottom, 1.5 cm left/right) to the PDF. Disable for edge-to-edge layouts or banner-style documents.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
