{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel 360 Intelligence — Bundle Scraper",
    "description": "The most comprehensive YouTube channel scraper on Apify. One run pulls videos, shorts, livestreams, playlists, community posts, and store products into one unified tidy-long dataset. Tab-aware gating skips empty endpoints. Built for influencer agencies, M&A diligence, and brand safety.",
    "version": "1.0",
    "x-build-id": "o2KASJdemZbbuy9rr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~youtube-channel-360-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-youtube-channel-360-intelligence",
        "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/sian.agency~youtube-channel-360-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-youtube-channel-360-intelligence",
        "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/sian.agency~youtube-channel-360-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-youtube-channel-360-intelligence",
        "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": {
          "channel": {
            "title": "📺 Channel (single)",
            "type": "string",
            "description": "One channel to scrape. Accepts ANY of:\n- Channel ID (`UCBJycsmduvYEL83R_U4JriQ` — fastest, skips resolution).\n- Handle (`@mkbhd` or `mkbhd`).\n- Full URL (`https://www.youtube.com/@mkbhd`, `/channel/UC...`, `/c/CustomName`).\n\nUse `channels` below for batch scans. One of `channel` or `channels` is required."
          },
          "channels": {
            "title": "📺 Channels (batch — comma or newline separated)",
            "type": "string",
            "description": "Optional — for batch scans. Comma-separated OR newline-separated list of channel IDs, handles, or URLs (same formats as `channel`). Each channel runs the full bundle independently and tags every row with its source channel. Max 50 channels per run. Overrides `channel` when set.\n\nExample (one per line):\n```\n@mkbhd\nUCX6OQ3DkcsbYNE6H8uQQuVA\nhttps://www.youtube.com/@veritasium\n```"
          },
          "includeEndpoints": {
            "title": "🎯 Endpoints to fetch",
            "uniqueItems": true,
            "type": "array",
            "description": "Pick which channel tabs to scrape. **Defaults to all 9** — leave empty to fetch the full bundle. Endpoints not on the channel's tabs (per the about-row `tabs` field) are silently skipped — you are NEVER charged for empty endpoint pulls. The about endpoint always runs (the snapshot is the bundle's anchor row).",
            "items": {
              "type": "string",
              "enum": [
                "about",
                "home",
                "videos",
                "shorts",
                "liveStreams",
                "playlists",
                "community",
                "store",
                "search"
              ]
            },
            "default": [
              "about",
              "home",
              "videos",
              "shorts",
              "liveStreams",
              "playlists",
              "community",
              "store"
            ]
          },
          "maxPagesPerEndpoint": {
            "title": "📄 Max pages per endpoint",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Max paginated pages to fetch per endpoint that supports pagination (videos, shorts, community, search). Each page returns ~30 rows (videos), ~48 (shorts), ~8 (community posts). Set to `1` for cheap sampling of recent content, `2-3` for a deeper crawl, `10` for full historical (capped). The about/playlists/liveStreams/store endpoints are single-page.",
            "default": 1
          },
          "searchQuery": {
            "title": "🔍 Search query (optional)",
            "type": "string",
            "description": "Optional. Only used when `search` is included in `includeEndpoints`. Searches within each channel for videos matching this query — useful for finding 'iPhone reviews from this channel'. Each match becomes a `channel-search-row` in the output dataset. Leave empty to skip the search endpoint even if it's in `includeEndpoints`."
          },
          "lang": {
            "title": "🗣 Language (optional)",
            "type": "string",
            "description": "Optional language code (e.g. `en`, `es`, `ja`, `pt`) to localize result language. Forwards as the `lang` param to YouTube's response shaping."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}