{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper | Videos, Channels, Search & Comments",
    "description": "Alternative YouTube API with no limits or quotas. Extract video details (views, likes, publish date, description), channel video listings, search results, and comments. No login, no browser, no proxy. $0.002/run + $0.0007/video + $0.00018/comment.",
    "version": "1.0",
    "x-build-id": "vMHuZXIBoNBclpwah"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hridayrungta~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hridayrungta-youtube-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/hridayrungta~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hridayrungta-youtube-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/hridayrungta~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hridayrungta-youtube-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": "Video URLs/IDs (video details)",
            "type": "array",
            "description": "One or more YouTube videos, one per line: a full watch/shorts/youtu.be URL or a bare 11-character video id. Returns full metadata: title, channel, view count, like count, publish date, description, keywords, duration, thumbnail.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels (channel videos)",
            "type": "array",
            "description": "One or more YouTube channels, one per line: a handle (\"@nasa\"), a full channel/handle URL, or a UC... channel id. Returns that channel's videos (title, view count, published time, duration), paginated.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "One or more search terms, one per line. Returns matching videos (title, channel, view count, published time, duration), paginated.",
            "items": {
              "type": "string"
            }
          },
          "commentVideoUrls": {
            "title": "Video URLs/IDs (comments)",
            "type": "array",
            "description": "One or more YouTube videos to fetch top-level comments for, one per line. Separate from \"Video URLs\" above because comments are billed and budgeted separately.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Channel mode",
            "enum": [
              "all",
              "changes"
            ],
            "type": "string",
            "description": "Only affects \"Channels\" above. \"all\": every video the run reaches, every time. \"changes\": only videos new since your last run of that channel.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max video rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Cost cap - you're billed once per video row saved, shared across video details, channel videos and search.",
            "default": 100
          },
          "maxComments": {
            "title": "Max comment rows",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Cost cap - you're billed once per comment saved. Set to 0 to disable comments entirely even if comment video urls are provided.",
            "default": 100
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Caps how many top-level comments are pulled from any single video, regardless of the overall Max comment rows budget.",
            "default": 50
          },
          "maxPagesPerSource": {
            "title": "Max pagination pages per source",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many innertube continuation pages to follow per channel, search query, or comment video before moving on - a safety cap independent of the item budgets above.",
            "default": 10
          },
          "firstRunSince": {
            "title": "First run since (channel mode \"changes\" only)",
            "type": "string",
            "description": "A channel's first incremental run only takes videos published since this date/span. Default \"30 days\"; \"all\" to take everything the run reaches.",
            "default": "30 days"
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries with backoff for network errors and 5xx responses.",
            "default": 3
          },
          "stateStoreName": {
            "title": "State store name (channel mode \"changes\" only)",
            "type": "string",
            "description": "Name of the key-value store (in YOUR account) that holds the high-water mark per channel. Leave blank for the default.",
            "default": ""
          },
          "stateNamespace": {
            "title": "State namespace (channel mode \"changes\" only)",
            "type": "string",
            "description": "Advanced: an explicit namespace for the mark key. Leave blank to namespace by your Apify user id automatically.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}