{
  "openapi": "3.0.1",
  "info": {
    "title": "PII Redactor for GDPR & LLM Pipelines",
    "description": "Detect, mask or anonymize emails, phones, IBANs, cards, national ID numbers of 22 countries (PESEL, CNP, codice fiscale, DNI, EGN, Steuer-ID, SSN) and API secrets in text, PDF and DOCX. Checksum-validated, no external API.",
    "version": "0.2",
    "x-build-id": "nTEmLjYyOnDzQAINS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/praised_tumbler~pii-redactor-eu-gdpr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-praised_tumbler-pii-redactor-eu-gdpr",
        "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/praised_tumbler~pii-redactor-eu-gdpr/runs": {
      "post": {
        "operationId": "runs-sync-praised_tumbler-pii-redactor-eu-gdpr",
        "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/praised_tumbler~pii-redactor-eu-gdpr/run-sync": {
      "post": {
        "operationId": "run-sync-praised_tumbler-pii-redactor-eu-gdpr",
        "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": {
          "texts": {
            "title": "Texts",
            "type": "array",
            "description": "Plain texts to redact (up to 100 texts of 1,000,000 characters).",
            "default": []
          },
          "urls": {
            "title": "Document URLs",
            "maxItems": 50,
            "type": "array",
            "description": "Public http(s) links to PDF, DOCX, HTML or text files (up to 50). robots.txt is respected. PDFs need a text layer.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "inlineDocuments": {
            "title": "Inline documents (base64)",
            "type": "array",
            "description": "Small files passed directly, e.g. [{\"filename\": \"a.pdf\", \"contentBase64\": \"JVBERi0...\"}]. Maximum 20 files and 8 MB in total.",
            "default": []
          },
          "entities": {
            "title": "What to redact",
            "type": "array",
            "description": "Types of personal data and secrets to find. EU VAT numbers are off by default because company VAT numbers are usually public business data.",
            "items": {
              "type": "string",
              "enum": [
                "EMAIL",
                "PHONE",
                "IBAN",
                "PAYMENT_CARD",
                "BG_EGN",
                "NATIONAL_ID",
                "EU_VAT",
                "IP_ADDRESS",
                "SECRET"
              ],
              "enumTitles": [
                "Email addresses",
                "Phone numbers",
                "IBAN bank accounts (checksum validated)",
                "Payment card numbers (Luhn validated)",
                "Bulgarian personal number EGN (checksum validated)",
                "National ID numbers of 22 countries (PESEL, CNP, codice fiscale, DNI, NIR, Steuer-ID, SSN...)",
                "EU VAT numbers",
                "IP addresses",
                "API keys, tokens and private keys"
              ]
            },
            "default": [
              "EMAIL",
              "PHONE",
              "IBAN",
              "PAYMENT_CARD",
              "BG_EGN",
              "NATIONAL_ID",
              "IP_ADDRESS",
              "SECRET"
            ]
          },
          "customTerms": {
            "title": "Extra terms to redact (names etc.)",
            "maxItems": 200,
            "type": "array",
            "description": "Exact words or phrases to mask wherever they appear, case-insensitive. Use this for names, because the Actor does not detect names automatically.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Replacement style",
            "enum": [
              "placeholder",
              "mask",
              "remove"
            ],
            "type": "string",
            "description": "placeholder = [EMAIL_1] (the same value always gets the same placeholder), mask = block characters, remove = delete.",
            "default": "placeholder"
          },
          "includeDetails": {
            "title": "Return positions of findings",
            "type": "boolean",
            "description": "Adds a `details` list (type, start, end, replacement) without the original values.",
            "default": false
          },
          "includeOriginalValues": {
            "title": "Return restore mapping (originals)",
            "type": "boolean",
            "description": "Adds a `mapping` of placeholder to the original value so the text can be restored after an LLM step. This puts the personal data back into your dataset: use with care. Needs placeholder mode.",
            "default": false
          },
          "removeHeadersFooters": {
            "title": "Remove repeated headers and footers (PDF)",
            "type": "boolean",
            "description": "Drops lines that repeat at the top or bottom of most pages.",
            "default": false
          },
          "maxPagesPerDocument": {
            "title": "Maximum pages per PDF",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Only the first N pages of longer PDFs are processed (and billed).",
            "default": 200
          },
          "maxFileSizeMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Larger files are skipped with an error (not billed).",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}