{
"items": [
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "UgzKYksqeQ5gA3t0g0F4AaABAg",
"text": "I Rick rolled my entire French class because we had to study a city in France and make a quiz about it as well as a presentation, I decided to make a Kahoot quiz because it’s very easy. I put a link in to this saying it’s the kahoot link. The teacher needless to say got very very mad. As well as my classmates asking who rick rolls in 2019",
"author": "@grustache4569",
"authorChannelId": "UCKrzgYonJnMd0Dk7zQXjYXw",
"authorPhoto": "https://yt3.ggpht.com/ytc/AIdro_kDD-FhIbth2qcBbI9VGxR41dJa0kE3kN9iVlGzNgRU_g=s88-c-k-c0x00ffffff-no-rj",
"likes": "109 mil",
"replyCount": 740,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 7 anos (editado)",
"publishedAtApprox": "2019-11-23T18:37:27.563175+00:00"
},
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "UgwPwTibxdgqCHZxktd4AaABAg",
"text": "My algebra teacher said that this was a link to the test answers",
"author": "@bdr8823",
"authorChannelId": "UCdi6tGxvFvTRGe-7dAn7m7w",
"authorPhoto": "https://yt3.ggpht.com/ytc/AIdro_kcDoQJUNDkDzTrA5kaF5ADVujN-6UcDjMP2Kydtw=s88-c-k-c0x00ffffff-no-rj",
"likes": "72 mil",
"replyCount": 708,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 7 anos",
"publishedAtApprox": "2019-11-23T18:37:27.568448+00:00"
},
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "Ugw10bSluCDSZMIxUSB4AaABAg",
"text": "Let’s put the meme aside, this is actually a banging song.",
"author": "@LK-ht7qz",
"authorChannelId": "UCHpvHTRSILoOFKWX5oFCYDA",
"authorPhoto": "https://yt3.ggpht.com/RJnrz4JwDmHNgtFdnVdJ6FKLiuo59IuHkY6bvqaEJM0mxTSlq0GKQs_ItA-sJ8QMqps_lf9Lvgs=s88-c-k-c0x00ffffff-no-rj",
"likes": "223 mil",
"replyCount": 666,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 6 anos",
"publishedAtApprox": "2020-11-23T18:37:27.571719+00:00"
},
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "UgyW4kfw4IeIP2SVP6N4AaABAg",
"text": "They should turn off ads so that the rickroll happens by surprise...\n\nWOW! I can't believe it! One billion views!! This is a very special moment for me. God bless you all, and hope there's more billions of views in the future!\n\nOK, guys, I have a confesion: I was just copying what some memes from Reddit and YouTube already said, since it was a good idea. This is not an original comment...",
"author": "@GabrielsEpicLifeofGoals",
"authorChannelId": "UCUztIF1vqHhPGCbO27IRDEg",
"authorPhoto": "https://yt3.ggpht.com/ytc/AIdro_keh05OEEoNHBwN1maGSGYTcVTcuPz-9Vl1Q6O9FYemDw=s88-c-k-c0x00ffffff-no-rj",
"likes": "73 mil",
"replyCount": 462,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 7 anos (editado)",
"publishedAtApprox": "2019-11-23T18:37:27.574921+00:00"
},
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "Ugzn9VS5jfDEby21Yv94AaABAg",
"text": "Yall still getting rick rolled after gta6",
"author": "@ELIBRON-i2g",
"authorChannelId": "UCYkKHiczoMbaR7v7kuefCAg",
"authorPhoto": "https://yt3.ggpht.com/9ptwIqgvw-f3nu8YMMQZmvZ2DRJ_0KFqQQ5NIsjtNZnNIlN3gefuQRQvtI4SoyI_s7G0mb7Lyw=s88-c-k-c0x00ffffff-no-rj",
"likes": 126,
"replyCount": 6,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 15 horas",
"publishedAtApprox": "2026-11-23T03:37:27.577038+00:00"
}
],
"meta": {
"robot": "youtube-comments",
"items": 5,
"status": "SUCCEEDED",
"seconds": 3,
"via": "vps"
}
}
curl --location --request GET 'https://zylalabs.com/api/15392/youtube+comments+scraper+api/41367/youtube+comments?video=https://www.youtube.com/watch?v=dQw4w9WgXcQ&max=5' --header 'Authorization: Bearer YOUR_API_KEY'
Após se cadastrar, cada desenvolvedor recebe uma chave de acesso à API pessoal, uma combinação única de letras e dígitos para acessar nosso endpoint de API. Para autenticar com a Raspador de comentários do YouTube API basta incluir seu token Bearer no cabeçalho Authorization.
| Cabeçalho | Descrição |
|---|---|
Authorization
|
Obrigatório
Deve ser Bearer access_key. Veja "Sua chave de acesso à API" acima quando você estiver inscrito.
|
Sem compromisso de longo prazo. Faça upgrade, downgrade ou cancele a qualquer momento. O teste gratuito inclui até 50 requisições.
Retorna comentários e respostas de vídeos e Shorts do YouTube Cada item pode incluir a referência do vídeo o texto do comentário detalhes do autor contagem de curtidas contagem de respostas horário de publicação status de comentário fixado status de coração do criador e relações entre respostas
Os campos principais incluem `videoId`, `videoUrl`, `commentId`, `text`, `author`, `authorChannelId`, `authorPhoto`, `likes`, `replyCount`, `isReply`, `parentCommentId`, `heartedByCreator` e `publishedTimeText`
A resposta é um objeto JSON contendo um array `items` Cada elemento do array representa um comentário de nível superior ou uma resposta As respostas são identificadas com `isReply: true` e podem fazer referência ao comentário pai por meio de `parentCommentId`
Verifique o campo `isReply`. Um comentário de nível superior tem `isReply: false` e normalmente um `parentCommentId` nulo. Uma resposta tem `isReply: true` e usa `parentCommentId` para identificar o comentário ao qual pertence
Cada registro pode incluir a contagem de curtidas exibida em `likes` e o número de respostas em `replyCount` O campo `heartedByCreator` indica se o criador do vídeo curtiu o comentário
Os dados do autor podem incluir o identificador exibido em `author`, o identificador do canal em `authorChannelId` e um URL da imagem do perfil em `authorPhoto`. Esses campos podem ajudar na atribuição, no agrupamento ou em links para o perfil do autor
O endpoint é compatível com comentários e respostas tanto de vídeos padrão do YouTube quanto do YouTube Shorts Os registros incluem `videoId` e `videoUrl`, permitindo associar os resultados ao conteúdo de origem
Trate um array `items` vazio como não havendo comentários ou respostas retornados para a solicitação. Registros individuais também podem omitir ou fornecer valores nulos para alguns campos, portanto os clientes devem validar os campos opcionais antes de exibi-los ou processá-los