{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel API — Videos, Shorts & Search",
    "description": "Scrape any YouTube channel's uploads as data: one row per video with title, view count, duration, publish date and thumbnail, plus a profile row with subscriber count, exact total views and join date. Also searches YouTube for videos, channels or playlists. Residential proxy included.",
    "version": "0.1",
    "x-build-id": "RhneGEagqZR8ZCG3z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insight.solutions~youtube-channel-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insight.solutions-youtube-channel-api",
        "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/insight.solutions~youtube-channel-api/runs": {
      "post": {
        "operationId": "runs-sync-insight.solutions-youtube-channel-api",
        "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/insight.solutions~youtube-channel-api/run-sync": {
      "post": {
        "operationId": "run-sync-insight.solutions-youtube-channel-api",
        "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": "YouTube channels",
            "type": "array",
            "description": "One entry per channel. A handle (`@TED`), a channel URL (`https://www.youtube.com/@TED`, with or without `/videos` on the end), a `/channel/UC…` URL, a legacy `/c/` or `/user/` URL, or a bare `UC…` channel ID. A bare word is read as a handle. `UC…` IDs skip the lookup request; everything else costs one extra request to resolve. Duplicates are read, and billed, once.",
            "items": {
              "type": "string"
            }
          },
          "tab": {
            "title": "Which uploads",
            "enum": [
              "videos",
              "shorts",
              "live"
            ],
            "type": "string",
            "description": "Which of the channel's three video tabs to read, newest first. `videos` is the ordinary upload grid. `shorts` is the Shorts grid — those rows carry a view count and a title but no duration and no date, because YouTube publishes none for a Short. `live` is the past-and-current streams tab, where the dates read \"Streamed 4 months ago\".",
            "default": "videos"
          },
          "maxVideosPerChannel": {
            "title": "Videos per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "How many uploads to return for each channel. YouTube serves the grid thirty at a time (about fifty for Shorts), so the walk stops on the page that reaches your number — you may get a few fewer than a round figure if the channel runs out of uploads first. Set 0 for the whole tab, which on a channel with thousands of uploads means a run bounded only by your time and charge budgets.",
            "default": 100
          },
          "includeChannelProfile": {
            "title": "Include the channel profile row",
            "type": "boolean",
            "description": "Write one `channel` row per channel before its videos: subscriber count, video count, exact lifetime view count, join date, country, description, keywords, avatar, banner and the uploader's own links. It costs one extra request — the About panel is a separate continuation — and it bills as one result row.",
            "default": true
          },
          "searchQueries": {
            "title": "YouTube search queries",
            "type": "array",
            "description": "Optional. One entry per search, exactly as you would type it into YouTube's own search box. Leave empty to run in channel mode only; fill both fields to do both in one run. Queries are deduped case-insensitively.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "What to search for",
            "enum": [
              "videos",
              "channels",
              "playlists"
            ],
            "type": "string",
            "description": "Which of YouTube's own result filters to apply. `videos` returns video rows, `channels` returns channel rows (title, handle, subscriber count, description snippet — YouTube publishes no video count on a channel result), `playlists` returns playlist rows. Only applies to `searchQueries`.",
            "default": "videos"
          },
          "uploadDate": {
            "title": "Upload date filter",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Restrict a video search to what was uploaded inside this window. This is YouTube's own filter, and like YouTube it applies to a video search only — it is ignored for channels and playlists, which have no such filter.",
            "default": "any"
          },
          "maxResultsPerQuery": {
            "title": "Results per query",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "How many results to return for each search query. YouTube serves twenty per page, so the walk stops on the page that reaches your number. Set 0 for everything YouTube will page through, which is far fewer than the `estimatedResults` figure it advertises.",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Channels and queries in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many channels or queries are walked at once. Each parallel worker keeps its own residential proxy session, so a target that gets blocked burns only its own exit IP. Pages *within* one target cannot be parallelised — each page hands over the token for the next — so this is the only lever on speed. Three is the balance that holds up in practice.",
            "default": 3
          },
          "maxRunSecs": {
            "title": "Maximum run time (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Wall-clock budget for the whole run. When it is reached the Actor stops walking, keeps and bills for every row it already wrote, and files a free diagnostic row for each entry it never reached. A channel stopped part-way keeps its rows and is not marked as failed. Nothing is charged for work that did not happen.",
            "default": 240
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "YouTube blocks datacenter IP ranges wholesale, which is why this Actor is built around Apify's residential proxy and why the proxy cost is already inside the per-row price. Leave this on the default. Sessions rotate automatically when an exit IP is refused. Clearing it sends requests from the run's own datacenter address, which YouTube will almost certainly block.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}