{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Scraper — Replies & New Comment Monitor",
    "description": "The comments of YouTube videos — or of a channel's latest videos — newest or top first, with replies, likes, pins, creator hearts, the author's channel and the video's exact comment count. Monitoring mode brings only new comments and carries a burst over to the next run. No login, no API key.",
    "version": "0.1",
    "x-build-id": "ymhb4VUGSyQqwWlnd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~youtube-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-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/foxlabs~youtube-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-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/foxlabs~youtube-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-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",
            "type": "array",
            "description": "YouTube video URLs or video IDs, one per line. Every form of the address works: watch?v=…, youtu.be/…, /shorts/…, /live/…, or the 11-character ID alone.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels — the comments of their latest videos",
            "type": "array",
            "description": "Channel URLs, @handles or channel IDs, one per line. For each channel the Actor takes its latest videos (as many as \"Latest videos per channel\" says) and reads their comments. Use it alone or together with \"Videos\".",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerChannel": {
            "title": "Latest videos per channel and kind",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "For channel lines: how many of the channel's latest videos to read comments from. Videos for the channel's paying members are left out.",
            "default": 5
          },
          "videoTypes": {
            "title": "Kinds of video (channel lines)",
            "type": "array",
            "description": "For channel lines: which of the channel's lists to take the latest videos from.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "live"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "maxCommentsPerVideo": {
            "title": "Maximum rows per video",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many rows to deliver for each video — comments and replies together. YouTube gives 20 comments a request, so 1,000 comments of one video take about 50 requests.",
            "default": 100
          },
          "maxComments": {
            "title": "Maximum rows in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops when this many rows have been delivered. You are charged only for delivered rows.",
            "default": 1000
          },
          "sort": {
            "title": "Order",
            "enum": [
              "newest",
              "top"
            ],
            "type": "string",
            "description": "YouTube's own two orders. \"Newest first\" lists every comment of a video, latest first — the order for a complete set and for monitoring. \"Top comments\" is what YouTube's page shows first: its own selection of the most engaging comments, which for a video with thousands of comments is only a part of them (the run's status message says when a Top list ended short). A pinned comment stands first in both.",
            "default": "newest"
          },
          "maxRepliesPerComment": {
            "title": "Replies per comment",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "0 (the default) reads no replies. With a number, each comment is followed in its video's rows by up to that many of its replies, oldest first — the only order YouTube gives replies in. Reading replies takes one or more extra requests per comment that has them.",
            "default": 0
          },
          "publishedWithinDays": {
            "title": "Published within the last N days (optional)",
            "minimum": 1,
            "maximum": 36500,
            "type": "integer",
            "description": "Only comments from the last N days. YouTube shows a comment's age rounded down (\"3 weeks ago\" is 21 to 27 days), so a comment is left out only when it is certainly older. With \"Newest first\" the Actor stops reading a video once it reaches older comments."
          },
          "minLikes": {
            "title": "Minimum likes (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Only comments and replies with at least this many likes. Leave empty (or 0) for no minimum."
          },
          "textContains": {
            "title": "Text contains (optional)",
            "type": "array",
            "description": "Only comments and replies whose text contains at least one of these words or phrases, one per line (up to 100). Upper and lower case are the same. A word is found anywhere in the text, also inside a longer word: \"cost\" also finds \"Costco\".",
            "items": {
              "type": "string"
            }
          },
          "onlyNewComments": {
            "title": "Only comments not delivered before",
            "type": "boolean",
            "description": "Remember delivered comments under the list name below and skip them in later runs. Schedule the same videos or channels with \"Newest first\" and no filters, and every run brings what was written since: the first run reads each video's first comments up to \"Maximum rows per video\", every later run its new comments, and both deliver oldest first. When more is due than a run delivers — more new comments than that number, replies that count as rows, a run that stopped early — the rest is not lost: the next run delivers it, and the status message says how many comments are waiting. With a filter or \"Top comments\", every run looks at each video's first comments up to that number and delivers what the list has not delivered; what falls outside that window is not seen.",
            "default": false
          },
          "listName": {
            "title": "List name",
            "type": "string",
            "description": "Name of the memory used by \"Only comments not delivered before\". Use a different name for each project. Letters, digits and hyphens (a hyphen not first or last), up to 40 characters; capitals are read as lower case.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Nothing to change for normal use: requests go out directly, and a kind of request YouTube refuses (or keeps leaving unanswered) is moved to Apify Proxy by the Actor itself. Turn a proxy on here only if you want every request to use it.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}