scraping-youtube-channel-info
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseScraping Youtube Channel Info
抓取YouTube频道信息
Raw data collection. No assumed use case — returns the full dataset for downstream analysis.
原始数据采集,不预设使用场景——返回完整数据集供下游分析使用。
Inputs
输入参数
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| array | Optional | | YouTube channel URLs |
| array | Optional | | YouTube handles (e.g. |
| array | Optional | | Search keywords to find channels |
| string | Optional | | Country code (e.g. |
| string | Optional | | Language code (e.g. |
| string | Optional | | Sort order |
| number | Optional | Unlimited | Maximum channels to return |
| string | Optional | — | JavaScript function to transform each output object |
| 参数 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| 数组 | 可选 | | YouTube频道URL |
| 数组 | 可选 | | YouTube账号标识(例如 |
| 数组 | 可选 | | 用于查找频道的搜索关键词 |
| 字符串 | 可选 | | 国家代码(例如 |
| 字符串 | 可选 | | 语言代码(例如 |
| 字符串 | 可选 | | 排序方式 |
| 数字 | 可选 | 无限制 | 返回的最大频道数量 |
| 字符串 | 可选 | — | 用于转换每个输出对象的JavaScript函数 |
How to Run
运行方式
Using run_actor.js (recommended)
使用run_actor.js(推荐)
bash
undefinedbash
undefinedQuick answer (table)
Quick answer (table)
node scripts/run_actor.js --actor "apidojo~youtube-channel-scraper" --input '{"keywords": ["cooking channel"], "gl": "us", "maxItems": 20}'
node scripts/run_actor.js --actor "apidojo~youtube-channel-scraper" --input '{"keywords": ["cooking channel"], "gl": "us", "maxItems": 20}'
Save as CSV
Save as CSV
node scripts/run_actor.js --actor "apidojo~youtube-channel-scraper" --input '{"keywords": ["cooking channel"], "gl": "us", "maxItems": 20}' --output results.csv --format csv
node scripts/run_actor.js --actor "apidojo~youtube-channel-scraper" --input '{"keywords": ["cooking channel"], "gl": "us", "maxItems": 20}' --output results.csv --format csv
Save as JSON
Save as JSON
node scripts/run_actor.js --actor "apidojo~youtube-channel-scraper" --input '{"keywords": ["cooking channel"], "gl": "us", "maxItems": 20}' --output results.json --format json
undefinednode scripts/run_actor.js --actor "apidojo~youtube-channel-scraper" --input '{"keywords": ["cooking channel"], "gl": "us", "maxItems": 20}' --output results.json --format json
undefinedREST API fallback
备用REST API方式
bash
curl -X POST "https://api.apify.com/v2/acts/apidojo~youtube-channel-scraper/runs" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keywords": ["cooking channel"], "gl": "us", "maxItems": 20}'If Apify MCP is available:
Use the Apify MCP tool with actor and the input above.
call_actorapidojo~youtube-channel-scraperbash
curl -X POST "https://api.apify.com/v2/acts/apidojo~youtube-channel-scraper/runs" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keywords": ["cooking channel"], "gl": "us", "maxItems": 20}'若Apify MCP可用:
使用Apify MCP的工具,指定actor为并传入上述输入参数。
call_actorapidojo~youtube-channel-scraperOutput Fields
输出字段
| Field | Type | Description |
|---|---|---|
| string | YouTube channel ID |
| string | Channel name |
| string | Channel URL |
| string | Channel description |
| number | Subscriber count |
| number | Total videos published |
| array | Channel thumbnails |
| boolean | Verification badge |
| boolean | Family-safe flag |
| array | Channel keywords |
| array | Countries where available |
| array | Channel tags |
| 字段 | 类型 | 描述 |
|---|---|---|
| 字符串 | YouTube频道ID |
| 字符串 | 频道名称 |
| 字符串 | 频道URL |
| 字符串 | 频道描述 |
| 数字 | 订阅人数 |
| 数字 | 已发布视频总数 |
| 数组 | 频道缩略图 |
| 布尔值 | 是否拥有认证标识 |
| 布尔值 | 是否适合家庭观看标识 |
| 数组 | 频道关键词 |
| 数组 | 可访问的国家/地区 |
| 数组 | 频道标签 |
Edge Cases
边缘情况
- Channel not found: Check if handle is correct or try with URL instead.
- subscriberCount as text: Field returns '1.2M subscribers' not a number — parse downstream if needed.
- No keywords in metadata: Some channels don't set keywords — tags array will be empty.
- Private/terminated channel: Returns no results for that channel.
- 频道未找到:检查账号标识是否正确,或尝试使用URL进行查询。
- subscriberCount为文本格式:该字段返回'1.2M subscribers'而非数字——如需数值可在下游进行解析。
- 元数据中无关键词:部分频道未设置关键词——此时tags数组为空。
- 私密/已终止频道:该频道不会返回任何结果。