{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Scraper",
    "description": "Get and export public YouTube comments and replies from video URLs or IDs. Choose Top or Newest order, set result limits, and download the table as JSON, CSV, or Excel. No YouTube API key or account is needed.",
    "version": "0.1",
    "x-build-id": "Oo0DBxdJ9AYnJKRd9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~youtube-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-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/cliqtomedia~youtube-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-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/cliqtomedia~youtube-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "YouTube video URLs or IDs",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "Add 1–50 public videos. Use an 11-character video ID or a supported HTTPS watch, youtu.be, Shorts, or live video URL. Duplicate videos are processed once.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "TOP",
              "NEWEST"
            ],
            "type": "string",
            "description": "Choose the order shown by YouTube. A pinned comment can appear before other comments in either order.",
            "default": "TOP"
          },
          "maxComments": {
            "title": "Maximum total results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most comments and replies to save across all videos in this run. Both types count toward this number and the price. The Actor automatically selects safe request, time, concurrency, and connection settings for this limit. Runs requesting 4,000–10,000 results use Residential US proxy; smaller runs use a direct connection.",
            "default": 100
          },
          "maxTopLevelCommentsPerVideo": {
            "title": "Top-level comments for each video",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most top-level comments to save for one video. Replies do not count here, but all saved rows still count toward Maximum total results. Leave 10,000 if you do not need a smaller limit for each video.",
            "default": 10000
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Turn this on to get replies after top-level comments. Replies need more requests and count toward the total results and price.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Replies for each top-level comment",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "The most replies to save for one top-level comment. Set 0 to save no replies.",
            "default": 50
          },
          "maxRequestsPerVideo": {
            "title": "Maximum requests for each video",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Managed safety ceiling for one video. The visual Input form keeps the release-tested value automatically.",
            "default": 600
          },
          "maxTotalRequests": {
            "title": "Maximum requests for the run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Managed safety ceiling for the whole run. The visual Input form keeps the release-tested value automatically.",
            "default": 2000
          },
          "concurrency": {
            "title": "Videos processed at once",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Managed concurrency. The Actor processes one video at a time for predictable pagination and proxy use.",
            "default": 1
          },
          "maxRunSeconds": {
            "title": "Maximum run time",
            "minimum": 30,
            "maximum": 1800,
            "type": "integer",
            "description": "Managed run-time ceiling. The Actor keeps the release-tested 1,800-second limit and reserves time to save its report.",
            "default": 1800
          },
          "proxyConfiguration": {
            "title": "Connection settings",
            "required": [
              "useApifyProxy"
            ],
            "type": "object",
            "description": "Managed automatically from Maximum total results. Runs below 4,000 use direct access; runs from 4,000 through 10,000 use the release-tested Residential US route. This hidden legacy field remains accepted for API compatibility.",
            "properties": {
              "useApifyProxy": {
                "title": "Use Apify Proxy",
                "description": "Leave this off for lower-cost ordinary runs. Enable it with RESIDENTIAL and country US for the release-tested long 10,000-result route.",
                "type": "boolean"
              },
              "apifyProxyGroups": {
                "title": "Apify Proxy group",
                "description": "Only RESIDENTIAL is accepted. It is the tested route for long 10,000-result pagination.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "apifyProxyCountry": {
                "title": "Proxy country code",
                "description": "Optional two-letter country code in uppercase, for example US.",
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "additionalProperties": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}