{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Channel Scraper",
    "description": "Easily scrape videos from any YouTube channel and extract titles, metadata, thumbnails, and more.",
    "version": "1.0",
    "x-build-id": "jHanbu24cwfjyqWXL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yesintelligent~youtube-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yesintelligent-youtube-channel-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/yesintelligent~youtube-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yesintelligent-youtube-channel-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/yesintelligent~youtube-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yesintelligent-youtube-channel-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": [
          "channel_url"
        ],
        "properties": {
          "channel_url": {
            "title": "YouTube Channel URL",
            "type": "string",
            "description": "The URL of the YouTube channel to scrape. Can be channel URL, @handle, or /c/ format."
          },
          "max_videos": {
            "title": "Maximum Videos",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of videos to scrape (0 = unlimited)",
            "default": 50
          },
          "sort_by": {
            "title": "Sort By",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Order in which to scrape videos",
            "default": "latest"
          },
          "include_comments": {
            "title": "Include Comments",
            "type": "boolean",
            "description": "Extract comments for each video (increases scraping time)",
            "default": false
          },
          "max_comments": {
            "title": "Max Comments per Video",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of comments to extract per video",
            "default": 10
          },
          "include_captions": {
            "title": "Include Captions",
            "type": "boolean",
            "description": "Check if captions/subtitles are available",
            "default": true
          },
          "extract_chapters": {
            "title": "Extract Chapters",
            "type": "boolean",
            "description": "Extract video chapters/timestamps if available",
            "default": true
          },
          "extract_hashtags": {
            "title": "Extract Hashtags",
            "type": "boolean",
            "description": "Extract hashtags from video descriptions",
            "default": true
          },
          "scroll_delay": {
            "title": "Scroll Delay (ms)",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay between scroll actions to avoid detection (milliseconds)",
            "default": 2000
          },
          "max_scroll_attempts": {
            "title": "Max Scroll Attempts",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum attempts to load more videos via scrolling",
            "default": 100
          },
          "retry_attempts": {
            "title": "Retry Attempts",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of retry attempts for failed requests",
            "default": 3
          },
          "proxy_config": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Proxy setup to prevent IP blocks and enable residential IP rotation",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "stealth_mode": {
            "title": "Stealth Mode",
            "type": "boolean",
            "description": "Enable advanced stealth techniques to avoid bot detection",
            "default": true
          },
          "user_agent": {
            "title": "Custom User Agent",
            "type": "string",
            "description": "Custom user agent string (leave empty for auto-rotation)",
            "default": ""
          },
          "headless": {
            "title": "Headless Mode",
            "type": "boolean",
            "description": "Run browser in headless mode (disable for debugging)",
            "default": true
          },
          "debug_screenshots": {
            "title": "Debug Screenshots",
            "type": "boolean",
            "description": "Save screenshots for debugging purposes",
            "default": false
          },
          "batch_size": {
            "title": "Batch Size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of videos to process in each batch before saving",
            "default": 10
          },
          "rate_limit_delay": {
            "title": "Rate Limit Delay (ms)",
            "minimum": 100,
            "maximum": 10000,
            "type": "integer",
            "description": "Base delay between requests to respect rate limits",
            "default": 1000
          },
          "enable_deduplication": {
            "title": "Enable Deduplication",
            "type": "boolean",
            "description": "Automatically remove duplicate videos based on video ID",
            "default": true
          },
          "filter_criteria": {
            "title": "Filter Criteria",
            "type": "object",
            "description": "Advanced filtering options for videos",
            "properties": {
              "min_views": {
                "title": "Minimum Views",
                "type": "integer",
                "description": "Only include videos with at least this many views",
                "default": 0
              },
              "max_age_days": {
                "title": "Maximum Age (days)",
                "type": "integer",
                "description": "Only include videos published within this many days",
                "default": 0
              },
              "include_shorts": {
                "title": "Include Shorts",
                "type": "boolean",
                "description": "Include YouTube Shorts in results",
                "default": true
              },
              "include_live": {
                "title": "Include Live Streams",
                "type": "boolean",
                "description": "Include live streams in results",
                "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}