{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Search",
    "description": "YouTube channel search by keyword: channel ID, handle, subscribers, exact video and view counts, country, joined date, links and newest upload date. Filter by subscribers, country, language and recent activity, one row per channel across keywords. Monitor mode returns only new channels.",
    "version": "0.1",
    "x-build-id": "28tnh6Yp8gyAgkOC1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~youtube-channel-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-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/datahamster~youtube-channel-search/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-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/datahamster~youtube-channel-search/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-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": {
          "queries": {
            "title": "Keywords",
            "type": "array",
            "description": "Topics, products, niches or brand words to search YouTube channels for, one per line. A channel found by several keywords is returned once (for the first keyword that found it).",
            "default": [
              "coffee roasting"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxChannelsPerQuery": {
            "title": "Max channels per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop each keyword after this many channels that pass your filters.",
            "default": 50
          },
          "minSubscribers": {
            "title": "Minimum subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep channels with at least this many subscribers (YouTube's rounded count, e.g. 15.1M). Checked on the search result, so a dropped channel costs no extra request."
          },
          "maxSubscribers": {
            "title": "Maximum subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep channels with at most this many subscribers. Use it with the minimum to find micro or mid-size creators."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Keep only channels whose about page shows one of these countries. ISO codes (US, GB, DE) or English names (Germany). Channels that show no country are dropped while this filter is set.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Keep only channels whose title and description are written in one of these languages (two-letter codes: en, es, de, pt, fr, it, nl, pl, tr, id, sv, ro, cs, vi, uk, ru, ja, ko, zh, hi, ar and more). The language is detected from the text; channels whose text is too short to tell are dropped while this filter is set.",
            "items": {
              "type": "string"
            }
          },
          "activeWithinDays": {
            "title": "Uploaded within the last N days",
            "minimum": 1,
            "maximum": 36500,
            "type": "integer",
            "description": "Keep only channels whose newest upload is at most this many days old. Leave empty to keep inactive channels too."
          },
          "minVideos": {
            "title": "Minimum videos",
            "minimum": 0,
            "type": "integer",
            "description": "Keep channels with at least this many public videos (exact count from the about page)."
          },
          "verifiedOnly": {
            "title": "Verified channels only",
            "type": "boolean",
            "description": "Keep only channels with YouTube's verified or official artist badge.",
            "default": false
          },
          "includeAbout": {
            "title": "Read the about page",
            "type": "boolean",
            "description": "One extra request per channel: full description, country, exact video and view counts, joined date and the channel's links. Turned on automatically when a country, language or minimum-videos filter is set.",
            "default": true
          },
          "includeLatestVideo": {
            "title": "Read the latest upload",
            "type": "boolean",
            "description": "One extra request per channel: date, ID and title of the newest upload, and days since then. Turned on automatically when the activity filter is set.",
            "default": true
          },
          "maxScannedPerQuery": {
            "title": "Max search results to scan per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How deep to read YouTube's channel results for each keyword (20 per page) while filters drop channels. Raise it for narrow filters.",
            "default": 300
          },
          "strictQueryMatch": {
            "title": "Drop unrelated filler",
            "type": "boolean",
            "description": "When YouTube has no real match for a keyword it pads the list with unrelated channels; this keeps only channels whose name or snippet contains a keyword word.",
            "default": true
          },
          "proxyCountry": {
            "title": "Search region",
            "type": "string",
            "description": "Two-letter country code for YouTube's search region (default US). It changes what YouTube ranks first; it does not filter by channel country (use Countries for that)."
          },
          "tier": {
            "title": "Proxy",
            "enum": [
              "auto",
              "none",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "auto starts without a proxy and climbs to datacenter, then residential, only when YouTube refuses a request.",
            "default": "auto"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results (you are charged only for pushed items)",
            "default": 200
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "scrape = full results; monitor = only new/changed items since the previous run of this task",
            "default": "scrape"
          },
          "monitorStateId": {
            "title": "Monitor state id",
            "type": "string",
            "description": "Optional state id when not running as a saved task (monitor mode)"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a change summary here in monitor mode"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional: bot token for monitor-mode change summaries"
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional: chat id that receives monitor-mode summaries"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}