{
  "openapi": "3.0.1",
  "info": {
    "title": "HTML to PDF Converter: URL to PDF & Website to PDF",
    "description": "HTML to PDF and URL to PDF converter: turn a website, webpage or raw HTML into a PDF with headless Chrome. For invoices, receipts, reports and page archives. A4 or Letter, margins, page numbers, wait for selector, print or screen CSS. Private IPs blocked. $0.005 per PDF.",
    "version": "1.0",
    "x-build-id": "OYzQQzhQFdpzWI8Y1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ferrolark~html-to-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ferrolark-html-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/ferrolark~html-to-pdf/runs": {
      "post": {
        "operationId": "runs-sync-ferrolark-html-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/ferrolark~html-to-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-ferrolark-html-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",
        "properties": {
          "urls": {
            "title": "URLs",
            "type": "array",
            "description": "Public web pages to print. Up to 20 documents per run (URLs + HTML).",
            "items": {
              "type": "string"
            }
          },
          "html": {
            "title": "HTML",
            "type": "string",
            "description": "Raw HTML to print (up to 5 MB). Relative links do not resolve; use absolute URLs or inline data: images."
          },
          "files": {
            "title": "HTML files as base64 (optional)",
            "type": "array",
            "description": "For n8n/Make binaries: a list of {\"base64\": \"...\", \"name\": \"invoice.html\"} objects."
          },
          "outputFileName": {
            "title": "Output file name (for HTML)",
            "type": "string",
            "description": "URL outputs are named after the URL.",
            "default": "document.pdf"
          },
          "paperFormat": {
            "title": "Paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Page size of the PDF.",
            "default": "A4"
          },
          "landscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Landscape orientation.",
            "default": false
          },
          "marginMm": {
            "title": "Margin (mm)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Same margin on all sides.",
            "default": 10
          },
          "pageNumbers": {
            "title": "Page numbers in the footer",
            "type": "boolean",
            "description": "Adds 'page / total' at the bottom.",
            "default": false
          },
          "printBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Keep background colors and images.",
            "default": true
          },
          "scale": {
            "title": "Scale",
            "type": "string",
            "description": "0.1 to 2. Lower values fit more content per page.",
            "default": "1"
          },
          "pageRanges": {
            "title": "Page ranges",
            "type": "string",
            "description": "Optional, for example 1-3, 5. Empty = all pages."
          },
          "preferCssPageSize": {
            "title": "Use the page's CSS @page size",
            "type": "boolean",
            "description": "Let the document's own @page rule decide the size.",
            "default": false
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "networkidle",
              "load",
              "domcontentloaded"
            ],
            "type": "string",
            "description": "networkidle waits for the page to go quiet (best for JS sites); if it never does, the page is printed as loaded.",
            "default": "networkidle"
          },
          "waitForSelector": {
            "title": "Wait for CSS selector",
            "type": "string",
            "description": "Optional, for example #invoice or .chart-ready."
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Wait this long after loading, for animations.",
            "default": 0
          },
          "media": {
            "title": "CSS media",
            "enum": [
              "print",
              "screen"
            ],
            "type": "string",
            "description": "print uses the site's print stylesheet; screen looks like the browser.",
            "default": "print"
          },
          "javascript": {
            "title": "Run JavaScript",
            "type": "boolean",
            "description": "Turn off for static HTML to make rendering faster and safer.",
            "default": true
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 320,
            "maximum": 2560,
            "type": "integer",
            "description": "Affects responsive layouts.",
            "default": 1280
          },
          "timeoutSecs": {
            "title": "Timeout per page (s)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Page load timeout.",
            "default": 60
          },
          "createShareableUrl": {
            "title": "Create shareable download links",
            "type": "boolean",
            "description": "Also return signed links that work without an Apify token. Anyone with a link can download that file.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}