{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Scraper with Keyword Search",
    "description": "Automate YouTube channel data collection in minutes. The YouTube Channel Scraper pulls video lists, engagement metrics, timestamps, and channel info. Perfect for SEO research, content tracking, trend analysis, and scalable data pipelines.",
    "version": "0.1",
    "x-build-id": "ca2hV2Q8kB7iz3O8f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~youtube-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-youtube-channel-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/scrapier~youtube-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-youtube-channel-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/scrapier~youtube-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-youtube-channel-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",
        "properties": {
          "searchQueries": {
            "title": "🔎 Keywords to find channels",
            "type": "array",
            "description": "Search terms, one per line. Each one is sent to YouTube's channel search and the channels it returns are scraped. Leave empty to scrape only the channels listed below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxChannelsPerQuery": {
            "title": "🔢 Channels per keyword",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many channels to keep from each keyword's result list. The Actor pages through YouTube's channel search (about 20 results per page) until it has this many.",
            "default": 5
          },
          "maxChannels": {
            "title": "🔢 Channels overall",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on how many channels the keywords may discover in total, across every keyword. Channels supplied in “YouTube channels” do not count against it.",
            "default": 10
          },
          "minSubscribers": {
            "title": "👥 Subscriber floor",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Drop discovered channels whose subscriber label is below this number. YouTube publishes a rounded label (“9.06M subscribers”), so the floor is applied to that rounded figure; a channel whose label cannot be read is dropped too, and the run log counts both cases separately. 0 keeps every channel.",
            "default": 0
          },
          "searchSortBy": {
            "title": "↕️ Channel search order",
            "enum": [
              "relevance",
              "viewCount"
            ],
            "type": "string",
            "description": "Which of YouTube's own channel-search orderings to ask for.",
            "default": "relevance"
          },
          "searchMarket": {
            "title": "🌍 Search market",
            "type": "string",
            "description": "Language and country the channel search runs in, written as language-COUNTRY (en-US, de-DE, pt-BR …). Different markets return different channels for the same keyword. Channel pages themselves are always read in English so tab names and sort chips stay readable.",
            "default": "en-US"
          },
          "discoveryOnly": {
            "title": "⚡ Discovery only — skip the channel scrape",
            "type": "boolean",
            "description": "Emit one channel row per discovered channel straight from the search response — id, name, @handle, subscriber label, avatar, verification, keyword and rank — and fetch nothing else. Fast and cheap for building a shortlist. About-tab fields (description, join date, country, banner, lifetime views) stay empty because the search response does not carry them.",
            "default": false
          },
          "deepItemDetails": {
            "title": "🎯 Exact view and like counts",
            "type": "boolean",
            "description": "Open each video, Short and stream through YouTube's own player endpoint to read its exact view count, like count and publish date. Costs one extra request per item. Turn it off for a fast, cheap listing — rows then carry only the abbreviated view text YouTube prints on the grid, and viewCount / likesCount / publishedAt stay empty.",
            "default": true
          },
          "startUrls": {
            "title": "🔗 YouTube channels",
            "type": "array",
            "description": "Channel URLs (https://www.youtube.com/@Handle or .../channel/UC…), bare @handles, or bare UC… channel IDs. One per line. These are scraped exactly like the keyword results, next to or instead of them.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Items per section, per channel",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit for each enabled section (videos, Shorts, live streams, posts) on each channel. With exact counts on, every video-type item costs one extra request, so keep this small for quick runs.",
            "default": 10
          },
          "sortOrderVideos": {
            "title": "🎥 Videos tab order",
            "enum": [
              "date",
              "viewCount",
              "oldest"
            ],
            "type": "string",
            "description": "Which of YouTube's own Videos-tab sort chips to use. Channels that do not offer Popular/Oldest chips fall back to newest-first, and the run log says so. YouTube publishes no sort chips at all on the Shorts, Live and Community tabs, so those three are always returned in YouTube's own order.",
            "default": "date"
          },
          "scrapeChannelInfo": {
            "title": "🏠 Channel profile & About",
            "type": "boolean",
            "description": "Emit one channel row per channel: description, join date, country, subscriber text, lifetime view count, video count, avatar, banner, external links and verification badge — plus the keyword, page and rank that discovered it.",
            "default": true
          },
          "scrapeVideos": {
            "title": "🎬 Long-form videos",
            "type": "boolean",
            "description": "Emit one video row per upload from the Videos tab.",
            "default": true
          },
          "scrapeShorts": {
            "title": "📱 Shorts",
            "type": "boolean",
            "description": "Emit one short row per Short. Channels without a Shorts tab return no Shorts rows.",
            "default": true
          },
          "scrapeLiveStreams": {
            "title": "🔴 Live & past streams",
            "type": "boolean",
            "description": "Emit one livestream row per item on the Live tab. Channels without a Live tab return no livestream rows — YouTube silently serves the Home tab there, and this Actor detects that instead of mislabelling home videos as streams.",
            "default": true
          },
          "scrapePosts": {
            "title": "💬 Community posts",
            "type": "boolean",
            "description": "Emit one post row per community post, including image, poll and video attachments.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Apify Proxy is attached to every request the Actor makes. US residential is the most reliable option for YouTube; datacenter IPs are more likely to hit consent or bot interstitials.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}