scraping-youtube-channel-info

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scraping Youtube Channel Info

抓取YouTube频道信息

Raw data collection. No assumed use case — returns the full dataset for downstream analysis.

原始数据采集,不预设使用场景——返回完整数据集供下游分析使用。

Inputs

输入参数

ParameterTypeRequiredDefaultNotes
startUrls
arrayOptional
[]
YouTube channel URLs
youtubeHandles
arrayOptional
[]
YouTube handles (e.g.
@kurzgesagt
)
keywords
arrayOptional
[]
Search keywords to find channels
gl
stringOptional
us
Country code (e.g.
US
)
hl
stringOptional
en
Language code (e.g.
en
)
sort
stringOptional
r
Sort order
maxItems
numberOptionalUnlimitedMaximum channels to return
customMapFunction
stringOptionalJavaScript function to transform each output object
参数类型是否必填默认值说明
startUrls
数组可选
[]
YouTube频道URL
youtubeHandles
数组可选
[]
YouTube账号标识(例如
@kurzgesagt
keywords
数组可选
[]
用于查找频道的搜索关键词
gl
字符串可选
us
国家代码(例如
US
hl
字符串可选
en
语言代码(例如
en
sort
字符串可选
r
排序方式
maxItems
数字可选无限制返回的最大频道数量
customMapFunction
字符串可选用于转换每个输出对象的JavaScript函数

How to Run

运行方式

Using run_actor.js (recommended)

使用run_actor.js(推荐)

bash
undefined
bash
undefined

Quick 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
undefined
node scripts/run_actor.js --actor "apidojo~youtube-channel-scraper" --input '{"keywords": ["cooking channel"], "gl": "us", "maxItems": 20}' --output results.json --format json
undefined

REST 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
call_actor
tool with actor
apidojo~youtube-channel-scraper
and the input above.

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}'
若Apify MCP可用: 使用Apify MCP的
call_actor
工具,指定actor为
apidojo~youtube-channel-scraper
并传入上述输入参数。

Output Fields

输出字段

FieldTypeDescription
id
stringYouTube channel ID
name
stringChannel name
url
stringChannel URL
description
stringChannel description
subscriberCount
numberSubscriber count
videosCount
numberTotal videos published
thumbnails
arrayChannel thumbnails
isVerified
booleanVerification badge
isFamilySafe
booleanFamily-safe flag
keywords
arrayChannel keywords
availableCountries
arrayCountries where available
tags
arrayChannel tags
字段类型描述
id
字符串YouTube频道ID
name
字符串频道名称
url
字符串频道URL
description
字符串频道描述
subscriberCount
数字订阅人数
videosCount
数字已发布视频总数
thumbnails
数组频道缩略图
isVerified
布尔值是否拥有认证标识
isFamilySafe
布尔值是否适合家庭观看标识
keywords
数组频道关键词
availableCountries
数组可访问的国家/地区
tags
数组频道标签

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数组为空。
  • 私密/已终止频道:该频道不会返回任何结果。