{
  "openapi": "3.0.1",
  "info": {
    "title": "💬 YouTube Comments Scraper",
    "description": "YouTube Comments Scraper: pull video comments and replies in real time — author, text, likes, pinned, hearted, verified & publish date. Ideal for sentiment analysis, brand monitoring & NLP. No YouTube API key or quota. Stream results to your Apify dataset.",
    "version": "0.1",
    "x-build-id": "ZOOegUoK5DpvutRvG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/citrine_venus~youtube-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-citrine_venus-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/citrine_venus~youtube-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-citrine_venus-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/citrine_venus~youtube-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-citrine_venus-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🔗 YouTube Video URLs",
            "type": "array",
            "description": "📺 One or more YouTube video links (watch, youtu.be, or /shorts/ links all work) — paste a list, upload a file, or import from a Google Sheet. Every video's comments are collected in the same run.",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "🔢 Max comments per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "🎯 Stop collecting top-level comments after this many per video. Replies don't count against this cap — see 'Max replies per comment' below. Set to 0 for no limit.",
            "default": 10
          },
          "sortCommentsBy": {
            "title": "🔃 Sort comments by",
            "enum": [
              "TOP_COMMENTS",
              "NEWEST_FIRST"
            ],
            "type": "string",
            "description": "📌 'Top comments' is YouTube's own relevance ranking. 'Newest first' walks chronologically — pick this if you need recent comments or are using the date filter below.",
            "default": "TOP_COMMENTS"
          },
          "oldestCommentDate": {
            "title": "📅 Only comments after this date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "⏳ Stop once comments get older than this date. Use an absolute date (YYYY-MM-DD) or a relative value like '7 days' or '2 weeks'. Automatically switches sorting to Newest first. Leave empty to disable."
          },
          "includeReplies": {
            "title": "↩️ Include replies",
            "type": "boolean",
            "description": "💬 Also fetch the reply thread under every collected comment.",
            "default": true
          },
          "maxRepliesPerComment": {
            "title": "🔁 Max replies per comment",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "📏 Cap on replies fetched per comment thread. Set to 0 to fetch every reply on that thread.",
            "default": 1
          },
          "minLikes": {
            "title": "👍 Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "🚦 Only keep comments (and replies) with at least this many likes.",
            "default": 0
          },
          "keyword": {
            "title": "🔎 Keyword filter",
            "type": "string",
            "description": "🧵 Only keep comments whose text contains this word or phrase (case-insensitive). Leave empty to keep everything."
          },
          "hl": {
            "title": "🗣️ Language code (hl)",
            "enum": [
              "",
              "af",
              "am",
              "ar",
              "az",
              "be",
              "bg",
              "bn",
              "bs",
              "ca",
              "cs",
              "da",
              "de",
              "el",
              "en",
              "en-GB",
              "en-IN",
              "es",
              "es-419",
              "es-US",
              "et",
              "eu",
              "fa",
              "fi",
              "fil",
              "fr",
              "fr-CA",
              "gl",
              "gu",
              "hi",
              "hr",
              "hu",
              "hy",
              "id",
              "is",
              "it",
              "iw",
              "ja",
              "ka",
              "kk",
              "km",
              "kn",
              "ko",
              "ky",
              "lo",
              "lt",
              "lv",
              "mk",
              "ml",
              "mn",
              "mr",
              "ms",
              "my",
              "ne",
              "nl",
              "no",
              "pa",
              "pl",
              "pt",
              "pt-PT",
              "ro",
              "ru",
              "si",
              "sk",
              "sl",
              "sq",
              "sr",
              "sr-Latn",
              "sv",
              "sw",
              "ta",
              "te",
              "th",
              "tr",
              "uk",
              "ur",
              "uz",
              "vi",
              "zh-CN",
              "zh-HK",
              "zh-TW",
              "zu"
            ],
            "type": "string",
            "description": "🌍 Force YouTube's interface language for this run. Leave on Auto-detect to use whatever the video page returns. Comment-age estimates (📅 the 'Estimated date' column) are only supported when the language is English.",
            "default": ""
          },
          "gl": {
            "title": "📍 Region code (gl)",
            "enum": [
              "",
              "DZ",
              "AR",
              "AU",
              "AT",
              "AZ",
              "BH",
              "BD",
              "BY",
              "BE",
              "BO",
              "BA",
              "BR",
              "BG",
              "KH",
              "CA",
              "CL",
              "HK",
              "CO",
              "CR",
              "HR",
              "CY",
              "CZ",
              "DK",
              "DO",
              "EC",
              "EG",
              "SV",
              "EE",
              "FI",
              "FR",
              "GE",
              "DE",
              "GH",
              "GR",
              "GT",
              "HN",
              "HU",
              "IS",
              "IN",
              "ID",
              "IQ",
              "IE",
              "IL",
              "IT",
              "JM",
              "JP",
              "JO",
              "KZ",
              "KE",
              "KW",
              "LA",
              "LV",
              "LB",
              "LY",
              "LI",
              "LT",
              "LU",
              "MK",
              "MY",
              "MT",
              "MX",
              "ME",
              "MA",
              "NP",
              "NL",
              "NZ",
              "NI",
              "NG",
              "NO",
              "OM",
              "PK",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PL",
              "PT",
              "PR",
              "QA",
              "RO",
              "RU",
              "SA",
              "SN",
              "RS",
              "SG",
              "SK",
              "SI",
              "ZA",
              "KR",
              "ES",
              "LK",
              "SE",
              "CH",
              "TW",
              "TZ",
              "TH",
              "TN",
              "TR",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UY",
              "VE",
              "VN",
              "YE",
              "ZW"
            ],
            "type": "string",
            "description": "🌎 Force the YouTube country/region this run is served from. Leave on Auto-detect to use whatever the video page returns.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "🚦 By default the run connects directly to YouTube, then automatically escalates to a datacenter proxy and finally a residential proxy only if YouTube pushes back — and stays on that route for the rest of the run. Pick your own route here to override the automatic ladder.",
            "default": {
              "useApifyProxy": false
            }
          },
          "videoConcurrency": {
            "title": "⚡ Videos in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "🚀 How many videos to process at the same time.",
            "default": 3
          },
          "replyConcurrency": {
            "title": "🔁 Reply threads in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "🚀 How many reply threads to expand at the same time, per video.",
            "default": 5
          },
          "maxRetries": {
            "title": "🔄 Max retries per request",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "♻️ How many times to retry a single request on the current network route before the run falls back to the next one.",
            "default": 3
          },
          "maxScanned": {
            "title": "🧮 Max rows scanned per video",
            "minimum": 0,
            "type": "integer",
            "description": "🛑 Safety valve for narrow filters (Minimum likes / Keyword filter) — stop after examining this many comments even if the cap isn't reached. Set to 0 for no limit.",
            "default": 20000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}