{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Comment Scraper Pro",
    "description": "Powerful YouTube Comment Scraper for data collection, analytics, and automation. Extracts comments, replies, author info, engagement metrics, and full video metadata in structured JSON or CSV — fast, reliable, and scalable.",
    "version": "2.14",
    "x-build-id": "RkhoAQ4aFgqnuDYbG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~youtube-comment-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-youtube-comment-scraper-pro",
        "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/coregent~youtube-comment-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-coregent-youtube-comment-scraper-pro",
        "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/coregent~youtube-comment-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-youtube-comment-scraper-pro",
        "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": {
          "startUrls": {
            "title": "Start URLs or video IDs",
            "maxItems": 100,
            "type": "array",
            "description": "YouTube videos to scrape comments from. Accepts a full URL (watch, youtu.be, Shorts, embed, or live) OR a bare 11-character video ID (e.g. QJBP2uy8LcU). All forms are normalized automatically. Unrecognized entries are skipped and reported in the run status records.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "channelUrls": {
            "title": "Channels (ID, @handle, channel URL, or video URL)",
            "maxItems": 50,
            "type": "array",
            "description": "Scrape comments across a whole creator's videos. Each entry can be a channel ID (UC…), an @handle, a channel URL (/channel/…, /@handle, /user/…, /c/…), or even a video URL/ID (the channel is derived from that video). The actor discovers each channel's most-recent uploads — up to 'Max Videos per Channel' — and scrapes them in addition to any Start URLs above. Requires the official YouTube Data API.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxVideosPerChannel": {
            "title": "Max Videos per Channel",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many of each channel's most-recent videos to discover and scrape. Applies to every entry in 'Channels' above. Each newly-discovered video is billed once (channel-video-discovered) plus its comments (per result). Videos already listed in Start URLs are not double-counted.",
            "default": 10
          },
          "maxComments": {
            "title": "Maximum Comments per Video",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum rows to collect per video, counting BOTH top-level comments and their replies. Use 'Max Replies per Comment' to limit replies per thread, and 'Max Total Results' to cap a whole batch.",
            "default": 100
          },
          "includeReplies": {
            "title": "Include Comment Replies",
            "type": "boolean",
            "description": "Include replies to comments. Replies count toward your results, so each one is a billable row — reply-heavy videos can multiply cost. Use 'Max Replies per Comment' (Advanced) to bound replies per thread, or turn this off to collect only top-level comments.",
            "default": true
          },
          "commentSortAndFilter": {
            "title": "Sorting and date filter",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Choose comment sorting order. Select 'Top comments' for YouTube's default ranking or 'Newest first' for chronological order (required to use the date filter in 'Advanced Sorting and Filtering' below).",
            "default": "top"
          },
          "maxRepliesPerComment": {
            "title": "Max Replies per Comment",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum replies to collect per comment thread. 0 = unlimited. Lower values favour broader coverage (more distinct threads) and reduce cost on reply-heavy videos. Only applies when 'Include Comment Replies' is on.",
            "default": 0
          },
          "maxTotalResults": {
            "title": "Max Total Results (per run)",
            "minimum": 0,
            "type": "integer",
            "description": "Overall safety cap on total rows (comments + replies) collected across all videos in a run. 0 = unlimited. Use this to bound cost on large batches.",
            "default": 0
          },
          "searchTerms": {
            "title": "Include keywords",
            "type": "array",
            "description": "Only keep comments whose text contains at least one of these keywords (case-insensitive). Leave empty to keep all. Applied per row (each comment and reply is matched independently). Filtering is scan-heavy: the actor reads deeper into a video's comments (within an internal per-video time limit) to fill your result cap with matches, so matched-but-scanned comments consume time/quota.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludeTerms": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop comments whose text contains any of these keywords (case-insensitive). Applied after 'Include keywords'.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep comments with at least this many likes. 0 = no minimum. Combine with keyword filters to surface high-signal comments.",
            "default": 0
          },
          "newestDateFilter": {
            "title": "Date filter (Newest first)",
            "enum": [
              "",
              "1",
              "7",
              "30",
              "90",
              "custom"
            ],
            "type": "string",
            "description": "Filter comments by date. Only applies when 'Sorting and date filter' is set to 'Newest first' (ignored for 'Top comments'). Selecting any option other than 'None' may incur a small additional charge.",
            "default": ""
          },
          "commentsPublishedAfter": {
            "title": "Custom date",
            "type": "string",
            "description": "Only collect comments published after this date. Used when the date filter is set to 'Custom date'.",
            "default": ""
          },
          "detectVerifiedAuthors": {
            "title": "Detect verified authors (paid add-on)",
            "type": "boolean",
            "description": "Populate the 'IsAuthorVerified' field (blue-check) for each comment. Off (default): the field is null (not determined) and there is NO extra charge. On: a secondary data source populates the field and an additional 'detect-verified-authors' event is charged PER COMMENT served by that source (only comments it actually returns are charged — if it returns nothing, you pay nothing). Trade-off: timestamps become approximate in this mode. Leave off for the fastest, fully-free official-API path. NOTE: this option requires a paid Apify plan. On the Free plan it is skipped and you are not charged for it — comments, replies, filters and every other field are unaffected, and IsAuthorVerified is null exactly as when the option is off.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}