{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Scraper API – Replies, $0.25/1K, No Login",
    "description": "Scrape YouTube comments and replies from any video or Short, no login or API key. Each row: text, likes, reply count, date, author, pinned, creator heart. Also channels, playlists, search. For sentiment analysis, brand monitoring and AI agents. 1,000 comments free monthly.",
    "version": "0.2",
    "x-build-id": "Yk0ljDxeU2OZanRyn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/k-data-lab~youtube-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-k-data-lab-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/k-data-lab~youtube-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-k-data-lab-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/k-data-lab~youtube-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-k-data-lab-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": {
          "startUrls": {
            "title": "YouTube videos, Shorts, channels or playlists",
            "type": "array",
            "description": "One per line: video, Shorts or live links, youtu.be links, bare 11-character video IDs, channel links or @handles (reads the channel's latest videos), or playlist links. Fill this field, search terms, or both (at least one is required). Examples: https://www.youtube.com/watch?v=dQw4w9WgXcQ, https://www.youtube.com/shorts/aqz-KE-bpKQ, @mkbhd",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms (comments of the top videos)",
            "type": "array",
            "description": "Words to search on YouTube, one per line. Reads the comments of the top videos for each term (see Max videos). Good for brand or product mentions. Example: iphone 17 case review",
            "items": {
              "type": "string"
            }
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stops each video at this many rows (comments plus replies). 0 = every comment YouTube shows. A very popular video can have millions, so set a number or a spending limit.",
            "default": 100
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Top = the order YouTube shows by default. Newest = latest first, best for monitoring. A date limit or a monitor name always uses Newest.",
            "default": "top"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also returns the replies under each comment, as rows with type 'reply' and parentCommentId. Replies cost the same as comments, with no extra per-thread fee.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only with Include replies. 0 = all replies.",
            "default": 20
          },
          "publishedAfter": {
            "title": "Only comments after",
            "type": "string",
            "description": "A date (2026-10-01) or an age (24 hours, 7 days, 2 weeks, 3 months). YouTube shows comment dates as '3 days ago', so the cut-off is as exact as that text. Switches the order to Newest and stops each video at the first older comment."
          },
          "monitorName": {
            "title": "Monitor name (only new comments)",
            "type": "string",
            "description": "Give a scheduled run a name, such as 'my-channel'. Each run then returns and charges only comments that name hasn't returned before. Uses the Newest order. Memory is kept in your own Apify account."
          },
          "keywords": {
            "title": "Only comments containing",
            "type": "array",
            "description": "Keep only comments (and replies) that contain any of these words, case-insensitive. Filtered-out comments are free.",
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only comments with at least this many likes. Filtered-out comments are free.",
            "default": 0
          },
          "maxVideos": {
            "title": "Max videos per channel, playlist or search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "For channels: the latest N videos. For playlists: the first N. For search terms: the top N videos. Pasted video links are always read.",
            "default": 5
          },
          "maxResults": {
            "title": "Max rows in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stops the whole run at this many rows. 0 = no total limit (per-video limits and your spending limit still apply).",
            "default": 0
          },
          "useProxyOnBlock": {
            "title": "Spread requests over Apify Proxy when YouTube slows us down",
            "type": "boolean",
            "description": "Runs start direct. If YouTube starts refusing, the run moves to Apify datacenter proxy sessions. Leave on.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}