curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"keyword":"cooking tutorials"}],"limit_per_input":null}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lk538t2k2p1k3oos71¬ify=false&include_errors=true&type=discover_new&discover_by=keyword"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lk538t2k2p1k3oos71",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "keyword",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [{"keyword": "cooking tutorials"}],
"limit_per_input": None,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lk538t2k2p1k3oos71",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "keyword",
});
const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: [{ keyword: "cooking tutorials" }],
limit_per_input: null,
}),
});
console.log(await response.text());
[
{
"url": "https://www.youtube.com/@channelname",
"handle": "@channelname",
"banner_img": "https://...",
"profile_image": "https://...",
"name": "Channel Name",
"subscribers": 299,
"Description": "Channel description...",
"videos_count": 21,
"created_date": "2024-11-25T00:00:00.000Z",
"views": 98723,
"Details": {"location": "United States"},
"Links": ["youtube.com/@channelname"],
"identifier": "UC...",
"id": "UC...",
"has_podcast": false,
"top_videos": [
{
"Image_url": "https://...",
"posted_time": "3 weeks ago",
"title": "Video Title",
"video_url": "https://www.youtube.com/watch?v=abc",
"views": 11
}
]
}
]
YouTube
按关键词发现 YouTube 频道
使用 Bright Data Scraper API 发现与搜索关键词匹配的 YouTube 频道。发送 POST /datasets/v3/scrape 请求,dataset_id 为 gd_lk538t2k2p1k3oos71。
POST
/
datasets
/
v3
/
scrape
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"keyword":"cooking tutorials"}],"limit_per_input":null}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lk538t2k2p1k3oos71¬ify=false&include_errors=true&type=discover_new&discover_by=keyword"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lk538t2k2p1k3oos71",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "keyword",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [{"keyword": "cooking tutorials"}],
"limit_per_input": None,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lk538t2k2p1k3oos71",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "keyword",
});
const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: [{ keyword: "cooking tutorials" }],
limit_per_input: null,
}),
});
console.log(await response.text());
[
{
"url": "https://www.youtube.com/@channelname",
"handle": "@channelname",
"banner_img": "https://...",
"profile_image": "https://...",
"name": "Channel Name",
"subscribers": 299,
"Description": "Channel description...",
"videos_count": 21,
"created_date": "2024-11-25T00:00:00.000Z",
"views": 98723,
"Details": {"location": "United States"},
"Links": ["youtube.com/@channelname"],
"identifier": "UC...",
"id": "UC...",
"has_podcast": false,
"top_videos": [
{
"Image_url": "https://...",
"posted_time": "3 weeks ago",
"title": "Video Title",
"video_url": "https://www.youtube.com/watch?v=abc",
"views": 11
}
]
}
]
查询参数
string
默认值:"gd_lk538t2k2p1k3oos71"
必填
用于此请求的数据集 ID。
必须设置为
gd_lk538t2k2p1k3oos71 以收集按关键词发现频道数据。string
默认值:"discover_new"
必须设置为
discover_new。string
默认值:"keyword"
必须设置为
keyword。boolean
默认值:false
请求完成时是否发送通知。
boolean
默认值:true
是否在响应中包含错误。
请求正文
object[]
必填
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"keyword":"cooking tutorials"}],"limit_per_input":null}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lk538t2k2p1k3oos71¬ify=false&include_errors=true&type=discover_new&discover_by=keyword"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lk538t2k2p1k3oos71",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "keyword",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [{"keyword": "cooking tutorials"}],
"limit_per_input": None,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lk538t2k2p1k3oos71",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "keyword",
});
const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: [{ keyword: "cooking tutorials" }],
limit_per_input: null,
}),
});
console.log(await response.text());
[
{
"url": "https://www.youtube.com/@channelname",
"handle": "@channelname",
"banner_img": "https://...",
"profile_image": "https://...",
"name": "Channel Name",
"subscribers": 299,
"Description": "Channel description...",
"videos_count": 21,
"created_date": "2024-11-25T00:00:00.000Z",
"views": 98723,
"Details": {"location": "United States"},
"Links": ["youtube.com/@channelname"],
"identifier": "UC...",
"id": "UC...",
"has_podcast": false,
"top_videos": [
{
"Image_url": "https://...",
"posted_time": "3 weeks ago",
"title": "Video Title",
"video_url": "https://www.youtube.com/watch?v=abc",
"views": 11
}
]
}
]
此页面对您有帮助吗?