{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Scraper · Channel Comments Monitor + Replies",
    "description": "Comments and replies of YouTube videos, Shorts or a channel's newest uploads. Newest first, only-new mode for monitoring, keyword, likes and date filters, pinned and hearted flags, exact video comment count. No login, no API key, no quota.",
    "version": "0.1",
    "x-build-id": "E2vqgk2ZuJiTeslhf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thequietstack~youtube-comments-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thequietstack-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/thequietstack~youtube-comments-monitor/runs": {
      "post": {
        "operationId": "runs-sync-thequietstack-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/thequietstack~youtube-comments-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-thequietstack-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": {
          "videos": {
            "title": "Videos",
            "type": "array",
            "description": "Video or Short links (watch?v=, youtu.be/, /shorts/, /live/) or bare 11-character video IDs.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels (their newest uploads)",
            "type": "array",
            "description": "Channel handles or links: @veritasium, https://www.youtube.com/@NASA, youtube.com/channel/UC..., or a bare channel ID. The Actor takes the newest videos of each channel (see 'Videos per channel') and collects their comments.",
            "items": {
              "type": "string"
            }
          },
          "channelTab": {
            "title": "Which uploads of a channel",
            "enum": [
              "videos",
              "shorts",
              "streams"
            ],
            "type": "string",
            "description": "Only used for channels.",
            "default": "videos"
          },
          "videosPerChannel": {
            "title": "Videos per channel",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many of the newest uploads of each channel are read.",
            "default": 5
          },
          "skipVideosOlderThanDays": {
            "title": "Skip channel videos older than N days",
            "minimum": 1,
            "type": "integer",
            "description": "Only for the Videos and Live tabs (Shorts show no date in the list). Uses the age YouTube shows in the list."
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "newest",
              "top"
            ],
            "type": "string",
            "description": "YouTube's own two orders. The pinned comment always comes first in both.",
            "default": "newest"
          },
          "onlyNewComments": {
            "title": "Only new comments since the last run",
            "type": "boolean",
            "description": "For scheduled monitoring: remembers the comments already seen per video in a named key-value store and stops at the first known one on the next run. You are not charged again for comments you already have. Forces 'Newest first'.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store for the only-new memory. Use a different name per monitoring task.",
            "default": "youtube-comments-monitor-state"
          },
          "commentsFrom": {
            "title": "Comments posted from (inclusive)",
            "type": "string",
            "description": "YYYY-MM-DD (UTC). YouTube only shows relative times ('3 days ago'); a comment is dropped only when it is certainly older. With 'Newest first' paging stops there."
          },
          "commentsNewerThanDays": {
            "title": "Or: comments of the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Shortcut for 'Comments posted from' = today minus N days. Ignored when that field is set."
          },
          "textKeywords": {
            "title": "Comment must contain",
            "type": "array",
            "description": "Keep only comments containing these words (case-insensitive), e.g. price, link, where to buy. Misses are not charged.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Whether a comment needs one or all of the words.",
            "default": "any"
          },
          "excludeTextKeywords": {
            "title": "Comment must NOT contain",
            "type": "array",
            "description": "Drop comments containing any of these words. Not charged.",
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop comments with fewer likes. Rounded counts ('1.2K') are compared by their highest possible value, so nothing that could qualify is dropped."
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Adds the replies of every written comment right after it (recordType 'reply', parentCommentId set). Each reply is charged like a comment.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Only with 'Include replies'.",
            "default": 20
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "type": "integer",
            "description": "Top-level comments written per video (replies not counted here).",
            "default": 100
          },
          "maxComments": {
            "title": "Hard limit: total rows in this run",
            "minimum": 1,
            "type": "integer",
            "description": "Comments plus replies. The run stops cleanly at this number. You are never charged for more rows than this.",
            "default": 1000
          },
          "maxPagesPerVideo": {
            "title": "Max comment pages per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap. One page holds about 20 comments.",
            "default": 50
          },
          "requestDelaySecs": {
            "title": "Pause between requests (seconds)",
            "minimum": 0.5,
            "maximum": 30,
            "type": "number",
            "description": "Requests go out one at a time with this pause. Lower is not allowed: this Actor crawls politely.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}