{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Search Scraper",
    "description": "Find public YouTube channels from search terms or results URLs. Each row is a channel with its handle, subscriber and view counts, profile, and the search result that found it first. No API key needed.",
    "version": "0.1",
    "x-build-id": "Tv83sRbRcfLrfklPE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adaptable_wheelhouse~youtube-channel-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adaptable_wheelhouse-youtube-channel-search-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/adaptable_wheelhouse~youtube-channel-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-adaptable_wheelhouse-youtube-channel-search-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/adaptable_wheelhouse~youtube-channel-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-adaptable_wheelhouse-youtube-channel-search-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": [
          "discoveryMode"
        ],
        "properties": {
          "discoveryMode": {
            "title": "Find channels by",
            "enum": [
              "both",
              "videoResults",
              "channelFilter"
            ],
            "type": "string",
            "description": "Video results, channel-only search, or both. With both, video results run first for each search term or search URL, and they can use up Channels per source before channel-only search runs.",
            "default": "both"
          },
          "searchTerms": {
            "title": "Search terms",
            "maxItems": 500,
            "type": "array",
            "description": "Topics, products, or types of creators to search for on YouTube. Up to 500 terms, including terms from uploaded files.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": [
              "coffee roasting"
            ]
          },
          "searchTermsFiles": {
            "title": "Upload search term files",
            "maxItems": 20,
            "type": "array",
            "description": "Up to 20 TXT or CSV files. A TXT file has one term per line. A CSV file uses a column named searchTerm, term, query, keyword, or keywords; without one of those, every cell is a term.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "searchUrls": {
            "title": "YouTube search URLs",
            "type": "array",
            "description": "Public youtube.com/results URLs. The search words are kept. The URL's language, country, and filter are ignored; Page language, Page country, and Find channels by are used instead.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "A public YouTube search-result URL.",
                  "pattern": "^https?://(?:www\\.)?youtube\\.com/results(?:\\?|$)",
                  "minLength": 1
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "maxChannelsPerSearchTerm": {
            "title": "Channels per source",
            "minimum": 1,
            "type": "integer",
            "description": "Stop each search term or search URL after this many channels. Leave it empty for no per-source limit. A channel counts once per results page, so it can count again on a later page. A channel dropped by a filter or the exclusion list does not count the first time it appears; a later appearance does. A channel already saved earlier in the run counts, but it is not saved again."
          },
          "maxTotalResults": {
            "title": "Total channels",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after saving this many channels in the whole run. Channels left out by filters do not count. Leave it empty for no total limit."
          },
          "minSubscribers": {
            "title": "Minimum subscribers",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Save only channels at or above this public subscriber count. Channels with no public count are not saved."
          },
          "maxSubscribers": {
            "title": "Maximum subscribers",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Save only channels at or below this public subscriber count. Channels with no public count are not saved."
          },
          "minVideos": {
            "title": "Minimum videos",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Save only channels at or above this public video count. Channels with no public video count are not saved."
          },
          "verifiedOnly": {
            "title": "Verified channels only",
            "type": "boolean",
            "description": "Save only channels that YouTube marks as verified.",
            "default": false
          },
          "excludedChannels": {
            "title": "Excluded channels",
            "type": "array",
            "description": "Channel URLs to leave out, such as https://www.youtube.com/@Google or https://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA. Matching uses the channel id and handle, not only the URL text.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "Channel URL",
                  "description": "A YouTube handle URL or /channel/UC... URL.",
                  "pattern": "^https?://(?:www\\.|m\\.)?youtube\\.com/(?:@[A-Za-z0-9._-]+|channel/UC[A-Za-z0-9_-]+)(?:[/?#].*)?$",
                  "minLength": 1
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "languageHint": {
            "title": "Page language",
            "pattern": "^[A-Za-z]{2}$",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Two-letter language code, such as en or de. YouTube uses it for page text, including channel About pages. Defaults to en."
          },
          "countryHint": {
            "title": "Page country",
            "pattern": "^[A-Za-z]{2}$",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Two-letter country code, such as US or DE. YouTube uses it as the search country. Defaults to US."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The default Apify datacenter proxy is used for search and channel pages. If YouTube starts blocking it, the run switches to Residential automatically.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}