{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comment Filter: Spam & Scam Detector",
    "description": "Find spam and scam comments on any YouTube video or channel, with a clear reason for every flag, in 5 languages. No API key needed. On your own channel, it can also hold or remove spam automatically, clean YouTube's own spam folders, approve real fans YouTube wrongly hid, and ban repeat offenders.",
    "version": "0.0",
    "x-build-id": "CngWQEAD3fAwNaNoW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dead00~youtube-comment-filter-spam-scam-detector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dead00-youtube-comment-filter-spam-scam-detector",
        "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/dead00~youtube-comment-filter-spam-scam-detector/runs": {
      "post": {
        "operationId": "runs-sync-dead00-youtube-comment-filter-spam-scam-detector",
        "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/dead00~youtube-comment-filter-spam-scam-detector/run-sync": {
      "post": {
        "operationId": "run-sync-dead00-youtube-comment-filter-spam-scam-detector",
        "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": {
          "targets": {
            "title": "Videos or channels",
            "type": "array",
            "description": "One per line: a video link, a channel link, or an @handle. For channels, the newest videos are scanned. Can be left empty when reviewing YouTube's spam folders.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerChannel": {
            "title": "Videos per channel",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many of a channel's newest videos to scan.",
            "default": 10
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Comments and replies together, per video.",
            "default": 1000
          },
          "commentOrder": {
            "title": "Which comments first",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Scammers mostly reply under top comments, where the most people see them. 'Only new comments' always reads newest first.",
            "default": "top"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also check replies. Many scams hide in replies (\"she helped me too!\").",
            "default": true
          },
          "onlyNewComments": {
            "title": "Only new comments since the last run",
            "type": "boolean",
            "description": "Ideal for a scheduled run: each run checks only comments posted since the previous one.",
            "default": false
          },
          "sensitivity": {
            "title": "Sensitivity",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "How strict spam detection is. Works for English, Hindi (and Hinglish), Spanish, Portuguese and Indonesian.",
            "default": "medium"
          },
          "blockedWords": {
            "title": "Blocked words",
            "type": "array",
            "description": "Always flag comments containing these words or phrases (works through fancy Unicode tricks too).",
            "items": {
              "type": "string"
            }
          },
          "trustedAuthors": {
            "title": "Trusted authors",
            "type": "array",
            "description": "Never flag these people: their @handle, display name or channel ID. Your own comments are never flagged.",
            "items": {
              "type": "string"
            }
          },
          "allowedDomains": {
            "title": "Allowed links",
            "type": "array",
            "description": "Links to these domains are not counted as suspicious, e.g. your own website.",
            "items": {
              "type": "string"
            }
          },
          "outputAllComments": {
            "title": "Output all comments",
            "type": "boolean",
            "description": "Off = only flagged comments are saved. On = every comment and reply, each with its spam score.",
            "default": false
          },
          "apiKey": {
            "title": "Your own YouTube API key (optional)",
            "type": "string",
            "description": "Not needed: scanning works out of the box. On the free Apify plan, the built-in key includes a free allowance of 3 videos and 300 comments in total; adding your own free key (or a paid plan) removes the limit."
          },
          "action": {
            "title": "What to do with flagged comments",
            "enum": [
              "report",
              "hold",
              "reject",
              "reject_ban"
            ],
            "type": "string",
            "description": "Anything other than Report only needs your channel connected below, and works only on your own channel's videos. Hold for review is the safest choice.",
            "default": "report"
          },
          "oauthClientId": {
            "title": "OAuth client ID",
            "type": "string",
            "description": "From your Google Cloud OAuth client (Desktop app type)."
          },
          "oauthClientSecret": {
            "title": "OAuth client secret",
            "type": "string",
            "description": "From the same OAuth client."
          },
          "oauthRefreshToken": {
            "title": "OAuth refresh token",
            "type": "string",
            "description": "Created in Google's OAuth Playground while signed in as the channel owner (scope: youtube.force-ssl)."
          },
          "reviewSpamFolders": {
            "title": "Review YouTube's spam folders",
            "type": "boolean",
            "description": "Also check the comments YouTube already put in 'Likely spam' and 'Held for review' on your channel. Real spam gets the action above. Works even with no videos listed.",
            "default": false
          },
          "approveRealComments": {
            "title": "Approve real comments YouTube wrongly held",
            "type": "boolean",
            "description": "Publish comments in those folders that are clearly clean, so real fans aren't hidden. Borderline comments are never approved.",
            "default": false
          },
          "maxFolderComments": {
            "title": "Max comments per folder",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many comments to review in each spam folder.",
            "default": 500
          },
          "banRepeatOffenders": {
            "title": "Ban repeat offenders",
            "type": "boolean",
            "description": "Ban accounts flagged on 2 or more videos (or 3+ times) in this run, and remove their flagged comments. Repeat offenders are always listed in the results, even when this is off.",
            "default": false
          },
          "memoryName": {
            "title": "Memory name",
            "type": "string",
            "description": "Where 'Only new comments' remembers progress. Use different names for separate channels or projects.",
            "default": "youtube-comment-filter"
          },
          "resetMemory": {
            "title": "Reset memory",
            "type": "boolean",
            "description": "Forget progress for these videos and check all comments again.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}