curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"user_name":"elonmusk"}],"limit_per_input":null}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lwxmeb2u1cniijd7t4¬ify=false&include_errors=true&type=discover_new&discover_by=user_name"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lwxmeb2u1cniijd7t4",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "user_name",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [{"user_name": "elonmusk"}],
"limit_per_input": None,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lwxmeb2u1cniijd7t4",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "user_name",
});
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: [{ user_name: "elonmusk" }],
limit_per_input: null,
}),
});
console.log(await response.text());
[
{
"x_id": "1077446982",
"url": "https://x.com/RepRWilliams",
"id": "RepRWilliams",
"profile_name": "Rep. Roger Williams",
"biography": "Chairman of @HouseSmallBiz. Conservative fighting for lower taxes, less regulations, and more freedom for Texans.",
"is_verified": true,
"profile_image_link": "https://pbs.twimg.com/...",
"external_link": "https://williams.house.gov/",
"date_joined": "2013-01-10T19:21:22.000Z",
"following": 910,
"followers": 24746,
"subscriptions": 0,
"location": "North Texas",
"birth_date": null,
"posts_count": 10434,
"posts": [
{
"date_posted": "2026-04-07T19:10:38.000Z",
"description": "As Chairman of @HouseSmallBiz, I have seen the positive impact the Working Families Tax Cuts have had on small businesses.",
"likes": 6,
"post_id": "2041594516373700624",
"post_url": "https://x.com/RepRWilliams/status/2041594516373700624",
"replies": 3,
"reposts": 3,
"views": 449
}
],
"is_business_account": false,
"is_government_account": false,
"banner_image": "https://pbs.twimg.com/..."
}
]
X (Twitter)
按用户名发现 X (Twitter) 个人资料
使用 Bright Data Scraper API 按账号用户名发现 X (Twitter) 个人资料数据。发送 POST /datasets/v3/scrape 请求,dataset_id 为 gd_lwxmeb2u1cniijd7t4。
POST
/
datasets
/
v3
/
scrape
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"user_name":"elonmusk"}],"limit_per_input":null}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lwxmeb2u1cniijd7t4¬ify=false&include_errors=true&type=discover_new&discover_by=user_name"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lwxmeb2u1cniijd7t4",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "user_name",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [{"user_name": "elonmusk"}],
"limit_per_input": None,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lwxmeb2u1cniijd7t4",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "user_name",
});
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: [{ user_name: "elonmusk" }],
limit_per_input: null,
}),
});
console.log(await response.text());
[
{
"x_id": "1077446982",
"url": "https://x.com/RepRWilliams",
"id": "RepRWilliams",
"profile_name": "Rep. Roger Williams",
"biography": "Chairman of @HouseSmallBiz. Conservative fighting for lower taxes, less regulations, and more freedom for Texans.",
"is_verified": true,
"profile_image_link": "https://pbs.twimg.com/...",
"external_link": "https://williams.house.gov/",
"date_joined": "2013-01-10T19:21:22.000Z",
"following": 910,
"followers": 24746,
"subscriptions": 0,
"location": "North Texas",
"birth_date": null,
"posts_count": 10434,
"posts": [
{
"date_posted": "2026-04-07T19:10:38.000Z",
"description": "As Chairman of @HouseSmallBiz, I have seen the positive impact the Working Families Tax Cuts have had on small businesses.",
"likes": 6,
"post_id": "2041594516373700624",
"post_url": "https://x.com/RepRWilliams/status/2041594516373700624",
"replies": 3,
"reposts": 3,
"views": 449
}
],
"is_business_account": false,
"is_government_account": false,
"banner_image": "https://pbs.twimg.com/..."
}
]
查询参数
string
默认值:"gd_lwxmeb2u1cniijd7t4"
必填
用于此请求的数据集ID。
必须设置为
gd_lwxmeb2u1cniijd7t4 以收集按用户名发现数据。string
默认值:"discover_new"
必须设置为
discover_new。string
默认值:"user_name"
必须设置为
user_name。boolean
默认值:false
请求完成时是否发送通知。
boolean
默认值:true
是否在响应中包含错误。
请求体
object[]
必填
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"user_name":"elonmusk"}],"limit_per_input":null}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lwxmeb2u1cniijd7t4¬ify=false&include_errors=true&type=discover_new&discover_by=user_name"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_lwxmeb2u1cniijd7t4",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "user_name",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [{"user_name": "elonmusk"}],
"limit_per_input": None,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_lwxmeb2u1cniijd7t4",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "user_name",
});
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: [{ user_name: "elonmusk" }],
limit_per_input: null,
}),
});
console.log(await response.text());
[
{
"x_id": "1077446982",
"url": "https://x.com/RepRWilliams",
"id": "RepRWilliams",
"profile_name": "Rep. Roger Williams",
"biography": "Chairman of @HouseSmallBiz. Conservative fighting for lower taxes, less regulations, and more freedom for Texans.",
"is_verified": true,
"profile_image_link": "https://pbs.twimg.com/...",
"external_link": "https://williams.house.gov/",
"date_joined": "2013-01-10T19:21:22.000Z",
"following": 910,
"followers": 24746,
"subscriptions": 0,
"location": "North Texas",
"birth_date": null,
"posts_count": 10434,
"posts": [
{
"date_posted": "2026-04-07T19:10:38.000Z",
"description": "As Chairman of @HouseSmallBiz, I have seen the positive impact the Working Families Tax Cuts have had on small businesses.",
"likes": 6,
"post_id": "2041594516373700624",
"post_url": "https://x.com/RepRWilliams/status/2041594516373700624",
"replies": 3,
"reposts": 3,
"views": 449
}
],
"is_business_account": false,
"is_government_account": false,
"banner_image": "https://pbs.twimg.com/..."
}
]
此页面对您有帮助吗?