{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Channel Scraper From Search Video",
    "description": "Youtube Channel Scraper From Search Video discover the channels behind the matching videos & Shorts, and extract the details of every channel: stats, links, contacts and socials. Optionally add the Home, Videos, Shorts, Live, Playlists and Posts sections. Channel URLs, handles and IDs are accepted.",
    "version": "0.2",
    "x-build-id": "glVeInLzMw2nlmvOS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alpha-scraper~youtube-channel-scraper-from-search-video/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alpha-scraper-youtube-channel-scraper-from-search-video",
        "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/alpha-scraper~youtube-channel-scraper-from-search-video/runs": {
      "post": {
        "operationId": "runs-sync-alpha-scraper-youtube-channel-scraper-from-search-video",
        "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/alpha-scraper~youtube-channel-scraper-from-search-video/run-sync": {
      "post": {
        "operationId": "run-sync-alpha-scraper-youtube-channel-scraper-from-search-video",
        "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": {
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search on YouTube, one search per keyword, typed the way you would type them into the YouTube search bar. Example: \"interview questions and answers\" or \"maruti suzuki\". Leave empty if you only want to scrape the channels listed in the section below.",
            "items": {
              "type": "string"
            }
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "videos",
              "shorts",
              "both"
            ],
            "type": "string",
            "description": "Which kind of search results the channels are discovered from.\n• Videos: only the channels of the regular videos in the search results.\n• Shorts: only the channels of the YouTube Shorts in the search results. YouTube mixes Shorts into just the first several result pages, so this usually returns fewer channels than the other options (in tests, roughly 60 to 90 for a broad keyword).\n• Both: the channels of videos and Shorts together, in the order they appear in the results. A channel that has both is listed once, at its first appearance.\nThe minimum views and publication date filters below apply to the content type you choose.",
            "default": "both"
          },
          "maxchannels": {
            "title": "Max channels per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of unique channels to collect for each keyword. The Actor stops loading search results as soon as this many different channels have been found. YouTube stops returning results after a limited number of pages (a test search ended at about 180 channels), so very high values simply mean \"as many as YouTube returns\". Keep this low for a quick first run: every optional channel section you switch on adds requests for each channel.",
            "default": 10
          },
          "maxSearchPages": {
            "title": "Max search result pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Safety limit on how many pages of search results (\"load more\" requests) are loaded for each keyword. Loading also stops earlier when enough channels were found, when YouTube returns no further page, or when several pages in a row add no new channel.",
            "default": 30
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Only use videos or Shorts with at least this many views to discover channels. Anything below the threshold is skipped, so its channel is not added (unless another video or Short of that channel passes). Skipped items do not count towards \"Max channels per keyword\". Videos show their exact view count in the search results, Shorts only a rounded one (for example \"1.3K views\"), so for Shorts the comparison is approximate. Leave empty for no minimum."
          },
          "newerThan": {
            "title": "Published after (newer than)",
            "type": "string",
            "description": "Only use videos or Shorts published on or after this date to discover channels. Pick a date (YYYY-MM-DD) or type an age such as \"2 weeks\" (meaning 2 weeks ago). Leave empty for no start date."
          },
          "olderThan": {
            "title": "Published before (older than)",
            "type": "string",
            "description": "Only use videos or Shorts published before this date to discover channels. Pick a date (YYYY-MM-DD) or type an age such as \"1 month\" (meaning 1 month ago). Combine it with \"Published after\" to get a date range. Leave empty for no end date."
          },
          "startUrls": {
            "title": "Channel URLs",
            "type": "array",
            "description": "YouTube channels to scrape directly, in addition to the channels found by search. Use the channel's main page, for example:\n• https://www.youtube.com/@Handle\n• https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx\n• https://www.youtube.com/user/LegacyName\n\nAvoid tab URLs such as /videos or /posts: the channel's home page is then not read and the result is incomplete. Legacy /c/Name URLs only work where YouTube still serves them.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Channel URL, e.g. https://www.youtube.com/@Handle (or https://www.youtube.com/channel/UC...)."
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "usernames": {
            "title": "Channel handles",
            "type": "array",
            "description": "Channel handles, with or without the @. Example: \"MrBeast\" or \"@MrBeast\". Each one is opened as https://www.youtube.com/@Handle.",
            "items": {
              "type": "string"
            }
          },
          "channelIds": {
            "title": "Channel IDs",
            "type": "array",
            "description": "Channel IDs, 24 characters starting with UC. Example: UCX6OQ3DkcsbYNE6H8uQQuVA. Each one is opened as https://www.youtube.com/channel/ID.",
            "items": {
              "type": "string",
              "pattern": "^UC[\\w-]{22}$"
            }
          },
          "channelUrlsOnly": {
            "title": "Only collect channel URLs",
            "type": "boolean",
            "description": "Skip the channel data extraction and return only the channel URLs found by the search, one item per channel in the form {\"channel_url\": \"https://www.youtube.com/@Handle\"}. This is the fastest and cheapest mode and is handy for building channel lists. When enabled, the channel section options below are ignored.",
            "default": false
          },
          "home": {
            "title": "Home",
            "type": "boolean",
            "description": "Add the channel's Home tab: the channel trailer, the shelves shown on the home page (title, type and items) and the featured channels. It is read from the channel page that is loaded anyway, so it adds no extra requests.",
            "default": false
          },
          "videos": {
            "title": "Videos",
            "type": "boolean",
            "description": "Add the Videos tab: the 10 latest videos in detail (exact views, likes, comments, dates, tags, description), the most popular and the oldest video, and content metrics such as average views, engagement and uploads per week. Adds roughly 25 requests per channel, the most of any section.",
            "default": false
          },
          "shorts": {
            "title": "Shorts",
            "type": "boolean",
            "description": "Add the Shorts tab: the 10 latest Shorts in detail (exact views, likes, comments, dates) and the most popular Shorts. Adds roughly 22 requests per channel.",
            "default": false
          },
          "live": {
            "title": "Live",
            "type": "boolean",
            "description": "Add the Live tab: the stream that is live now, upcoming streams and the latest past streams, with start times and views. Adds up to about 15 requests per channel; a channel without a Live tab adds none.",
            "default": false
          },
          "playlists": {
            "title": "Playlists",
            "type": "boolean",
            "description": "Add the Playlists tab: up to 10 playlists in detail (video count, views, privacy, last update). Channels that also have a Podcasts, Releases or Courses tab get those lists too. Adds up to about 13 requests per channel.",
            "default": false
          },
          "posts": {
            "title": "Posts",
            "type": "boolean",
            "description": "Add the Posts tab (community posts): the 10 latest posts with their text, links, likes, comments, images and polls. Adds one request per channel.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}