{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Finder by Keyword - Subscribers, Total Views",
    "description": "[💰$0.10/1K] Find YouTube channels by keyword and export one row per channel: subscribers, total views, video count, country, join date, external links and last upload date. Filter by subscriber range, country, verification and video count, up to 500 channels a run. No login, no proxies, no API key.",
    "version": "0.9",
    "x-build-id": "Fl5Z8KZ9CmPav3S0N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ai-lead-gen-tools~youtube-channel-discovery/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ai-lead-gen-tools-youtube-channel-discovery",
        "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/ai-lead-gen-tools~youtube-channel-discovery/runs": {
      "post": {
        "operationId": "runs-sync-ai-lead-gen-tools-youtube-channel-discovery",
        "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/ai-lead-gen-tools~youtube-channel-discovery/run-sync": {
      "post": {
        "operationId": "run-sync-ai-lead-gen-tools-youtube-channel-discovery",
        "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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search YouTube for, up to 20. Each term is paged to the end of the results, not just the first page.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 120
            }
          },
          "query": {
            "title": "Single query",
            "type": "string",
            "description": "One keyword as a single line, for API and console runs without an array. Added to `searchTerms` when both are set."
          },
          "maxChannels": {
            "title": "Max channels",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap on saved rows after all filters. Charged per saved channel.",
            "default": 500
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "YouTube `hl` value for searches and channel pages, e.g. `en`, `de`, `es`. Affects labels such as \"subscribers\" and \"Joined\".",
            "default": "en"
          },
          "region": {
            "title": "Search region",
            "type": "string",
            "description": "YouTube `gl` value, e.g. `US`, `DE`, `GB`. Changes which channels a keyword returns even without a proxy.",
            "default": "US"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "channels",
              "videos",
              "both"
            ],
            "type": "string",
            "description": "`channels` searches YouTube's channel list. `videos` searches videos and takes their owners. `both` merges the two and de-duplicates by channel id.",
            "default": "channels"
          },
          "minSubscribers": {
            "title": "Min subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Drop channels below this rounded subscriber count. 0 disables the filter. When set, a channel whose count YouTube does not publish is dropped and the reason is recorded.",
            "default": 0
          },
          "maxSubscribers": {
            "title": "Max subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Drop channels above this rounded subscriber count. 0 disables the filter.",
            "default": 0
          },
          "minVideos": {
            "title": "Min videos",
            "minimum": 0,
            "type": "integer",
            "description": "Drop channels with fewer videos than this, using the exact count from the channel's About page. Requires channel details.",
            "default": 0
          },
          "countries": {
            "title": "Channel countries",
            "type": "array",
            "description": "Keep only channels whose owner declared one of these countries. ISO 3166 codes or English names, e.g. `US`, `Germany`. Requires channel details.",
            "items": {
              "type": "string"
            }
          },
          "verifiedOnly": {
            "title": "Verified channels only",
            "type": "boolean",
            "description": "Keep only channels carrying YouTube's verification badge.",
            "default": false
          },
          "maxChannelsPerTerm": {
            "title": "Max channels per term",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on channels taken from one term: the term stops as soon as this many channels were collected. Counted before filters. `maxChannels` is then filled evenly across terms.",
            "default": 100
          },
          "searchTermsFiles": {
            "title": "Keyword files",
            "type": "array",
            "description": "Key-value store keys holding keywords, one per line or as a JSON array.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Ready-made YouTube search URLs. The keyword is taken from `search_query` or `q` and used as is.",
            "items": {
              "type": "string"
            }
          },
          "excludeChannelIds": {
            "title": "Exclude channels",
            "type": "array",
            "description": "Channel ids (`UC…`) or handles (`@name`) to leave out.",
            "items": {
              "type": "string"
            }
          },
          "includeChannelDetails": {
            "title": "Read channel pages",
            "type": "boolean",
            "description": "Open each channel's videos and about pages. Gives subscribers, views, country, join date, links, keywords and recent uploads, and costs two page loads per channel. Disable for a cheaper search-only run. `countries`, `minVideos` and sorting by views, video count or last upload need this.",
            "default": true
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "subscribers",
              "views",
              "videoCount",
              "lastUpload"
            ],
            "type": "string",
            "description": "Order of rows in the dataset. `relevance` keeps YouTube's order.",
            "default": "relevance"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel channel page loads.",
            "default": 4
          },
          "sameDomainDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Minimum gap between two requests to youtube.com.",
            "default": 0.5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Per-request timeout before a retry is attempted.",
            "default": 30
          },
          "runBudgetSecs": {
            "title": "Run budget (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "How long this run may take before it stops and returns what it has. Leave it empty (recommended) and the run uses the whole timeout you set for it. Stopping early is not a failure: the run summary reports it and you get the channels found so far."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not required to read YouTube. Worth enabling on large runs: reading one channel costs about 2 MB of traffic.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}