{
  "openapi": "3.0.1",
  "info": {
    "title": "Profanity Filter API: 26 Languages, Leetspeak, Allowlist",
    "description": "Find and mask bad words in comments, reviews and chat in 26 languages. Catches sh1t, f u c k, fuuuck and f*ck without flagging Password or Scunthorpe. Mask, replace, remove or flag. Bulk runs or an instant API, PurgoMalum compatible.",
    "version": "1.0",
    "x-build-id": "t29vEiBINoddnOznn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blueberry_rainstorm~profanity-filter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blueberry_rainstorm-profanity-filter",
        "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/blueberry_rainstorm~profanity-filter/runs": {
      "post": {
        "operationId": "runs-sync-blueberry_rainstorm-profanity-filter",
        "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/blueberry_rainstorm~profanity-filter/run-sync": {
      "post": {
        "operationId": "run-sync-blueberry_rainstorm-profanity-filter",
        "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 to check",
            "type": "array",
            "description": "Comments, reviews, chat messages, usernames or any text. One output row per text. You can also pass objects like {\"id\": \"c-1\", \"text\": \"...\"} through the API.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or clean a dataset",
            "type": "string",
            "description": "ID of an Apify dataset to check, e.g. the reviews from an App Store or Google Play reviews scraper run. Each item is copied to the output with a cleaned text field, hasProfanity and matches."
          },
          "textField": {
            "title": "Text field in the dataset",
            "type": "string",
            "description": "Which field of each dataset item holds the text (dots for nested fields, e.g. review.text). The cleaned text goes in <field>Clean.",
            "default": "text"
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "auto = English plus the languages of any non-Latin script found in the text (Russian, Arabic, Persian, Chinese, Japanese, Korean, Hindi, Thai). Add Latin-script languages yourself (es, fr, de, it, pt, nl, pl, tr, sv, ...) or use all. Codes: ar cs da de en eo es fa fi fil fr hi hu it ja kab ko nl no pl pt ru sv th tr zh.",
            "default": [
              "auto"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to do with bad words",
            "enum": [
              "mask",
              "mask-keep-first",
              "replace",
              "remove",
              "flag"
            ],
            "type": "string",
            "description": "mask: f*** -> ****. mask-keep-first: f***. replace: [censored]. remove: delete the word. flag: leave the text as it is and only report.",
            "default": "mask"
          },
          "maskChar": {
            "title": "Mask character",
            "type": "string",
            "description": "One character used by the mask modes.",
            "default": "*"
          },
          "replacement": {
            "title": "Replacement text",
            "type": "string",
            "description": "Used by the replace mode.",
            "default": "[censored]"
          },
          "strictness": {
            "title": "Strictness",
            "enum": [
              "standard",
              "strict"
            ],
            "type": "string",
            "description": "standard: swearing, slurs and explicit sexual slang. strict: also mild words (damn, crap, hell, bloody) and clinical or everyday terms (sexual, penis, sucks, nude), for children's apps.",
            "default": "standard"
          },
          "detectObfuscation": {
            "title": "Catch disguised words",
            "type": "boolean",
            "description": "Leetspeak (sh1t, $hit), spaced letters (f u c k), stretched letters (fuuuck), self-censored words (f*ck) and look-alike letters from other alphabets.",
            "default": true
          },
          "blockWords": {
            "title": "Extra words to block",
            "type": "array",
            "description": "Your own words. End a word with * to block every word that starts with it (frak* blocks frakking).",
            "items": {
              "type": "string"
            }
          },
          "allowWords": {
            "title": "Words to allow",
            "type": "array",
            "description": "Words that are never flagged, e.g. a brand, a place or a surname.",
            "items": {
              "type": "string"
            }
          },
          "onlyFlagged": {
            "title": "Output only texts with profanity",
            "type": "boolean",
            "description": "Every checked text is still charged.",
            "default": false
          },
          "maxTexts": {
            "title": "Max texts",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit of texts checked in one run.",
            "default": 100000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}