{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Videos Scraper",
    "description": "Extract public YouTube channel video listings with channel metadata and opt-in bounded watch details through public pages or the official YouTube Data API.",
    "version": "2.0",
    "x-build-id": "XscmPuSlScqP9gfHB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/googleapi~youtube-channel-videos-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-googleapi-youtube-channel-videos-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/googleapi~youtube-channel-videos-scraper/runs": {
      "post": {
        "operationId": "runs-sync-googleapi-youtube-channel-videos-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/googleapi~youtube-channel-videos-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-googleapi-youtube-channel-videos-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": {
          "channelUrl": {
            "title": "Single channel URL or handle",
            "maxLength": 500,
            "type": "string",
            "description": "Public HTTPS YouTube channel URL or @handle."
          },
          "channelUrls": {
            "title": "Channel URLs",
            "maxItems": 200,
            "type": "array",
            "description": "Ordered public HTTPS YouTube channel URLs or @handles.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          "channelHandles": {
            "title": "Channel handles",
            "maxItems": 200,
            "type": "array",
            "description": "Public channel handles with or without @.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "maxItems": 200,
            "type": "array",
            "description": "Object-form alias for public YouTube channel URLs.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "Public channel URL",
                  "description": "HTTPS YouTube channel URL or handle.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "sourceUrls": {
            "title": "Source URL alias",
            "maxItems": 200,
            "type": "array",
            "description": "Compatibility alias for a list of public YouTube channel URLs.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          "urls": {
            "title": "URL alias",
            "maxItems": 200,
            "type": "array",
            "description": "Compatibility alias for a list of public YouTube channel URLs.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          "url": {
            "title": "Single URL alias",
            "maxLength": 500,
            "type": "string",
            "description": "Compatibility alias for one public YouTube channel URL or handle."
          },
          "maxItems": {
            "title": "Maximum listings per channel",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Compatibility alias for maxVideosPerChannel. Default: 50."
          },
          "maxVideosPerChannel": {
            "title": "Maximum listings per channel",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum public video and optional Short rows per input channel. Default: 50.",
            "default": 50
          },
          "page": {
            "title": "Starting listing batch",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "1-based public UI batch to begin emitting from. Earlier batches are reached by ordinary scrolling; YouTube exposes no stable numbered-page or offset control.",
            "default": 1
          },
          "maxPages": {
            "title": "Maximum listing batches",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum total UI-loaded batches to traverse per Videos or Shorts tab, including batches skipped before page. Each later batch is counted only when visible scrolling reveals new video IDs.",
            "default": 3
          },
          "deduplicate": {
            "title": "Deduplicate videos",
            "type": "boolean",
            "description": "Skip repeated video IDs across channel sources.",
            "default": true
          },
          "includeMedia": {
            "title": "Include public image URLs",
            "type": "boolean",
            "description": "Include video thumbnails and channel avatar/banner variants when present in the source.",
            "default": true
          },
          "includeShorts": {
            "title": "Include Shorts tab",
            "type": "boolean",
            "description": "Read the public Shorts tab in addition to the Videos tab. The per-channel result limit is split deterministically.",
            "default": false
          },
          "sortBy": {
            "title": "Videos and Shorts ordering",
            "enum": [
              "newest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Public ordering requested from the visible Videos and Shorts tab controls on YouTube.",
            "default": "newest"
          },
          "maxVideoDetails": {
            "title": "Maximum video detail pages",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Fetch this many public watch pages for full descriptions, tags, exact counts, category, caption tracks, and availability. Set to 0 to disable; maximum 10 per run.",
            "default": 0
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay between ordered public channel/video requests.",
            "default": 250
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum retries for the initial channel-page crawler request. Later Shorts and watch-page navigations are not separately retried.",
            "default": 1
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each public channel or video page request.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration. When supplied, the browser crawler routes channel, scroll, and optional video-detail page requests through the configured proxy."
          },
          "requestTimeoutMs": {
            "title": "Request timeout alias (ms)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Compatibility alias for requestTimeoutSecs."
          },
          "maxResponseBytes": {
            "title": "Maximum response size (bytes)",
            "minimum": 50000,
            "maximum": 5000000,
            "type": "integer",
            "description": "Maximum public HTML retained per request.",
            "default": 2000000
          },
          "userAgent": {
            "title": "User agent",
            "maxLength": 240,
            "type": "string",
            "description": "Optional ordinary browser user agent; stealth and fingerprint spoofing are not used."
          },
          "locale": {
            "title": "Locale",
            "pattern": "^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{2,8})?$",
            "type": "string",
            "description": "Accept-Language value for public requests.",
            "default": "en-US"
          },
          "useYouTubeDataApi": {
            "title": "Use official YouTube Data API",
            "type": "boolean",
            "description": "Select the official API for opt-in video details. Requires a positive maxVideoDetails budget and the secret youtubeApiKey. Public channel listings still use the browser.",
            "default": false
          },
          "youtubeApiKey": {
            "title": "YouTube Data API key",
            "type": "string",
            "description": "Configure an already authorized YouTube Data API v3 key securely in Apify. Never include it in source files or example input. Ignored unless useYouTubeDataApi is enabled. API requests go directly to Google; proxyConfiguration applies to browser requests."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}