curl --request POST \
--url 'https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lkay758p1eanlolqw8&include_errors=true' \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"input": [{"url": "https://www.facebook.com/NASA/posts/1234567890"}, {"url": "https://www.facebook.com/Meta/posts/9876543210"}]}'[
{
"url": "https://www.facebook.com/Pagina12ok/posts/pfbid0...",
"post_id": "1287876623560800",
"post_url": "https://www.facebook.com/Pagina12ok/posts/pfbid0...",
"comment_id": "Y29tbWVudDox...",
"user_name": "Norma Ester Mercado",
"user_id": "pfbid0...",
"user_url": "https://www.facebook.com/normaester.mercado.1",
"date_created": "2026-04-02T23:46:29.000Z",
"comment_text": "Great post, thanks for sharing!",
"num_likes": 1,
"num_replies": 0,
"attached_files": null,
"type": "Comment",
"reply": true,
"parent_comment_id": "Y29tbWVudDox..."
}
]
Facebook
按URL收集评论
POST
/
datasets
/
v3
/
scrape
curl --request POST \
--url 'https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lkay758p1eanlolqw8&include_errors=true' \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"input": [{"url": "https://www.facebook.com/NASA/posts/1234567890"}, {"url": "https://www.facebook.com/Meta/posts/9876543210"}]}'[
{
"url": "https://www.facebook.com/Pagina12ok/posts/pfbid0...",
"post_id": "1287876623560800",
"post_url": "https://www.facebook.com/Pagina12ok/posts/pfbid0...",
"comment_id": "Y29tbWVudDox...",
"user_name": "Norma Ester Mercado",
"user_id": "pfbid0...",
"user_url": "https://www.facebook.com/normaester.mercado.1",
"date_created": "2026-04-02T23:46:29.000Z",
"comment_text": "Great post, thanks for sharing!",
"num_likes": 1,
"num_replies": 0,
"attached_files": null,
"type": "Comment",
"reply": true,
"parent_comment_id": "Y29tbWVudDox..."
}
]
查询参数
string
默认值:"gd_lkay758p1eanlolqw8"
必填
用于此请求的数据集 ID。
必须设置为
gd_lkay758p1eanlolqw8 以收集 Facebook 评论数据。boolean
默认值:false
请求完成时是否发送通知。
boolean
默认值:true
是否在响应中包含错误。
请求正文
object[]
必填
[
{
"url": "https://www.facebook.com/Pagina12ok/posts/pfbid0...",
"post_id": "1287876623560800",
"post_url": "https://www.facebook.com/Pagina12ok/posts/pfbid0...",
"comment_id": "Y29tbWVudDox...",
"user_name": "Norma Ester Mercado",
"user_id": "pfbid0...",
"user_url": "https://www.facebook.com/normaester.mercado.1",
"date_created": "2026-04-02T23:46:29.000Z",
"comment_text": "Great post, thanks for sharing!",
"num_likes": 1,
"num_replies": 0,
"attached_files": null,
"type": "Comment",
"reply": true,
"parent_comment_id": "Y29tbWVudDox..."
}
]
授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
查询参数
Must be gd_lkay758p1eanlolqw8 for this dataset.
Send notifications when the request is completed.
Include errors in the response.
请求体
application/json
Array of input objects. See Request Body below for the supported fields.
Show child attributes
Show child attributes
响应
200 - application/json
OK. See response example below the parameters.
此页面对您有帮助吗?