{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF PII & Secret Redactor",
    "description": "Privately upload, detect, and permanently redact PII, payment details, tokens, and API secrets from text-based PDFs. No public source link, storage picker, broad account permission, or AI key required.",
    "version": "1.0",
    "x-build-id": "67vUyBz6ag7GaNHOU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/craigtechservicesllc~pdf-pii-secret-redactor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-craigtechservicesllc-pdf-pii-secret-redactor",
        "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/craigtechservicesllc~pdf-pii-secret-redactor/runs": {
      "post": {
        "operationId": "runs-sync-craigtechservicesllc-pdf-pii-secret-redactor",
        "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/craigtechservicesllc~pdf-pii-secret-redactor/run-sync": {
      "post": {
        "operationId": "run-sync-craigtechservicesllc-pdf-pii-secret-redactor",
        "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": {
          "mode": {
            "title": "How will you provide PDFs?",
            "enum": [
              "secure_upload",
              "url_batch"
            ],
            "type": "string",
            "description": "Secure browser upload is recommended. After starting the run, open Live View, choose PDFs from your computer, process them, and save the results. The run ends automatically after the final save. URL/API batch mode is intended for automations using authorized public or signed URLs.",
            "default": "secure_upload"
          },
          "documents": {
            "title": "PDF URLs",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Used only when Advanced URL/API batch mode is selected. Supply authorized public or signed PDF URLs with optional output names and document-specific passwords. Private networks, URL credentials, and non-PDF responses are blocked.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "title": "PDF URL",
                  "type": "string",
                  "description": "Public HTTP or HTTPS URL of the PDF to process.",
                  "pattern": "^https?:\\/\\/.+"
                },
                "name": {
                  "title": "Output name",
                  "type": "string",
                  "description": "Optional short name used for the generated output files.",
                  "maxLength": 100
                },
                "password": {
                  "title": "PDF password",
                  "type": "string",
                  "description": "Optional password for an encrypted PDF. Do not reuse a sensitive account password."
                }
              },
              "additionalProperties": false
            }
          },
          "action": {
            "title": "Action",
            "enum": [
              "redact",
              "scan"
            ],
            "type": "string",
            "description": "Default for URL/API runs and the initial Live View form. Redact creates a cleaned PDF; Scan only returns a findings report.",
            "default": "redact"
          },
          "detectors": {
            "title": "Detectors",
            "uniqueItems": true,
            "type": "array",
            "description": "Choose the deterministic detectors to run.",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "phone",
                "ssn",
                "credit_card",
                "iban",
                "ipv4",
                "jwt",
                "aws_access_key",
                "api_secret"
              ]
            },
            "default": [
              "email",
              "phone",
              "ssn",
              "credit_card",
              "iban",
              "ipv4",
              "jwt",
              "aws_access_key",
              "api_secret"
            ]
          },
          "customTerms": {
            "title": "Custom exact terms",
            "maxItems": 100,
            "type": "array",
            "description": "Optional literal names, case numbers, project codes, or other exact text to remove. Regular expressions are not accepted.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "default": []
          },
          "customTermsCaseSensitive": {
            "title": "Custom terms are case-sensitive",
            "type": "boolean",
            "description": "Match custom exact terms using capitalization exactly as entered.",
            "default": false
          },
          "labelMode": {
            "title": "Redaction label",
            "enum": [
              "type",
              "none"
            ],
            "type": "string",
            "description": "Choose whether redaction boxes show the detected data type or remain plain black.",
            "default": "type"
          },
          "removeMetadata": {
            "title": "Remove PDF metadata",
            "type": "boolean",
            "description": "Clear title, author, subject, keywords, and similar document metadata in redact mode.",
            "default": true
          },
          "stripAttachments": {
            "title": "Remove embedded attachments",
            "type": "boolean",
            "description": "Embedded files are not scanned. Remove them from redacted output by default.",
            "default": true
          },
          "maxFileSizeMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Reject any input PDF larger than this many megabytes.",
            "default": 25
          },
          "maxPagesPerDocument": {
            "title": "Maximum pages per document",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Reject any input PDF containing more than this number of pages.",
            "default": 500
          },
          "downloadTimeoutSeconds": {
            "title": "Download timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time allowed to download each input PDF.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}