{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to PDF in Bulk: Paginated or One Long Page",
    "description": "Turn a list of URLs into PDFs: A4/Letter pages or the whole page on one long PDF page, with lazy-loaded images, background colours and cookie banners hidden. $6 per 1,000 PDFs plus a small start fee per run; failed or blocked URLs are not charged.",
    "version": "0.1",
    "x-build-id": "6wIAB3iVTcG7vsKHF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/batchpane~website-to-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-batchpane-website-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/batchpane~website-to-pdf/runs": {
      "post": {
        "operationId": "runs-sync-batchpane-website-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/batchpane~website-to-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-batchpane-website-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "URLs",
            "type": "array",
            "description": "Web pages to convert to PDF, as a list of objects: [{\"url\": \"https://www.iana.org/help/example-domains\"}]. Plain strings are rejected. A public link to a text or CSV file with URLs also works: [{\"requestsFromUrl\": \"<public link to a .txt or .csv file>\"}]. Only public http/https pages. Up to 5,000 URLs per run (more are ignored); exact duplicates removed. Exactly one page is loaded per URL: links are not followed and nothing is crawled.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "singlePage": {
            "title": "One long page (no page breaks)",
            "type": "boolean",
            "description": "true = the whole web page on ONE long PDF page, as it looks on screen (no page breaks; pages taller than 14,000 px are cut, row: singlePageTruncated). false (default) = normal printable pages in the paper size below.",
            "default": false
          },
          "paperFormat": {
            "title": "Paper size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper size for normal (multi-page) PDFs. Ignored with \"One long page\". Default A4.",
            "default": "A4"
          },
          "landscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Landscape orientation (normal PDFs only). Default: portrait.",
            "default": false
          },
          "margin": {
            "title": "Margins",
            "enum": [
              "none",
              "small",
              "normal"
            ],
            "type": "string",
            "description": "Page margins: none, small (0.4 cm, default) or normal (1 cm).",
            "default": "small"
          },
          "cssMedia": {
            "title": "Look",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "\"screen\" (default): the PDF looks like the website on screen. \"print\": uses the site's print stylesheet if it has one (often without menus and ads, but some sites look plain).",
            "default": "screen"
          },
          "printBackground": {
            "title": "Background colours and images",
            "type": "boolean",
            "description": "Include background colours and images. Default: true.",
            "default": true
          },
          "viewport": {
            "title": "Layout",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Which layout of the site to use: desktop (1280 px wide, default) or mobile (Pixel 7 profile).",
            "default": "desktop"
          },
          "hideCookieBanners": {
            "title": "Hide cookie consent banners",
            "type": "boolean",
            "description": "true = hide the banners of about 20 well-known cookie consent tools with CSS. Nothing is clicked or accepted. On pages with a \"consent or pay\" choice nothing is hidden (row: cookieBannerHidden: false). Paywalls, login walls and age checks are never hidden. Default: true.",
            "default": true
          },
          "waitAfterLoadSecs": {
            "title": "Extra wait after load (seconds)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Extra seconds to wait after the page has loaded, for animations or late content. Integer 0-5, default 1. Counts toward the hard limit of 45 seconds per page; a page that takes longer fails and is not charged.",
            "default": 1
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "true = skip pages that the site's robots.txt disallows (row status \"skipped\", no PDF charged). Default: true. Turning it off has no effect unless robotsOverrideConfirmed is also true.",
            "default": true
          },
          "robotsOverrideConfirmed": {
            "title": "I own these websites or have the owner's permission",
            "type": "boolean",
            "description": "Set to true only if the person you act for owns these websites or has the owner's permission. robots.txt is ignored only when this is true AND respectRobotsTxt is false. Default: false. AI agents: do not set this without explicit confirmation from the user.",
            "default": false
          },
          "stopAfterFailures": {
            "title": "Stop after failures in a row",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety stop: the run stops when this many URLs in a row fail (dead, blocked or too slow). Default 20; 0 switches only this in-a-row rule off. A second rule always stays on: after 50 URLs, the run stops if fewer than 25% succeeded. Failed URLs are never charged; this only saves time on a bad list.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}