{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Watermark & Unlock PDF Tool: Stamp, Remove Password",
    "description": "PDF watermark and unlock PDF tool: add a text or image watermark to PDFs in bulk, add page numbers, remove a PDF password you supply, or set a password. Direct download links. Cannot crack passwords.",
    "version": "0.1",
    "x-build-id": "SDG4MkXshe8ghy9qC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~pdf-watermark-unlock/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-pdf-watermark-unlock",
        "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/data-done-right~pdf-watermark-unlock/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-pdf-watermark-unlock",
        "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/data-done-right~pdf-watermark-unlock/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-pdf-watermark-unlock",
        "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "PDF URLs",
            "type": "array",
            "description": "Direct links to the PDF files to process, one per line. Example: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf. Dropbox and Google Drive share links are converted to direct downloads. Each file is handled separately; a bad link never stops the run.",
            "items": {
              "type": "string"
            }
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "watermark",
              "unlock",
              "protect"
            ],
            "type": "string",
            "description": "watermark = stamp text, image or page numbers. unlock = remove a password you supply (or owner restrictions on files that open without a password). protect = set a password. This tool cannot crack or guess passwords; use it only on files you own or may modify.",
            "default": "watermark"
          },
          "watermarkText": {
            "title": "Watermark text",
            "type": "string",
            "description": "Text stamped on every selected page, for example CONFIDENTIAL, DRAFT or Do not copy. Leave empty to use only an image or page numbers. Used by the watermark operation.",
            "default": "CONFIDENTIAL"
          },
          "watermarkImageUrl": {
            "title": "Watermark image URL (optional)",
            "type": "string",
            "description": "Link to a PNG, JPG or WebP logo to stamp (up to 10 MB). Transparent PNGs work well. Example: https://example.com/logo.png. It is combined with the text if both are set."
          },
          "position": {
            "title": "Position",
            "enum": [
              "center",
              "tiled",
              "top-left",
              "top-center",
              "top-right",
              "middle-left",
              "middle-right",
              "bottom-left",
              "bottom-center",
              "bottom-right"
            ],
            "type": "string",
            "description": "Where the watermark goes. Tiled repeats it across the whole page.",
            "default": "center"
          },
          "fontSize": {
            "title": "Font size",
            "minimum": 4,
            "maximum": 400,
            "type": "integer",
            "description": "Text size in points. Long text is shrunk automatically to fit the page. Example: 48.",
            "default": 48
          },
          "font": {
            "title": "Font",
            "enum": [
              "helvetica",
              "helvetica-bold",
              "times",
              "times-bold",
              "courier",
              "courier-bold",
              "unicode"
            ],
            "type": "string",
            "description": "Font for the watermark text. Non-Latin text (Cyrillic, Greek) switches to the Unicode font automatically.",
            "default": "helvetica-bold"
          },
          "color": {
            "title": "Color",
            "type": "string",
            "description": "Watermark color as a hex code. Examples: #808080 (gray), #FF0000 (red).",
            "default": "#808080"
          },
          "opacity": {
            "title": "Opacity",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "From 0 (invisible) to 1 (solid). Example: 0.3 keeps the page readable.",
            "default": 0.3
          },
          "rotation": {
            "title": "Rotation (degrees)",
            "minimum": -360,
            "maximum": 360,
            "type": "integer",
            "description": "Counter-clockwise angle. 45 is the classic diagonal, 0 is horizontal.",
            "default": 45
          },
          "imageWidthPercent": {
            "title": "Image width (% of page)",
            "minimum": 2,
            "maximum": 100,
            "type": "integer",
            "description": "Size of the image watermark as a percentage of the page width. Example: 40.",
            "default": 40
          },
          "pageRange": {
            "title": "Page range",
            "type": "string",
            "description": "Pages to stamp. Examples: all, 1-3,5, 2-, odd, even. Pages outside the file are ignored.",
            "default": "all"
          },
          "pageNumbers": {
            "title": "Page numbers (bonus)",
            "enum": [
              "none",
              "footer",
              "header"
            ],
            "type": "string",
            "description": "Add page numbers in the header or footer, on the pages in the page range.",
            "default": "none"
          },
          "pageNumberFormat": {
            "title": "Page number format",
            "type": "string",
            "description": "Text for the page numbers. {page} and {total} are replaced. Example: Page {page} of {total}.",
            "default": "Page {page} of {total}"
          },
          "pageNumberAlign": {
            "title": "Page number alignment",
            "enum": [
              "left",
              "center",
              "right"
            ],
            "type": "string",
            "description": "Horizontal position of the page numbers.",
            "default": "center"
          },
          "password": {
            "title": "PDF password (to open the file)",
            "type": "string",
            "description": "The correct password for a protected PDF. Needed for unlock on files with a user password, and to watermark or protect such files. It is never logged. If you leave it empty, only files that open without a password work. This tool cannot crack passwords."
          },
          "newPassword": {
            "title": "New password (protect)",
            "type": "string",
            "description": "Password to set when the operation is protect. Example: a long passphrase. It is never logged."
          },
          "ownerPassword": {
            "title": "Owner password (protect, optional)",
            "type": "string",
            "description": "Optional separate owner password for protect. If empty, the new password is also the owner password."
          },
          "maxFiles": {
            "title": "Max output files",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on delivered PDFs per run, which also caps your cost. Example: 100.",
            "default": 100
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Files larger than this are skipped with a clear error. Maximum 200. Example: 50.",
            "default": 50
          },
          "maxPagesPerFile": {
            "title": "Max pages per file",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Files with more pages are skipped. Example: 500.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Parallel files",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many PDFs to process at the same time.",
            "default": 3
          },
          "outputStoreName": {
            "title": "Output store name (optional)",
            "type": "string",
            "description": "Save the output PDFs in a named key-value store that you keep, instead of the default store of the run. Example: my-watermarked-pdfs."
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Only needed if a file host blocks Apify IPs. Most PDF links work without it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}