{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments Scraper — Replies, Shorts & Creator Hearts",
    "description": "Scrape YouTube comments and replies from videos, Shorts, channels or search. Export text, likes, creator hearts, pins and author data to CSV, Excel or JSON. Filter by keyword, date or likes, detect language and monitor unseen comments. No YouTube API key. $1/1K on Free; $0.60/1K on Gold+.",
    "version": "1.0",
    "x-build-id": "xFWPdrhTGG6EKNGV6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/valev-lab~youtube-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-valev-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/valev-lab~youtube-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-valev-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/valev-lab~youtube-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-valev-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": "Videos, Shorts or channels",
            "type": "array",
            "description": "Paste video or Shorts URLs, channel URLs/handles or video IDs. Start with the prefilled sample, then replace it with your own YouTube sources.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchQueries": {
            "title": "Video search queries",
            "type": "array",
            "description": "Find videos by topic or product name and collect their comments. Each query uses the top video-only search results, up to maxVideosPerSearch.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxVideosPerChannel": {
            "title": "Latest videos per channel",
            "minimum": 1,
            "type": "integer",
            "description": "Latest public uploads from the shared channel Videos tab.",
            "default": 10
          },
          "maxVideosPerSearch": {
            "title": "Top videos per search",
            "minimum": 1,
            "type": "integer",
            "description": "Top unique video results per query.",
            "default": 10
          },
          "maxCommentsPerVideo": {
            "title": "Comments and replies per video",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum delivered matching comments and replies combined per video. Default: 100; the Console sample uses 4. Set 0 to follow all available continuations, subject to budget and timeout.",
            "default": 100
          },
          "sortBy": {
            "title": "Comment order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Use YouTube server sorting. Replies retain YouTube reply order.",
            "default": "top"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Traverse reply continuations, including replies whose parent is filtered out.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum unique replies inspected per parent. 0 follows all replies; the per-video delivery cap still applies.",
            "default": 100
          },
          "detectLanguage": {
            "title": "Detect comment language",
            "type": "boolean",
            "description": "Add a language label without an API call. Codes include eng (English) and bul (Bulgarian); short or uncertain text may return und.",
            "default": true
          },
          "keywords": {
            "title": "Comment keywords",
            "type": "array",
            "description": "Keep comments containing any of these phrases, ignoring case. Filters can require more pages to fill a result limit.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "dateFrom": {
            "title": "Comments published from (UTC)",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD. Relative publication times are approximate."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only return comments with at least this many likes. Abbreviated counts are rounded.",
            "default": 0
          },
          "creatorInteractionOnly": {
            "title": "Creator hearts or pinned only",
            "type": "boolean",
            "description": "Keep comments explicitly hearted or pinned by the creator.",
            "default": false
          },
          "monitorMode": {
            "title": "Only previously unseen comments",
            "type": "boolean",
            "description": "Keep successfully delivered comment IDs per video in a named store; reuse the name on later runs.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{0,62}$",
            "type": "string",
            "description": "Named persistent KeyValueStore. Use one per workflow and avoid overlapping runs.",
            "default": "youtube-comments-scraper-monitor"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Datacenter first, residential fallback per failed request. Explicit direct/custom/residential choices are respected.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}