curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"url":"https://www.tiktok.com/@mrbeast","num_of_posts":10,"start_date":"01-01-2025","end_date":"03-01-2025"}],"limit_per_input":null}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lu702nij2f790tmv9h¬ify=false&include_errors=true&type=discover_new&discover_by=profile_url"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lu702nij2f790tmv9h",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "profile_url",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [
{
"url": "https://www.tiktok.com/@mrbeast",
"num_of_posts": 10,
"start_date": "01-01-2025",
"end_date": "03-01-2025",
},
],
"limit_per_input": None,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lu702nij2f790tmv9h",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "profile_url",
});
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: [
{
url: "https://www.tiktok.com/@mrbeast",
num_of_posts: 10,
start_date: "01-01-2025",
end_date: "03-01-2025",
},
],
limit_per_input: null,
}),
});
console.log(await response.text());
[
{
"post_id": "7553300000000000000",
"description": "You won't believe what happened next #challenge",
"create_time": "2025-01-20T18:00:00.000Z",
"share_count": 120000,
"collect_count": 45000,
"comment_count": 32000,
"play_count": 85000000,
"video_duration": 120,
"hashtags": [
"#challenge"
],
"video_url": "https://v16-webapp-prime.tiktok.com/video/example.mp4",
"profile_username": "examplecreator",
"profile_url": "https://www.tiktok.com/@examplecreator",
"is_verified": true
}
]
TikTok
按个人资料 URL 发现 TikTok 帖子
使用 Bright Data Scraper API 按个人资料 URL 发现 TikTok 帖子。发送 POST /datasets/v3/scrape 请求,dataset_id 为 gd_lu702nij2f790tmv9h。
POST
/
datasets
/
v3
/
scrape
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"url":"https://www.tiktok.com/@mrbeast","num_of_posts":10,"start_date":"01-01-2025","end_date":"03-01-2025"}],"limit_per_input":null}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lu702nij2f790tmv9h¬ify=false&include_errors=true&type=discover_new&discover_by=profile_url"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lu702nij2f790tmv9h",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "profile_url",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [
{
"url": "https://www.tiktok.com/@mrbeast",
"num_of_posts": 10,
"start_date": "01-01-2025",
"end_date": "03-01-2025",
},
],
"limit_per_input": None,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lu702nij2f790tmv9h",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "profile_url",
});
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: [
{
url: "https://www.tiktok.com/@mrbeast",
num_of_posts: 10,
start_date: "01-01-2025",
end_date: "03-01-2025",
},
],
limit_per_input: null,
}),
});
console.log(await response.text());
[
{
"post_id": "7553300000000000000",
"description": "You won't believe what happened next #challenge",
"create_time": "2025-01-20T18:00:00.000Z",
"share_count": 120000,
"collect_count": 45000,
"comment_count": 32000,
"play_count": 85000000,
"video_duration": 120,
"hashtags": [
"#challenge"
],
"video_url": "https://v16-webapp-prime.tiktok.com/video/example.mp4",
"profile_username": "examplecreator",
"profile_url": "https://www.tiktok.com/@examplecreator",
"is_verified": true
}
]
查询参数
string
默认值:"gd_lu702nij2f790tmv9h"
必填
用于此请求的数据集 ID。
必须设置为
gd_lu702nij2f790tmv9h 以收集通过资料 URL 发现数据。string
默认值:"discover_new"
必须设置为
discover_new。string
默认值:"profile_url"
必须设置为
profile_url。boolean
默认值:false
请求完成时是否发送通知。
boolean
默认值:true
是否在响应中包含错误。
请求正文
object[]
必填
输入对象的数组。
显示 properties
显示 properties
示例
{
"input": [
{
"url": "https://www.tiktok.com/@mrbeast",
"num_of_posts": 10,
"start_date": "01-01-2025",
"end_date": "03-01-2025"
}
]
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"url":"https://www.tiktok.com/@mrbeast","num_of_posts":10,"start_date":"01-01-2025","end_date":"03-01-2025"}],"limit_per_input":null}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lu702nij2f790tmv9h¬ify=false&include_errors=true&type=discover_new&discover_by=profile_url"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lu702nij2f790tmv9h",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "profile_url",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [
{
"url": "https://www.tiktok.com/@mrbeast",
"num_of_posts": 10,
"start_date": "01-01-2025",
"end_date": "03-01-2025",
},
],
"limit_per_input": None,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lu702nij2f790tmv9h",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "profile_url",
});
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: [
{
url: "https://www.tiktok.com/@mrbeast",
num_of_posts: 10,
start_date: "01-01-2025",
end_date: "03-01-2025",
},
],
limit_per_input: null,
}),
});
console.log(await response.text());
[
{
"post_id": "7553300000000000000",
"description": "You won't believe what happened next #challenge",
"create_time": "2025-01-20T18:00:00.000Z",
"share_count": 120000,
"collect_count": 45000,
"comment_count": 32000,
"play_count": 85000000,
"video_duration": 120,
"hashtags": [
"#challenge"
],
"video_url": "https://v16-webapp-prime.tiktok.com/video/example.mp4",
"profile_username": "examplecreator",
"profile_url": "https://www.tiktok.com/@examplecreator",
"is_verified": true
}
]
此页面对您有帮助吗?