{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Scraper - Likes, Replies & Dates",
    "description": "YouTube comments scraper: export comments from any video or Short by link or ID - text, likes, reply count, date, video title. Filters, no login.",
    "version": "1.0",
    "x-build-id": "qT4v3zsYUiKfdFEqG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cheapapi~youtube-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cheapapi-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/cheapapi~youtube-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cheapapi-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/cheapapi~youtube-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cheapapi-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": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "Videos",
            "type": "array",
            "description": "YouTube videos to collect comments from - paste as many as you like, one per line (you can paste a whole list copied from a spreadsheet at once; commas and spaces also work). Accepts youtube.com/watch?v=…, youtu.be/…, /shorts/…, /live/… links or the 11-character video ID. Duplicates are removed. Playlist and channel links are not supported: paste the individual video links.",
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 700,
            "type": "integer",
            "description": "How many comments to collect for each video, in YouTube's \"Top comments\" order. Up to 700 per video per run. You pay for comments delivered; a page of 20 that yields fewer than 6 (Gold: 9) comments adds a $0.0018 page-checked fee.",
            "default": 100
          },
          "includeAuthorInfo": {
            "title": "Include commenter details (personal data)",
            "type": "boolean",
            "description": "Off by default. Turn on to add the commenter's name, @handle, channel link and avatar to each comment. The channel ID (authorChannelId) is often empty, because YouTube usually links commenters by @handle; use authorHandle or authorChannelUrl instead. These are personal data: only enable it if you have a lawful reason to process them (e.g. GDPR).",
            "default": false
          },
          "sortBy": {
            "title": "Sort comments by",
            "enum": [
              "top",
              "newest",
              "oldest",
              "most_liked",
              "most_replies"
            ],
            "type": "string",
            "description": "Order of the delivered comments. Top = YouTube's own ranking. The other options re-order the collected comments.",
            "default": "top"
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only comments with at least this many likes. 0 = no filter. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.",
            "default": 0
          },
          "minReplies": {
            "title": "Minimum replies",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only comments with at least this many replies (reply count). 0 = no filter. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.",
            "default": 0
          },
          "keywords": {
            "title": "Only comments containing",
            "type": "array",
            "description": "Only comments that contain at least one of these words or phrases (not case-sensitive). Leave empty for all comments. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.",
            "items": {
              "type": "string"
            }
          },
          "publishedWithinDays": {
            "title": "Only comments from the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Relative date filter: only comments published in the last N days, counted from the start of the run (e.g. 7 = last week, 30 = last 30 days, 365 = last year). 0 = no filter. Works together with the dates below (the stricter start date wins). Approximate, like YouTube's own dates. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee.",
            "default": 0
          },
          "dateFrom": {
            "title": "Comments published from",
            "type": "string",
            "description": "Only comments published on or after this date (YYYY-MM-DD). YouTube shows approximate dates (\"3 weeks ago\"), so the boundary is approximate too. For a rolling window use \"Only comments from the last N days\" instead. Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee."
          },
          "dateTo": {
            "title": "Comments published until",
            "type": "string",
            "description": "Only comments published on or before this date (YYYY-MM-DD). Filters run on the fetched pages: a page where fewer comments pass than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee."
          },
          "onlyNewComments": {
            "title": "Only new comments since the last run",
            "type": "boolean",
            "description": "For scheduled runs: comments already delivered in an earlier run with this option on are skipped and not charged as comments; a page of 20 that yields fewer new comments than its minimum (6 on Free, 9 on Gold) adds a $0.0018 page-checked fee. The comment IDs seen so far are kept per video in a named key-value store in your account (see below). Each run still looks at the top comments up to \"Max comments per video\", so on busy videos a new comment is only found once it ranks among those.",
            "default": false
          },
          "monitoringStoreName": {
            "title": "Monitoring store name",
            "type": "string",
            "description": "Name of the key-value store that remembers which comments were already delivered. Use a different name per project to keep separate histories. Letters, digits and hyphens only.",
            "default": "youtube-comments-monitor"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "The 2-letter ISO 3166 country code YouTube is opened from, for example US (United States), GB (United Kingdom), DE (Germany), FR (France), ES (Spain), IT (Italy), TR (Turkey), BR (Brazil), IN (India), JP (Japan) or CA (Canada). Common English country names such as \"Germany\" also work; an unknown code stops the run with a clear message before anything is charged.",
            "default": "US"
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "Language code, e.g. en, de, fr, es, pt, tr, ja. Affects texts such as \"2 years ago\" (publishedTimeText); comments are always delivered in the language they were written in.",
            "default": "en"
          },
          "operatingSystem": {
            "title": "Operating system",
            "enum": [
              "windows",
              "macos"
            ],
            "type": "string",
            "description": "The desktop operating system YouTube is viewed from. Rarely needs changing.",
            "default": "windows"
          },
          "processingSpeed": {
            "title": "Processing speed",
            "enum": [
              "auto",
              "fast",
              "economy"
            ],
            "type": "string",
            "description": "Fast: results usually within 1–2 minutes. Economy: usually up to ~5 minutes, for large runs (200+ comments). Automatic: fast for normal runs, economy for runs of 1,000+ comments. The price is the same.",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}