# YouTube Channel Scraper

Instantly collect structured data from YouTube channels — including video titles, URLs, view counts, durations, and more — using a ready-to-run scraper template. No coding skills are required.

- Template page: [https://www.octoparse.com/template/youtube-channel-scraper](https://www.octoparse.com/template/youtube-channel-scraper)
- Categories: Social Media
- Status: `PUBLISHED`
- Run mode: `CLOUD`

## Pricing

Current price: **$0.2/1,000 lines**. Billing is based on output rows; an Octoparse subscription may be required.

## What is an Octoparse template?

An Octoparse template is a ready-to-use scraping workflow with predefined inputs and structured outputs. Use the exact parameter keys below; do not invent parameters.

## Overview

This ready-to-use template collects structured data from listing pages.

## Output

The current workflow extracts 31 fields, including `Video_title`, `Video_author`, `Video_URL`, `Video_publish_time`, `Video_view_count`, `Video_length`, `Video_cover_URL`, `Video_video_id`, `Short_author`, `Short_title`, `Short_URL`, `Short_view_count`, `Short_cover_url`, `Live_title`, `Live_author`, `Live_URL`, `Live_streamed_time`, `Live_view_count`, `Live_length`, `Live_cover_URL`, `Live_id`, `Podcast_collection_name`, `Podcast_collection_episode_count`, `Podcast_collection_update_time`, `Podcast_collection_description`, `Post_content`, `Post_image_URL`, `Post_video_URL`, `Post_time`, `Post_like_count`, `Post_comment_count`.

## Use Cases

- Use structured results for research, comparison, and monitoring.
- Collect rows without building the extraction workflow from scratch.
- Combine results with other templates for downstream enrichment.
- Review a representative result before starting a large batch.

## Why Octoparse

- **No coding required:** complete Usernames to Scrape, Sort Posts By, Stop Extraction At (End Date)（If the Tab is shorts don't fill in here） and start the template in cloud mode.
- **Flexible export:** review and export results as CSV, Excel, or JSON.

## Input

### Usernames to Scrape

Required. Enter one or multiple user handles. Supports up to 100,000 entries per run (one per line). Constraints: minItems=1; maxItems=100000; items.minLength=1; items.maxLength=1000.

### Sort Posts By

Required. Choose whether to extract posts starting from the latest or the oldest content available. Constraints: minLength=1; maxLength=10. Callable values are the `const` keys in JSON `oneOf`, not the option titles.

### Stop Extraction At (End Date)（If the Tab is shorts don't fill in here）

Optional. Set an end date to stop the extraction. Leave blank to fetch all available posts based on your sort order. Constraints: maxLength=10.

### Tab

Required. Tab Constraints: minLength=1; maxLength=10. Callable values are the `const` keys in JSON `oneOf`, not the option titles.

## How to Use

# YouTube Channel Scraper

Octoparse's template collects structured public data from YouTube channel tabs. It supports `videos`, `shorts`, `live`, `podcasts`, `playlists`, and `posts`. Submit one or multiple channel handles.

## Pricing
**$0.2 / 1,000 lines**. Billing is based on the number of output lines produced by the task.

## Input
- **Usernames to Scrape** (Required) — One or multiple YouTube channel handles. Up to **100,000** entries per run, one per line.
- **Sort Posts By** (Required) — `latest` or `oldest`.
- **Stop Extraction At (End Date)（If the Tab is shorts don't fill in here）** (Optional) — Date in `YYYY-MM-DD` format. Leave blank when **Tab** is `shorts`.
- **Tab** (Required) — `videos`, `shorts`, `live`, `podcasts`, `playlists`, or `posts`.

## How to Use
1. Open the template and start a new task.
2. Enter handles in **Usernames to Scrape**.
3. Select **Tab**.
4. Set **Sort Posts By** to `latest` or `oldest`.
5. If needed, enter **Stop Extraction At (End Date)（If the Tab is shorts don't fill in here）** in `YYYY-MM-DD`.
6. Run the task and review **Data Preview** and collected rows.
7. Export results.

## Output Notes
Choose one tab per task to collect the corresponding fields. Fields can be empty when YouTube does not provide a value. Playlist collection and item output use `Podcast_*` field names because both playlist and podcast tabs return collection metadata and video-list items. Publish-time and view-count values may appear as YouTube display text such as `4 months ago` or `436 views`.

## Limitations
- Collects public YouTube channel content exposed through the selected tab.
- Different tasks populate different fields based on tab content.
- Leave the end-date field blank when **Tab** is `shorts`.
- Focuses on channel-tab content metadata, not transcript extraction or comment-thread collection.

## Tips
- Use clean channel handles such as `@channelname` when possible.
- Run one **Tab** per task so exports are easier to review.
- Use `videos` for standard uploads, `shorts` for short-form content, and `posts` for community-post monitoring.
- Start with a small sample before launching a large multi-channel batch.
- For several tabs, run the template once per tab and combine exported datasets.
- For comments or transcripts, use a dedicated YouTube template.

## Use Cases
- **Competitor analysis:** Submit competitor handles, compare publishing activity and view-count text, and review in a spreadsheet. See [social media competitor analysis guide](https://www.octoparse.com/blog/how-to-do-a-social-media-competitor-analysis-4-methods-compared).
- **Creator and influencer research:** Collect publishing history and public content metadata.
- **Content planning and trend research:** Analyze videos and Shorts for recurring topics, formats, and content gaps.
- **Social media monitoring:** Use scheduled runs to capture new uploads, Shorts, community posts, and live events.
- **AI-powered workflows:** Move exported CSV or JSON into an AI workflow for topic classification, summaries, pattern analysis, or activity alerts. See [AI scraping use cases with Octoparse MCP](https://www.octoparse.com/blog/ai-scraping-use-cases-with-mcp).

## Automation
Scheduled collection, structured exports, OpenAPI workflows, and the [AgentTools API](https://www.octoparse.com/docs/en/api-reference/agenttools-api/search-templates) are supported.

## Limitations

Results depend on what the source site exposes at run time. Fields may be empty when a source page does not provide a value. The template enforces the input limits shown above.

## Tips

Use specific, valid inputs and review a representative result before starting a large batch. Remove duplicate inputs when repeated records are not needed.

## FAQ

### What do I need to enter?

Use the exact inputs and limits listed above.

### What data does this template return?

See Output Schema below; availability can vary by source record.

### How is usage billed?

See the Pricing section above for current pricing and billing details.

## Related Templates

- [YouTube Channel Scraper (Free)](https://www.octoparse.com/template/youtube-channel-scraper-free)
- [YouTube Video List Scraper](https://www.octoparse.com/template/youtube-video-list-scraper)
- [YouTube Details & Comments Scraper (Free)](https://www.octoparse.com/template/youtube-details-comments-scraper-free)
- [YouTube Community Scraper](https://www.octoparse.com/template/youtube-community-scraper)

## Input Schema

```json
{
  "title": "YouTube Channel Scraper input",
  "description": "Input parameters configured for the current published template version.",
  "type": "object",
  "schemaVersion": 1,
  "additionalProperties": false,
  "properties": {
    "usernames_to_Scrape": {
      "title": "Usernames to Scrape",
      "description": "Enter one or multiple user handles. Supports up to 100,000 entries per run (one per line).",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1000
      },
      "minItems": 1,
      "maxItems": 100000,
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "sort_Posts_By": {
      "title": "Sort Posts By",
      "description": "Choose whether to extract posts starting from the latest or the oldest content available.",
      "type": "string",
      "minLength": 1,
      "maxLength": 10,
      "oneOf": [
        {
          "title": "latest",
          "const": "latest"
        },
        {
          "title": "oldest",
          "const": "oldest"
        }
      ],
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "stop_Extraction_At": {
      "title": "Stop Extraction At (End Date)（If the Tab is shorts don't fill in here）",
      "description": "Set an end date to stop the extraction. Leave blank to fetch all available posts based on your sort order.",
      "type": "string",
      "maxLength": 10,
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "tab": {
      "title": "Tab",
      "description": "Tab",
      "type": "string",
      "minLength": 1,
      "maxLength": 10,
      "oneOf": [
        {
          "title": "videos",
          "const": "videos"
        },
        {
          "title": "shorts",
          "const": "shorts"
        },
        {
          "title": "live",
          "const": "live"
        },
        {
          "title": "podcasts",
          "const": "podcasts"
        },
        {
          "title": "playlists",
          "const": "playlists"
        },
        {
          "title": "posts",
          "const": "posts"
        }
      ],
      "x-octoparse": {
        "apiEnabled": true
      }
    }
  },
  "required": [
    "usernames_to_Scrape",
    "sort_Posts_By",
    "tab"
  ]
}
```

## Input JSON Example

Example 1

```json
{
  "sort_Posts_By": "latest",
  "tab": "shorts",
  "usernames_to_Scrape": [
    "@WeisWay"
  ]
}
```

Example 2

```json
{
  "sort_Posts_By": "latest",
  "stop_Extraction_At": "2026-11-18",
  "tab": "videos",
  "usernames_to_Scrape": [
    "@BrightData"
  ]
}
```

Example 3

```json
{
  "sort_Posts_By": "latest",
  "stop_Extraction_At": "2026-11-18",
  "tab": "videos",
  "usernames_to_Scrape": [
    "@zytedata"
  ]
}
```

Example 4

```json
{
  "sort_Posts_By": "oldest",
  "tab": "videos",
  "usernames_to_Scrape": [
    "@Octoparsewebscraping",
    "@OpenAI"
  ]
}
```

Example 5

```json
{
  "sort_Posts_By": "latest",
  "stop_Extraction_At": "2026-11-17",
  "tab": "shorts",
  "usernames_to_Scrape": [
    "@Bright data",
    "@Oxylabs",
    "@ParseHub",
    "@Firecrawl",
    "@Zyte"
  ]
}
```


## Output Schema

```json
{
  "schemaVersion": 1,
  "type": "object",
  "properties": {
    "Video_title": {
      "type": "string",
      "description": ""
    },
    "Video_author": {
      "type": "string",
      "description": ""
    },
    "Video_URL": {
      "type": "string",
      "description": ""
    },
    "Video_publish_time": {
      "type": "string",
      "description": ""
    },
    "Video_view_count": {
      "type": "string",
      "description": ""
    },
    "Video_length": {
      "type": "string",
      "description": ""
    },
    "Video_cover_URL": {
      "type": "string",
      "description": ""
    },
    "Video_video_id": {
      "type": "string",
      "description": ""
    },
    "Short_author": {
      "type": "string",
      "description": ""
    },
    "Short_title": {
      "type": "string",
      "description": ""
    },
    "Short_URL": {
      "type": "string",
      "description": ""
    },
    "Short_view_count": {
      "type": "string",
      "description": ""
    },
    "Short_cover_url": {
      "type": "string",
      "description": ""
    },
    "Live_title": {
      "type": "string",
      "description": ""
    },
    "Live_author": {
      "type": "string",
      "description": ""
    },
    "Live_URL": {
      "type": "string",
      "description": ""
    },
    "Live_streamed_time": {
      "type": "string",
      "description": ""
    },
    "Live_view_count": {
      "type": "string",
      "description": ""
    },
    "Live_length": {
      "type": "string",
      "description": ""
    },
    "Live_cover_URL": {
      "type": "string",
      "description": ""
    },
    "Live_id": {
      "type": "string",
      "description": ""
    },
    "Podcast_collection_name": {
      "type": "string",
      "description": ""
    },
    "Podcast_collection_episode_count": {
      "type": "string",
      "description": ""
    },
    "Podcast_collection_update_time": {
      "type": "string",
      "description": ""
    },
    "Podcast_collection_description": {
      "type": "string",
      "description": ""
    },
    "Post_content": {
      "type": "string",
      "description": ""
    },
    "Post_image_URL": {
      "type": "string",
      "description": ""
    },
    "Post_video_URL": {
      "type": "string",
      "description": ""
    },
    "Post_time": {
      "type": "string",
      "description": ""
    },
    "Post_like_count": {
      "type": "string",
      "description": ""
    },
    "Post_comment_count": {
      "type": "string",
      "description": ""
    }
  },
  "title": "YouTube Channel Scraper output",
  "description": "Initial output fields derived from the current published implementation. Field descriptions are maintained by Data Center; production field names and types should be refreshed from recent successful runs.",
  "additionalProperties": false
}
```

## Output Example

Example 1

```json
{
  "Short_author": "@WeisWay",
  "Short_title": "這個男人白天超爛、晚上變大師？| 維思維",
  "Short_URL": "https://www.youtube.com/shorts/KgGf-x3Sn30",
  "Short_view_count": "130K views",
  "Short_cover_url": "https://i.ytimg.com/vi/KgGf-x3Sn30/oar1.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLBnU5uPUf-f_XaprwO5CfwAQasP3A"
}
```

Example 2

```json
{
  "Video_title": "Consented/Responsible Networks vs. Malicious/Non-consented.",
  "Video_author": "@BrightData",
  "Video_URL": "https://www.youtube.com/watch?v=oTenx1YL4yc",
  "Video_publish_time": "2 weeks ago",
  "Video_view_count": "195 views",
  "Video_length": "4:16",
  "Video_cover_URL": "https://i.ytimg.com/vi/oTenx1YL4yc/hq720.jpg?sqp=-oaymwEgCNAFEJQDSFXyq4qpAxIIARUAAIhCGAFwAcABBrgC8xg=&rs=AOn4CLBsia6PGz33GG7mFB_uWfCJHI7OEg",
  "Video_video_id": "oTenx1YL4yc"
}
```

Example 3

```json
{
  "Video_title": "My simple self healing web scraping agent",
  "Video_author": "@zytedata",
  "Video_URL": "https://www.youtube.com/watch?v=C1-Vdg7d-bE",
  "Video_publish_time": "13 days ago",
  "Video_view_count": "109 views",
  "Video_length": "11:21",
  "Video_cover_URL": "https://i.ytimg.com/vi/C1-Vdg7d-bE/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDM7AcmTVScMdlFkq-4tYEWgFfI1g",
  "Video_video_id": "C1-Vdg7d-bE"
}
```

Example 4

```json
{
  "Video_title": "Extract Data from Airbnb",
  "Video_author": "@Octoparsewebscraping",
  "Video_URL": "https://www.youtube.com/watch?v=EOtjDX90sWw",
  "Video_publish_time": "10 years ago",
  "Video_view_count": "12K views",
  "Video_length": "3:08",
  "Video_cover_URL": "https://i.ytimg.com/vi/EOtjDX90sWw/hq720.jpg?sqp=-oaymwEnCNAFEJQDSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLDv32f6zt6W5BOzMI5cgk98zojdVQ",
  "Video_video_id": "EOtjDX90sWw"
}
```

Example 5

```json
{
  "Short_title": "Why some TikToks get millions of views",
  "Short_URL": "https://www.youtube.com/shorts/NKkix5733og",
  "Short_view_count": "525 views",
  "Short_cover_url": "https://i.ytimg.com/vi/NKkix5733og/oar1.jpg?sqp=-oaymwEoCJUDENAFSFqQAgHyq4qpAxcIARUAAIhC2AEB4gEKCBgQAhgGOAFAAQ==&rs=AOn4CLBweO5NLlLYZj-g5FE8Ub-8MNNPbw"
}
```

## API

`POST https://openapi.octoparse.com/api/agentTools/executeTask`

This is the OpenAPI Agent Tools `executeTask` endpoint. Authenticate with a Bearer token.

Request body:

`templateName` is the template slug; `parameters` is a JSON object string whose keys match Input Schema; `taskName`, `idempotencyKey`, and `maxCollectedRows` are optional.

Obtain a token:

```http
POST https://openapi.octoparse.com/token
Content-Type: application/json

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "grant_type": "password"
}
```

Use `data.access_token` as `Authorization: Bearer <token>`. After starting, poll `getTaskStatus` and export with `exportData`.

```json
{
  "templateName": "youtube-channel-scraper",
  "taskName": "YouTube Channel Scraper",
  "parameters": "{\"sort_Posts_By\":\"latest\",\"tab\":\"shorts\",\"usernames_to_Scrape\":[\"@WeisWay\"]}"
}
```

## Python Example

```python
import json
import requests

OPENAPI_BASE = "https://openapi.octoparse.com"
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"

parameters = json.loads("{\"sort_Posts_By\":\"latest\",\"tab\":\"shorts\",\"usernames_to_Scrape\":[\"@WeisWay\"]}")

response = requests.post(
    f"{OPENAPI_BASE}/api/agentTools/executeTask",
    headers={
        "Authorization": f"Bearer {ACCESS_TOKEN}",
        "Content-Type": "application/json",
    },
    json={
        "templateName": "youtube-channel-scraper",
        "taskName": "YouTube Channel Scraper",
        "parameters": json.dumps(parameters, ensure_ascii=False),
    },
    timeout=60,
)
print(response.status_code)
print(response.json())
```

## HTTP/cURL Example

```bash
curl -X POST "https://openapi.octoparse.com/api/agentTools/executeTask" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "templateName": "youtube-channel-scraper",
  "taskName": "YouTube Channel Scraper",
  "parameters": "{\"sort_Posts_By\":\"latest\",\"tab\":\"shorts\",\"usernames_to_Scrape\":[\"@WeisWay\"]}"
}
JSON
```

## MCP Setup

Connect an MCP-compatible AI client to `https://mcp.octoparse.com` using browser OAuth or an Octoparse API key. Find `youtube-channel-scraper`, inspect its inputs, create a cloud task with the exact Input Schema keys, and export JSON results.

## Machine-readable Resources

- [Template contract](https://www.octoparse.com/templates/youtube-channel-scraper.json)
- [Manifest](https://www.octoparse.com/templates/youtube-channel-scraper-manifest.json)
