{
  "openapi": "3.0.1",
  "info": {
    "title": "URL to PDF",
    "description": "Convert webpages, dashboards, invoices, and authenticated app screens into clean PDFs with advanced controls. Supports JavaScript waits, cookies, headers, print settings, PDF/A, PDF/UA, watermarks, attachments, and post-processing. Ideal for reports, archives, and automation workflows.",
    "version": "0.0",
    "x-build-id": "5FtJrEAqR4UGkrQJd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reinventingai~url-to-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reinventingai-url-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/reinventingai~url-to-pdf/runs": {
      "post": {
        "operationId": "runs-sync-reinventingai-url-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/reinventingai~url-to-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-reinventingai-url-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": {
          "url": {
            "title": "Single URL",
            "type": "string",
            "description": "A single public or authenticated URL to convert into PDF."
          },
          "urls": {
            "title": "Multiple URLs",
            "type": "array",
            "description": "Optional list of URLs to convert in sequence.",
            "items": {
              "type": "string"
            }
          },
          "outputFilename": {
            "title": "Base output filename",
            "type": "string",
            "description": "Optional base filename without extension. If multiple URLs are provided, the actor appends -1, -2, etc."
          },
          "paperWidth": {
            "title": "Paper width",
            "type": "string",
            "description": "Optional paper width like 8.5in, 21cm, or 595pt."
          },
          "paperHeight": {
            "title": "Paper height",
            "type": "string",
            "description": "Optional paper height like 11in, 29.7cm, or 842pt."
          },
          "marginTop": {
            "title": "Top margin",
            "type": "string",
            "description": "Optional top margin like 0.39in or 1cm."
          },
          "marginBottom": {
            "title": "Bottom margin",
            "type": "string",
            "description": "Optional bottom margin like 0.39in or 1cm."
          },
          "marginLeft": {
            "title": "Left margin",
            "type": "string",
            "description": "Optional left margin like 0.39in or 1cm."
          },
          "marginRight": {
            "title": "Right margin",
            "type": "string",
            "description": "Optional right margin like 0.39in or 1cm."
          },
          "landscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Render in landscape orientation.",
            "default": false
          },
          "scale": {
            "title": "Scale",
            "type": "number",
            "description": "Optional Chromium scale factor, for example 1 or 0.9.",
            "default": 1
          },
          "singlePage": {
            "title": "Single page",
            "type": "boolean",
            "description": "Fit the entire output into one very long page.",
            "default": false
          },
          "preferCssPageSize": {
            "title": "Prefer CSS @page size",
            "type": "boolean",
            "description": "Use page sizes defined in CSS instead of API page size fields.",
            "default": false
          },
          "printBackground": {
            "title": "Print background",
            "type": "boolean",
            "description": "Include background images and colors from the page.",
            "default": false
          },
          "omitBackground": {
            "title": "Omit white background",
            "type": "boolean",
            "description": "Hide Chromium's default white background for transparent output where supported.",
            "default": false
          },
          "emulatedMediaType": {
            "title": "Emulated media type",
            "enum": [
              "print",
              "screen"
            ],
            "type": "string",
            "description": "Optional CSS media type to emulate.",
            "default": "print"
          },
          "emulatedMediaFeatures": {
            "title": "Emulated media features JSON",
            "type": "string",
            "description": "Optional JSON array like [{\"name\":\"prefers-color-scheme\",\"value\":\"dark\"}]."
          },
          "waitDelay": {
            "title": "Wait delay",
            "type": "string",
            "description": "Optional fixed wait like 5s before rendering."
          },
          "waitForExpression": {
            "title": "Wait for expression",
            "type": "string",
            "description": "Optional JavaScript expression that must evaluate true before rendering."
          },
          "waitForSelector": {
            "title": "Wait for selector",
            "type": "string",
            "description": "Optional CSS selector that must appear before rendering."
          },
          "cookies": {
            "title": "Cookies JSON",
            "type": "string",
            "description": "Optional JSON array of cookie objects for authenticated pages."
          },
          "extraHttpHeaders": {
            "title": "Extra HTTP headers JSON",
            "type": "string",
            "description": "Optional JSON object of request headers, including scoped values with ;scope=regex if needed."
          },
          "userAgent": {
            "title": "User agent",
            "type": "string",
            "description": "Optional custom User-Agent string."
          },
          "failOnHttpStatusCodes": {
            "title": "Fail on main-page status codes JSON",
            "type": "string",
            "description": "Optional JSON array like [499,599] to fail on matching main page responses."
          },
          "failOnResourceHttpStatusCodes": {
            "title": "Fail on resource status codes JSON",
            "type": "string",
            "description": "Optional JSON array like [499,599] to fail when page resources return matching codes."
          },
          "ignoreResourceHttpStatusDomains": {
            "title": "Ignore resource domains JSON",
            "type": "string",
            "description": "Optional JSON array of hostnames excluded from resource status code checks."
          },
          "skipNetworkIdleEvent": {
            "title": "Skip network idle event",
            "type": "boolean",
            "description": "Leave enabled to avoid waiting for zero open connections for 500ms.",
            "default": true
          },
          "skipNetworkAlmostIdleEvent": {
            "title": "Skip network almost-idle event",
            "type": "boolean",
            "description": "Leave enabled to avoid waiting for two or fewer open connections for 500ms.",
            "default": true
          },
          "failOnResourceLoadingFailed": {
            "title": "Fail on resource loading failed",
            "type": "boolean",
            "description": "Fail the conversion if images, CSS, or scripts hit network loading errors.",
            "default": false
          },
          "failOnConsoleExceptions": {
            "title": "Fail on console exceptions",
            "type": "boolean",
            "description": "Fail the conversion when Chromium console exceptions occur.",
            "default": false
          },
          "headerHtml": {
            "title": "Header HTML",
            "type": "string",
            "description": "Optional full HTML document used as header.html."
          },
          "footerHtml": {
            "title": "Footer HTML",
            "type": "string",
            "description": "Optional full HTML document used as footer.html."
          },
          "generateDocumentOutline": {
            "title": "Generate document outline",
            "type": "boolean",
            "description": "Embed PDF bookmarks based on heading tags.",
            "default": false
          },
          "metadata": {
            "title": "PDF metadata JSON",
            "type": "string",
            "description": "Optional XMP metadata JSON object, for example {\"Title\":\"My PDF\",\"Author\":\"Mark\"}."
          },
          "embeds": {
            "title": "Embeds JSON",
            "type": "string",
            "description": "Optional JSON array of attachment objects like [{\"url\":\"https://.../invoice.xml\",\"fileName\":\"invoice.xml\",\"mimeType\":\"text/xml\",\"relationship\":\"Alternative\"}]."
          },
          "flatten": {
            "title": "Flatten form fields",
            "type": "boolean",
            "description": "Convert interactive form fields into static page content.",
            "default": false
          },
          "nativePageRanges": {
            "title": "Native page ranges",
            "type": "string",
            "description": "Optional Chromium print ranges like 1-3,5,8-10."
          },
          "splitMode": {
            "title": "Split mode",
            "enum": [
              "intervals",
              "pages"
            ],
            "type": "string",
            "description": "Optional post-processing split mode."
          },
          "splitSpan": {
            "title": "Split span",
            "type": "string",
            "description": "Split chunk size or explicit page ranges, depending on splitMode."
          },
          "splitUnify": {
            "title": "Split unify",
            "type": "boolean",
            "description": "When splitMode is pages, return one PDF instead of separate files per page range.",
            "default": false
          },
          "watermarkSource": {
            "title": "Watermark source",
            "enum": [
              "text",
              "image",
              "pdf"
            ],
            "type": "string",
            "description": "Optional watermark source type."
          },
          "watermarkExpression": {
            "title": "Watermark text or expression",
            "type": "string",
            "description": "Watermark text when watermarkSource is text. For image/pdf sources, provide watermarkFileUrl instead."
          },
          "watermarkPages": {
            "title": "Watermark pages",
            "type": "string",
            "description": "Optional page ranges to watermark, like 1-3 or 5."
          },
          "watermarkOptions": {
            "title": "Watermark options JSON",
            "type": "string",
            "description": "Optional JSON object for watermark options like opacity, color, rotation, font, points, scale, or offset."
          },
          "watermarkFileUrl": {
            "title": "Watermark file URL",
            "type": "string",
            "description": "Required when watermarkSource is image or pdf. Public URL of the watermark asset."
          },
          "watermarkFileName": {
            "title": "Watermark file name",
            "type": "string",
            "description": "Optional filename override for the uploaded watermark asset."
          },
          "stampSource": {
            "title": "Stamp source",
            "enum": [
              "text",
              "image",
              "pdf"
            ],
            "type": "string",
            "description": "Optional stamp source type."
          },
          "stampExpression": {
            "title": "Stamp text or expression",
            "type": "string",
            "description": "Stamp text when stampSource is text. For image/pdf sources, provide stampFileUrl instead."
          },
          "stampPages": {
            "title": "Stamp pages",
            "type": "string",
            "description": "Optional page ranges to stamp, like 1-3 or 5."
          },
          "stampOptions": {
            "title": "Stamp options JSON",
            "type": "string",
            "description": "Optional JSON object for stamp options like opacity, color, rotation, font, points, scale, or offset."
          },
          "stampFileUrl": {
            "title": "Stamp file URL",
            "type": "string",
            "description": "Required when stampSource is image or pdf. Public URL of the stamp asset."
          },
          "stampFileName": {
            "title": "Stamp file name",
            "type": "string",
            "description": "Optional filename override for the uploaded stamp asset."
          },
          "rotateAngle": {
            "title": "Rotate angle",
            "enum": [
              "90",
              "180",
              "270"
            ],
            "type": "string",
            "description": "Optional rotation angle applied during PDF post-processing."
          },
          "rotatePages": {
            "title": "Rotate pages",
            "type": "string",
            "description": "Optional page ranges to rotate, like 1-2 or 5."
          },
          "generateTaggedPdf": {
            "title": "Generate tagged PDF",
            "type": "boolean",
            "description": "Embed Chromium logical structure tags for accessibility.",
            "default": false
          },
          "pdfa": {
            "title": "PDF/A mode",
            "enum": [
              "PDF/A-1b",
              "PDF/A-2b",
              "PDF/A-3b"
            ],
            "type": "string",
            "description": "Optional archival PDF/A conversion mode."
          },
          "pdfua": {
            "title": "PDF/UA",
            "type": "boolean",
            "description": "Enable PDF/UA accessibility post-processing.",
            "default": false
          },
          "userPassword": {
            "title": "User password",
            "type": "string",
            "description": "Optional password required to open the PDF."
          },
          "ownerPassword": {
            "title": "Owner password",
            "type": "string",
            "description": "Optional password used to control PDF editing and permissions."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}