Skip to main content
POST
/
datasets
/
v3
/
scrape
Collect Comments by URL
curl --request POST \
  --url https://api.brightdata.com/datasets/v3/scrape \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": [
    {
      "url": "<string>"
    }
  ]
}
'
[
  {
    "comment_id": "UgxtjoPOlwN1r91t6OF4AaABAg",
    "comment_text": "Great video!",
    "likes": 2,
    "replies": 0,
    "username": "@username",
    "user_channel": "https://www.youtube.com/@username",
    "date": "1 year ago",
    "url": "https://www.youtube.com/watch?v=abc123",
    "video_id": "abc123",
    "user_id": "UCRmKhm9d3FuhiU6SqW4mbDA"
  }
]

Query Parameters

dataset_id
string
default:"gd_lk9q0ew71spt1mxywf"
required
The dataset ID used for this request.
Must be set to gd_lk9q0ew71spt1mxywf to collect YouTube comments data.
notify
boolean
default:false
Whether to send notifications when the request is completed.
include_errors
boolean
default:true
Whether to include errors in the response.

Request Body

input
object[]
required
An array of input objects.

Example

{
  "input": [
    {"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"},
    {"url": "https://www.youtube.com/watch?v=4L_m0m3bEtE"}
  ]
}
[
  {
    "comment_id": "UgxtjoPOlwN1r91t6OF4AaABAg",
    "comment_text": "Great video!",
    "likes": 2,
    "replies": 0,
    "username": "@username",
    "user_channel": "https://www.youtube.com/@username",
    "date": "1 year ago",
    "url": "https://www.youtube.com/watch?v=abc123",
    "video_id": "abc123",
    "user_id": "UCRmKhm9d3FuhiU6SqW4mbDA"
  }
]