{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Search: Keywords to Channels",
    "description": "Search YouTube channels by keyword and get subscribers, video count, total views, description, links, country, creation date and public emails. Goes past the search limit, free filters, new-channel monitoring with webhook. No browser.",
    "version": "0.1",
    "x-build-id": "fB2Fbi8wpyr2ct1Jm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexmorain~youtube-channel-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexmorain-youtube-channel-search",
        "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/alexmorain~youtube-channel-search/runs": {
      "post": {
        "operationId": "runs-sync-alexmorain-youtube-channel-search",
        "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/alexmorain~youtube-channel-search/run-sync": {
      "post": {
        "operationId": "run-sync-alexmorain-youtube-channel-search",
        "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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search among YouTube channels, one per line, like <code>vegan cooking</code>, <code>b2b saas</code> or <code>yoga paris</code>. Every keyword gets its own count, filters and new-only memory.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max channels per keyword",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many channels to return for each keyword. A single YouTube search stops after about 200 to 600 channels, however many results it announces (about 109,000 for <i>cooking</i>). With <b>Go past the search limit</b> on, the Actor keeps searching variants until it reaches this number or runs out of new channels.",
            "default": 100
          },
          "maxItems": {
            "title": "Max channels in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many channels, all keywords together. Leave empty for no total limit. The run's maximum charge, set in the run options, also stops it cleanly."
          },
          "widenSearch": {
            "title": "Go past the search limit",
            "enum": [
              "auto",
              "off"
            ],
            "type": "string",
            "description": "A YouTube search ends after a few hundred channels. <b>Automatic</b> then searches the related queries YouTube suggests for your keyword, the other sort orders and 12 country views, and keeps only channels not seen yet. It only does so when the maximum per keyword is not reached yet, so a small maximum costs nothing extra.",
            "default": "auto"
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Order of the first search. The other orders are used by <b>Go past the search limit</b> to find more channels.",
            "default": "relevance"
          },
          "country": {
            "title": "Search country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code of the YouTube view used for the search (<code>US</code>, <code>FR</code>, <code>BR</code>...). It changes the ranking, not the channels' own country: use <b>Channel country</b> below to filter on that.",
            "default": "US"
          },
          "minSubscribers": {
            "title": "Min subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep channels with at least this many subscribers. YouTube rounds counts to three digits (1.36M), so the figure is as precise as YouTube shows it. Channels that hide their count are left out when a limit is set. Filtered channels are not charged."
          },
          "maxSubscribers": {
            "title": "Max subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep channels with at most this many subscribers. Useful to find small creators."
          },
          "channelCountries": {
            "title": "Channel country",
            "type": "array",
            "description": "Keep only channels whose About tab declares one of these countries, by two-letter code or name: <code>FR</code>, <code>Brazil</code>. Channels without a declared country are left out. The About tab is read for every candidate; only the channels you keep are charged.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Read each channel's About tab",
            "type": "boolean",
            "description": "Adds total views, video count, full description, external links, country, creation date and emails found in the description. Off returns the search card only (name, handle, subscribers, short description) at the lower price.",
            "default": true
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "new-only"
            ],
            "type": "string",
            "description": "<b>All channels</b> returns every channel within your limits on every run.<br><br><b>New channels only</b> keeps a memory of the channels earlier runs returned, per keyword, and returns only the ones never returned before. Schedule it weekly on your keywords to get a feed of new channels in your niche. Channels already returned are not charged again. The first run returns everything.",
            "default": "all"
          },
          "registryKey": {
            "title": "Memory name",
            "type": "string",
            "description": "Only used by <b>New channels only</b>. Leave empty and each keyword keeps its own memory. Set a name to keep separate memories for the same keywords (two clients, two projects), or a new name to start over."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "If set, the Actor POSTs a JSON summary to this URL at the end of the run, <b>only when at least one channel was returned</b>: <code>runId</code>, <code>datasetId</code>, <code>mode</code>, <code>channels</code> (count) and <code>items</code>, the first 100 channels with ID, URL, handle, title, subscribers, country, emails and keyword. Stored encrypted. An unreachable webhook is logged and never fails the run."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave this off. Requests go to YouTube directly from the Apify datacenter, which YouTube accepts for channel search at no cost to you.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}