{
  "openapi": "3.0.1",
  "info": {
    "title": "URL to PDF Converter - Web Page & HTML to PDF API",
    "description": "URL to PDF converter: web page URLs in, print-quality PDFs out, one row per URL with a direct PDF link and page count. A4, Letter, Legal, A3, landscape, margins, backgrounds, print CSS or one long page. Cookie banners hidden, bulk lists, failures free. $1.80 / 1,000 PDFs.",
    "version": "1.0",
    "x-build-id": "53Vyv3ptvsNfCMSYv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rel8ble~url-to-pdf-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rel8ble-url-to-pdf-converter",
        "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/rel8ble~url-to-pdf-converter/runs": {
      "post": {
        "operationId": "runs-sync-rel8ble-url-to-pdf-converter",
        "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/rel8ble~url-to-pdf-converter/run-sync": {
      "post": {
        "operationId": "run-sync-rel8ble-url-to-pdf-converter",
        "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": "Page URLs",
            "type": "array",
            "description": "Web pages to convert, one per line (1 to 50,000). Bare domains like example.com get https:// added. Duplicates are skipped.",
            "items": {
              "type": "string"
            }
          },
          "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 instead of portrait.",
            "default": false
          },
          "onePage": {
            "title": "One long page (no page breaks)",
            "type": "boolean",
            "description": "Save the whole web page as a single tall PDF page, the width of the viewport. Good for archiving and visual records.",
            "default": false
          },
          "marginMm": {
            "title": "Margin (mm)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Same margin on all four sides, 0-50 mm.",
            "default": 10
          },
          "printBackground": {
            "title": "Print backgrounds",
            "type": "boolean",
            "description": "Keep background colours and images (off = printer-friendly white).",
            "default": true
          },
          "mediaType": {
            "title": "CSS media",
            "enum": [
              "screen",
              "print"
            ],
            "type": "string",
            "description": "Render with the screen or the print stylesheet.",
            "default": "screen"
          },
          "scale": {
            "title": "Scale",
            "type": "string",
            "description": "Zoom of the rendering, 0.1-2 (default 1). Use 0.8 to fit wide pages."
          },
          "headerFooter": {
            "title": "Header and footer",
            "type": "boolean",
            "description": "Add the page title on top and the URL plus 'page n / total' at the bottom of every page.",
            "default": false
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "laptop",
              "fullhd",
              "tablet",
              "mobile"
            ],
            "type": "string",
            "description": "Viewport used to lay out the page before printing (desktop 1280 px wide by default). Mobile gives the phone layout.",
            "default": "desktop"
          },
          "viewportWidth": {
            "title": "Viewport width (px)",
            "minimum": 200,
            "maximum": 3840,
            "type": "integer",
            "description": "Overrides the device width (200-3840)."
          },
          "viewportHeight": {
            "title": "Viewport height (px)",
            "minimum": 200,
            "maximum": 4320,
            "type": "integer",
            "description": "Overrides the device height (200-4320)."
          },
          "waitUntil": {
            "title": "Wait until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When to capture. load (default) and networkidle are waited for at most 10-15 s after the HTML is ready, so one slow ad script never fails a capture.",
            "default": "load"
          },
          "delayMs": {
            "title": "Extra delay (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Wait this long after loading, before the capture (animations, charts). 0-30000.",
            "default": 500
          },
          "waitForSelector": {
            "title": "Wait for CSS selector",
            "type": "string",
            "description": "Optional: wait up to 15 s for this element to appear before capturing (e.g. #chart)."
          },
          "hideCookieBanners": {
            "title": "Hide cookie banners",
            "type": "boolean",
            "description": "Hide common consent popups (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, CookieYes, ...) with CSS. Nothing is clicked or accepted.",
            "default": true
          },
          "hideSelectors": {
            "title": "Hide these elements",
            "type": "array",
            "description": "CSS selectors to hide before capturing, e.g. .chat-widget or #newsletter-popup.",
            "items": {
              "type": "string"
            }
          },
          "darkMode": {
            "title": "Dark mode",
            "type": "boolean",
            "description": "Emulate prefers-color-scheme: dark.",
            "default": false
          },
          "scrollToBottom": {
            "title": "Scroll to load lazy images",
            "type": "boolean",
            "description": "Scroll down first so lazy images load (on by default)."
          },
          "blockMedia": {
            "title": "Block video and audio",
            "type": "boolean",
            "description": "Skip loading video / audio files (faster, poster images stay).",
            "default": false
          },
          "blockTrackers": {
            "title": "Block trackers and ad scripts",
            "type": "boolean",
            "description": "Skip analytics, ad and chat-widget scripts (Google Analytics / Tag Manager, Facebook pixel, Hotjar, Intercom, ...). Faster and cheaper; the page looks the same.",
            "default": true
          },
          "maxResults": {
            "title": "Max PDFs",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many URLs (0 = all).",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages rendered at the same time (1-20). Memory limits it automatically.",
            "default": 5
          },
          "pageTimeoutSecs": {
            "title": "Page timeout (s)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Navigation timeout per page (5-180).",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries per failed URL (0-5). Failed URLs are never charged.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Off by default (direct datacenter connection). Turn on Apify Proxy for geo-specific pages."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}