{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Comments and Replies via Data API, Your Own Key",
    "description": "YouTube comments and replies through the YouTube Data API v3 with your own API key: text, date, likes, reply counts, per-video summary. Only-new mode, quota tracking, resume. No author names. Not for channels or pages. USD 0.40 per 1,000 comments.",
    "version": "0.1",
    "x-build-id": "mdYQZTUlb642prgbJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bardach_technologies~youtube-comments-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bardach_technologies-youtube-comments-data-api",
        "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/bardach_technologies~youtube-comments-data-api/runs": {
      "post": {
        "operationId": "runs-sync-bardach_technologies-youtube-comments-data-api",
        "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/bardach_technologies~youtube-comments-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-bardach_technologies-youtube-comments-data-api",
        "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": {
          "videos": {
            "title": "Videos (links or ids)",
            "maxItems": 50,
            "type": "array",
            "description": "One video per line: a watch, youtu.be, shorts, live or embed link, or the 11-character video id. Up to 50 videos. Channels, playlists and search pages are not supported.",
            "default": [
              "dQw4w9WgXcQ"
            ],
            "items": {
              "type": "string"
            }
          },
          "apiKey": {
            "title": "Your YouTube Data API key",
            "type": "string",
            "description": "Your own API key (Google Cloud Console, YouTube Data API v3 enabled). Stored as a secret input, sent only to Google, never written to the output or the logs. Do not restrict the key by IP address or referrer: the Actor runs from Apify's servers. Left empty, the run makes no request and writes one free sample row from built-in demo data (sample: true)."
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "On by default. Replies are read too and count towards the maximum below. Threads with more than 5 replies cost one extra quota unit per 100 replies.",
            "default": true
          },
          "maxCommentsPerVideo": {
            "title": "Maximum comments per video",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Comments plus replies written per video, up to 10,000. Default 100. About 1 quota unit per 100 top-level comments.",
            "default": 100
          },
          "order": {
            "title": "Order",
            "enum": [
              "time",
              "relevance"
            ],
            "type": "string",
            "description": "time: newest first (the default; needed for the early stop of only-new runs). relevance: YouTube's top comments first.",
            "default": "time"
          },
          "onlyNew": {
            "title": "Only new since the last run",
            "type": "boolean",
            "description": "Off by default. On: comments already delivered by an earlier run with the same state store name are skipped and not charged, and reading stops at the first page of known comments, which saves quota. Remembered ids are dropped after 30 days, so comments older than that are delivered again.",
            "default": false
          },
          "maxQuotaUnits": {
            "title": "Quota budget (units)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The run never uses more than this many units of your key's daily quota (Google's default is 10,000 per project and day, every call costs 1). When the budget or your quota is used up, the run stops cleanly and keeps what it delivered. Default 500, up to 10,000.",
            "default": 500
          },
          "maxRunSeconds": {
            "title": "Time limit (seconds)",
            "minimum": 60,
            "maximum": 3600,
            "type": "integer",
            "description": "Total time of the run. When it is used up the run stops cleanly, keeps what it delivered and saves where it stopped (with only-new on, the next run continues from there). Default 1500, from 60 to 3600.",
            "default": 1500
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Name of the key-value store that remembers delivered comment ids (ids and counts only, no text) for only-new runs. Use another name for another job. 3 to 63 characters: lowercase letters, digits, hyphens.",
            "default": "youtube-comments-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}