{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Search Scraper",
    "description": "Find public YouTube channels from search terms or public YouTube search-result URLs. Review channel IDs, handles, public metrics, and profile details. Each channel row keeps the first eligible search match.",
    "version": "6.0",
    "x-build-id": "VwoSWEFDRaX4lASzb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~youtube-channel-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-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/maximedupre~youtube-channel-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-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/maximedupre~youtube-channel-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-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 find channels surfaced by matching YouTube videos. Channel-only search finds channels directly. With both, video results run first for each keyword or search URL."
          },
          "searchTerms": {
            "title": "Search terms",
            "maxItems": 500,
            "type": "array",
            "description": "Words or phrases to search for on YouTube. Add up to 500 terms. Terms from uploaded files count toward the same limit, and file terms past it are not used.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "searchTermsFiles": {
            "title": "Upload search term files",
            "maxItems": 20,
            "type": "array",
            "description": "Upload up to 20 TXT or CSV files. Put one term on each line in a TXT file. CSV files may use a column named searchTerm, term, query, keyword, or keywords. Without one, each cell is treated as a term. Direct and file terms share a 500-term limit.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "searchUrls": {
            "title": "YouTube search URLs",
            "type": "array",
            "description": "Add complete YouTube /results URLs. The Actor uses each URL's search words and applies the language, country, and discovery choice from this form.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "A public YouTube search-result URL.",
                  "pattern": "^https?://(?:www\\.|m\\.)?youtube\\.com/results(?:\\?|$)",
                  "minLength": 1
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "maxChannelsPerSearchTerm": {
            "title": "Channels per search",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each keyword or search URL after this many eligible channels. Enter 0 or leave it empty for no per-search limit. A channel saved from an earlier search still counts here, but it is not saved twice."
          },
          "maxTotalResults": {
            "title": "Total channel limit",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after saving this many unique channels across the whole run. Enter 0 or leave it empty for all available results. Channels left out by filters or the excluded list do not count."
          },
          "minSubscribers": {
            "title": "Minimum subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Save only channels with at least this many public subscribers. Channels with no public subscriber count do not match."
          },
          "maxSubscribers": {
            "title": "Maximum subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Save only channels with no more than this many public subscribers. It works with the minimum. Channels with no public subscriber count do not match."
          },
          "minVideos": {
            "title": "Minimum videos",
            "minimum": 0,
            "type": "integer",
            "description": "Save only channels with at least this many public videos. Channels with no public video count do not match."
          },
          "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": "Add YouTube handles, channel IDs, or full channel URLs to leave out. Put one value on each line. The Actor matches each channel by its identity.",
            "items": {
              "type": "string",
              "pattern": "^(?:https?://(?:www\\.|m\\.)?youtube\\.com/(?:@[A-Za-z0-9._-]+|channel/UC[A-Za-z0-9_-]+)(?:[/?#].*)?|@[A-Za-z0-9._-]+|UC[A-Za-z0-9_-]+)$",
              "minLength": 1
            }
          },
          "languageHint": {
            "title": "Search language",
            "pattern": "^[A-Za-z]{2}$",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Use a two-letter language code, such as en or de. It sets the language for YouTube search pages. Leave it out to use English. Other codes are accepted and may not affect results."
          },
          "countryHint": {
            "title": "Search country",
            "pattern": "^[A-Za-z]{2}$",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Use a two-letter country code, such as US or GB. It sets the country YouTube uses for search. Leave it out to use the United States. Other codes are accepted and may not affect results."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}