{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Scraper 💬 Replies, Likes & Author Data",
    "description": "Extract every comment and reply from any YouTube video: text, like counts, reply counts, timestamps, and author details including verified and creator badges. Sort by top or newest. Super fast, super accurate. No cookies, no login, no API key.",
    "version": "0.1",
    "x-build-id": "adwjyZctMJSSWtRdD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gatherworks~youtube-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gatherworks-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/gatherworks~youtube-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-gatherworks-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/gatherworks~youtube-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-gatherworks-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": {
          "videoUrls": {
            "title": "YouTube video URLs",
            "type": "array",
            "description": "Video links or IDs. Accepts watch URLs, youtu.be links, Shorts URLs and bare 11-character IDs.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Same as the field above, under the name other YouTube comment Actors use. Paste an existing input straight in - a list of plain URL strings or of <code>{\"url\": \"...\"}</code> objects are both accepted. Combined with any videos listed above.",
            "default": []
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stops each video once this many comments have been collected. This is your main cost control."
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Set above 0 to also collect replies. Each reply is billed as an add-on. Leave at 0 to collect top-level comments only."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Which comments to collect first. <b>Top</b> is YouTube's own ranking; <b>Newest</b> starts from the most recent. Also accepted as <code>sort</code> or <code>sortCommentsBy</code>."
          },
          "sort": {
            "title": "Sort by (alias)",
            "type": "string",
            "description": "Alias for the field above, under the name other Actors use. Accepts <code>top</code>, <code>latest</code> or <code>newest</code>."
          },
          "sortCommentsBy": {
            "title": "Sort by (alias)",
            "type": "string",
            "description": "Alias for the field above, under the name other Actors use."
          },
          "filter": {
            "title": "Filter",
            "type": "object",
            "description": "Only keep comments matching these conditions. Rows that do not match are not returned and are not charged for. Example: <code>{\"likeCount\": {\"gte\": 100}, \"text\": {\"contains\": \"great\"}, \"authorIsVerified\": true}</code>. Operators: eq, ne, gt, gte, lt, lte, contains, notContains, startsWith, endsWith, matches, in, notIn, exists, before, after."
          },
          "maxScanned": {
            "title": "Maximum comments to search",
            "minimum": 100,
            "type": "integer",
            "description": "Only applies when a filter is set. How many comments to look at per video before stopping. Defaults to 20x the comment limit. Searching further takes longer but costs no more."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter language code used for comment ordering and relative timestamps.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code. Affects which comments YouTube surfaces first.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional proxy settings. Leave as they are unless you have a reason to change them."
          },
          "concurrency": {
            "title": "Concurrent videos",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos to process at once. Raise it for a large list, lower it if you prefer a steadier run.",
            "default": 5
          },
          "maxItems": {
            "title": "Maximum number of items on output",
            "minimum": 1,
            "type": "integer",
            "description": "Alias for the maximum comments field, under the name other Actors use. Whichever of the two is set lower wins."
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Alias used by other Actors. Turning this on collects reply threads; the numeric field above gives you finer control over how many."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}