{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Monitor — New Comments Only",
    "description": "No-login YouTube comments monitor: watch videos, channels or brand keywords and get only new comments — pay only for new ones. Reply trees, newest or top sort, residential proxy fallback, optional YouTube Data API v3 route. No cookies, no login.",
    "version": "0.1",
    "x-build-id": "aY4ZoFbBbkuYS4eVI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/commanding_hotdog~youtube-comments-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-commanding_hotdog-youtube-comments-monitor",
        "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/commanding_hotdog~youtube-comments-monitor/runs": {
      "post": {
        "operationId": "runs-sync-commanding_hotdog-youtube-comments-monitor",
        "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/commanding_hotdog~youtube-comments-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-commanding_hotdog-youtube-comments-monitor",
        "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": {
          "apiKey": {
            "title": "YouTube Data API v3 key (optional)",
            "type": "string",
            "description": "Your own YouTube Data API v3 key. When set, comments are fetched through the official API (1 quota unit per call). Leave empty to use the default InnerTube route (no key, no quota). The key is never stored by the Actor.",
            "default": ""
          },
          "channelUrls": {
            "title": "Channel URLs",
            "type": "array",
            "description": "YouTube channel URLs (@handle, /channel/UC..., /c/name, /user/name) or bare UC... channel IDs. The Actor reads the channel's latest videos and fetches their comments."
          },
          "deduplicate": {
            "title": "Deduplicate within/across runs",
            "type": "boolean",
            "description": "Skip comments already returned in an earlier run even when onlyNew is off.",
            "default": true
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Fetch the two-level reply tree (parentCommentId / replyLevel / rootCommentId).",
            "default": true
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Comment cap per video (1-500). Deep pagination fetches up to this many threads.",
            "default": 100
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Reply cap per top-level comment (0-500). 0 disables reply fetching.",
            "default": 20
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many of the channel's latest videos to monitor (1-20).",
            "default": 5
          },
          "maxVideosPerSearch": {
            "title": "Max videos per search term",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many of the top search results to fetch comments for (1-10).",
            "default": 3
          },
          "onlyNew": {
            "title": "Only new comments (monitor mode)",
            "type": "boolean",
            "description": "Return only comments you have not seen in earlier runs. Seen comments are skipped and never charged. Run daily to monitor a channel or brand.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "full",
              "minimal"
            ],
            "type": "string",
            "description": "full: all fields. minimal: a compact subset (id, author, text, dates, counts, route).",
            "default": "full"
          },
          "proxyMode": {
            "title": "Proxy mode",
            "enum": [
              "auto",
              "none",
              "residential"
            ],
            "type": "string",
            "description": "auto (default): direct connection first, residential proxy fallback if blocked. none: direct only. residential: always use the residential proxy.",
            "default": "auto"
          },
          "searchTerms": {
            "title": "Search terms (brand keywords)",
            "type": "array",
            "description": "Keywords to search on YouTube. The top matching videos are found and their comments are fetched. Video discovery always uses the InnerTube search endpoint; comment fetching follows the selected route."
          },
          "sortBy": {
            "title": "Sort comments by",
            "enum": [
              "newest",
              "top"
            ],
            "type": "string",
            "description": "newest: newest first (best for monitoring). top: top comments first.",
            "default": "newest"
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Key-value store holding the seen-comments state for onlyNew mode. Use a different name per monitored target to keep states separate.",
            "default": "youtube-comments-monitor-state"
          },
          "videoUrls": {
            "title": "Video URLs or IDs",
            "type": "array",
            "description": "YouTube video URLs (watch / youtu.be / shorts / live links) or bare 11-char video IDs. Comments of each video are fetched."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}