{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Scraper · Comment Replies, No API Key",
    "description": "YouTube comments scraper, no API key, no login: 4,847 comments of 50 videos in 15 s. Each row: text, author with channel ID, likes, reply count, date, creator heart, pinned, verified mark. Top or newest, comment replies, filters, only new, a channel's latest videos, Shorts. CSV, Excel, JSON.",
    "version": "1.0",
    "x-build-id": "UhI0fjzan9ad0lSju"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/instagram-data-api~youtube-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-instagram-data-api-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/instagram-data-api~youtube-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-instagram-data-api-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/instagram-data-api~youtube-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-instagram-data-api-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",
        "properties": {
          "videos": {
            "title": "Videos or Shorts",
            "type": "array",
            "description": "One per line, any mix: a video link (youtube.com/watch?v=…, youtu.be/…), a Short link (youtube.com/shorts/…), a live or embed link, or the 11-character video id. Duplicates are dropped before anything is read; a video that does not exist or has comments turned off is not charged.",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many rows to return for each video, in the order chosen below. Replies count towards it: 100 means 100 rows, comments and replies together. You pay for delivered rows only.",
            "default": 100
          },
          "sort": {
            "title": "Order of comments",
            "enum": [
              "TOP",
              "NEWEST"
            ],
            "type": "string",
            "description": "YouTube's own two orders: «Top comments» (the pinned comment first, then the most liked and discussed) or «Newest first» (the pinned comment, then by time).",
            "default": "TOP"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "On: each comment is followed by its replies (oldest first, as YouTube shows them), each a row of its own with `replyToCid` — the same $1.25 per 1,000 rows on the Starter plan. Off: top-level comments only; `replyCount` still says how many replies each has.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "With «Include replies»: the cap on replies read for one comment. A comment with 900 replies then costs 10 rows, not 900.",
            "default": 10
          },
          "channels": {
            "title": "Channels: comments of their latest videos",
            "type": "array",
            "description": "One per line: a handle (@NASA), a channel link (youtube.com/@NASA, /channel/UC…, /c/name, /user/name) or a channel id (UC…). The run reads the comments of the channel's newest videos; a channel that does not exist is not charged.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerChannel": {
            "title": "Latest videos per channel",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many of the channel's newest videos to read comments from. With «Videos and Shorts» it is this many of each.",
            "default": 5
          },
          "channelContent": {
            "title": "What to take from a channel",
            "enum": [
              "VIDEOS",
              "SHORTS",
              "BOTH"
            ],
            "type": "string",
            "description": "The channel's «Videos» tab, its «Shorts» tab, or both.",
            "default": "VIDEOS"
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only comments with at least this many likes. Likes are the number YouTube shows: exact up to 999, rounded above («1.2K» = 1,200). Comments left out by a filter are not charged."
          },
          "containsText": {
            "title": "Contains text",
            "type": "array",
            "description": "Only comments whose text contains at least one of these words or phrases (one per line, any letter case).",
            "items": {
              "type": "string"
            }
          },
          "onlyCreatorComments": {
            "title": "Only the creator's comments",
            "type": "boolean",
            "description": "Only comments written by the video's own channel. With «Include replies» the replies of each comment are read too, to find the creator's answers under other people's comments (YouTube does not mark which threads he answered) — slower on big videos.",
            "default": false
          },
          "onlyHearted": {
            "title": "Only comments with the creator's heart",
            "type": "boolean",
            "description": "Only comments the video's creator marked with a heart.",
            "default": false
          },
          "onlyPinned": {
            "title": "Only the pinned comment",
            "type": "boolean",
            "description": "Only the comment the creator pinned on top — one row a video, or none.",
            "default": false
          },
          "publishedAfter": {
            "title": "Published on or after",
            "type": "string",
            "description": "Only comments published on or after this day: YYYY-MM-DD, or a period back from today («7 days», «3 months»). YouTube shows a comment's age («3 weeks ago»), so the date is exact to that unit. With «Newest first» the run stops where the comments get older."
          },
          "onlyNew": {
            "title": "Only new since the last run",
            "type": "boolean",
            "description": "Remembers which comments this monitor already delivered for each video (in a key-value store of your account, «youtube-comments-scraper-seen») and returns only comments it has not delivered before. For scheduled runs: a video with nothing new costs nothing. Reads newest first.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "«Only new» memory is kept per monitor name: use different names for tasks that must not share it. Letters, digits, - and _.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Requests at once",
            "minimum": 1,
            "maximum": 64,
            "type": "integer",
            "description": "How many requests run at the same time. The default suits most runs; lower it only if you use your own proxies and they are few.",
            "default": 24
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy's datacenter IPs by default — they are enough for YouTube's comments. If they stop answering in a run, the Actor moves to residential IPs by itself.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}