{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel Scraper - Videos & Shorts",
    "description": "Scrape any YouTube channel: videos, Shorts, live streams, playlists, community posts and channel metadata, with exact publish dates and view counts. Need transcripts or comments? Use the Video Scraper. Need keyword rankings? Use the Search Scraper.",
    "version": "0.1",
    "x-build-id": "JhVlYQUU5xoZu5bRW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tubelens~youtube-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tubelens-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/tubelens~youtube-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tubelens-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/tubelens~youtube-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tubelens-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": {
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "YouTube channels to scrape. Accepts @handles, channel URLs, or UC channel IDs. Paste one per line.",
            "items": {
              "type": "string"
            }
          },
          "searchKeyword": {
            "title": "Or find channels by keyword",
            "type": "string",
            "description": "Search YouTube for channels matching this keyword instead of listing them above. Ignored when Channels is set."
          },
          "maxChannelsFromSearch": {
            "title": "Max channels from search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many channels to take from the keyword search.",
            "default": 10
          },
          "maxVideos": {
            "title": "Max videos per channel",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Long-form videos to RETURN per channel, newest first. With a date filter set, the actor pages back looking for matches until it has this many or reaches its search budget, then reports a partial result. Set 0 to skip videos.",
            "default": 50
          },
          "maxShorts": {
            "title": "Max Shorts per channel",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Shorts to RETURN per channel, newest first. With a date filter set, the actor pages back looking for matches until it has this many or reaches its search budget, then reports a partial result. Set 0 to skip Shorts.",
            "default": 0
          },
          "maxLiveStreams": {
            "title": "Max live streams per channel",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Past and current live streams to collect per channel. Set 0 to skip.",
            "default": 0
          },
          "maxPlaylists": {
            "title": "Max playlists per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Public playlists to collect per channel. Set 0 to skip.",
            "default": 0
          },
          "maxCommunityPosts": {
            "title": "Max community posts per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Community tab posts to collect per channel, including polls and images. Set 0 to skip.",
            "default": 0
          },
          "enrichVideos": {
            "title": "Enrich every video with full stats",
            "type": "boolean",
            "description": "Adds description, tags, category, exact view count and the exact publish timestamp to every video. Channel listings only carry rounded view counts and a relative date such as '3 days ago', so this is the only way to get precise numbers. Costs one small extra request per video, with no extra charge per row.",
            "default": false
          },
          "includeLikeCount": {
            "title": "Also fetch like counts",
            "type": "boolean",
            "description": "Adds the like count to every video. YouTube only exposes likes on a payload about 70 times larger than the one used for the other enrichment fields, so this makes runs noticeably slower. Requires the enrichment option above.",
            "default": false
          },
          "includeDerivedAnalytics": {
            "title": "Add derived channel analytics",
            "type": "boolean",
            "description": "Adds upload cadence, median views and engagement rates to the channel row. Needs at least 10 videos collected from that channel.",
            "default": false
          },
          "publishedAfter": {
            "title": "Published after",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\d+\\s*days?)$",
            "type": "string",
            "description": "Keep only videos published after this date. Accepts YYYY-MM-DD or a relative value such as '30 days'. Both bounds include the named day, and enrichment is enabled automatically so the cutoff is exact."
          },
          "publishedBefore": {
            "title": "Published before",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\d+\\s*days?)$",
            "type": "string",
            "description": "Keep only videos published before this date. Accepts YYYY-MM-DD or a relative value such as '30 days'. Both bounds include the named day, and enrichment is enabled automatically so the cutoff is exact."
          },
          "country": {
            "title": "Country",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "IN",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "PL",
              "BR",
              "MX",
              "TR",
              "JP",
              "KR",
              "ID",
              "PH",
              "NG",
              "ZA"
            ],
            "type": "string",
            "description": "Country used for YouTube's regional catalogue. Metadata text is always returned in English so numbers and dates parse reliably; video titles and descriptions are the creator's own text either way.",
            "default": "US"
          },
          "concurrency": {
            "title": "Channels in parallel",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many channels to process at the same time. Raise it for large channel lists.",
            "default": 5
          },
          "maxRunSeconds": {
            "title": "Time budget (seconds)",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "The run stops cleanly and keeps everything collected so far once this is reached, rather than being killed mid-write.",
            "default": 3300
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Datacenter proxy is used by default and is enough for YouTube. Residential is used automatically only if a datacenter address gets blocked.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}