{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Scraper - Comments, Replies, Likes & Authors",
    "description": "For sentiment analysis, community management, creator research and AI training sets: comments and replies from any public video with text, author, channel, likes, replies and age. YouTube rounds like counts before sending them - 42 of 68 measured on 2026-09-08 - so every row says if it is exact.",
    "version": "0.1",
    "x-build-id": "CVfSXJRUB80XZrDxK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~youtube-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-youtube-comments-scraper",
        "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/neverempty~youtube-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-youtube-comments-scraper",
        "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/neverempty~youtube-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-youtube-comments-scraper",
        "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",
        "required": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "YouTube video URLs",
            "type": "array",
            "description": "The videos whose comments you want. Paste watch URLs, youtu.be links, Shorts links or plain 11-character video IDs. Anything that is not a YouTube video is reported as its own free row instead of being silently dropped.",
            "default": [
              "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerVideo": {
            "title": "Comments per video",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many top-level comments to collect for each video. YouTube serves about 20 per page and this Actor follows the pages for you. It never promises the whole comment section: measured on 8 September 2026, a video with 2.4 million comments gave 500 comments over 25 requests with a continuation token still pending.",
            "default": 100
          },
          "maxRecords": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The most rows this run may return and charge for. When the limit cuts the result, rows are taken evenly from every video, so no video disappears completely, and a free row says what was left out.",
            "default": 200
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "top is YouTube's own default order. newest gives the most recent comments first. Note that a pinned comment stays first in both orders - every row says whether it is pinned.",
            "default": "top"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also fetch the replies under each comment. Replies come back as their own rows, carrying the id of the comment they answer in parentCommentId and replyLevel 1. This costs one extra request per comment that has replies.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Replies per comment",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many replies to keep for each comment when replies are turned on. YouTube serves about 10 replies per request, so this Actor follows the pages until it has this many - each extra 10 costs one more request, which your Maximum requests still caps.",
            "default": 10
          },
          "keywords": {
            "title": "Only comments containing these words",
            "type": "array",
            "description": "Case-insensitive words matched against the comment text and the author name. YouTube has no server-side comment search, so the filter is applied to the comments this run read - widen \"Comments per video\" if you are looking for something rare. Leave empty to keep everything.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Match words",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any keeps a comment that contains at least one of the words. all requires every word.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Skip comments containing these words",
            "type": "array",
            "description": "Case-insensitive. A comment that contains any of these words is dropped before it is charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only comments with at least this many likes. YouTube rounds like counts above about a thousand to \"4.2K\", so for those the filter uses the rounded number - each row tells you with likeCountIsExact whether its number is exact. 0 turns the filter off.",
            "default": 0
          },
          "onlyVerifiedAuthors": {
            "title": "Only verified authors",
            "type": "boolean",
            "description": "Keep only comments written by channels YouTube marks as verified.",
            "default": false
          },
          "postedWithinDays": {
            "title": "Posted within days",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only comments posted within this many days. YouTube never returns a real date for a comment - only text like \"5 days ago\" - so this uses the approximate number of days derived from that text, and comments whose text cannot be read are kept rather than thrown away. 0 turns the filter off.",
            "default": 0
          },
          "monitoringMode": {
            "title": "Only new comments since the last run",
            "type": "boolean",
            "description": "Remembers the comment ids this Actor has already returned to you and returns only the ones it has not. Run it on a schedule to watch a video and pay only for what is actually new. Set Sort by to newest when you use this: YouTube reshuffles the top order between runs, so with top you also receive old comments that simply moved into view - measured on 8 September 2026, a second run returned 5 such comments.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Forget what was already returned",
            "type": "boolean",
            "description": "Clears that memory once, so the next monitoring run treats every comment as new.",
            "default": false
          },
          "maxRequests": {
            "title": "Maximum requests",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "A hard ceiling on how many requests this run may make to YouTube, counting video pages, comment pages and reply pages. It protects you from a runaway run on a video with millions of comments.",
            "default": 60
          },
          "useProxy": {
            "title": "Use a proxy if YouTube blocks the run",
            "type": "boolean",
            "description": "Off by default: measured on 8 September 2026, a plain connection returned HTTP 200. Turn it on only if you see bot-check rows - it is slower and costs proxy traffic.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}