BrowserAct Logo
template bg

YouTube Comments API

Brief

What is YouTube Comments API?

BrowserAct’s YouTube Comments API lets you extract structured video list data plus comment data from YouTube through a single API request.

No scripts, no brittle scraping, no manual export.

Simply pass your keywords, set Comments_limit, and choose Scroll_count. BrowserAct automatically runs the workflow in the background, traverses the video results list, opens each video, loads the comments section by scrolling, and returns clean, ready to use video and comment data directly via API.


What data can you get through YouTube Comments API?

The API returns two linked datasets, designed for immediate analysis and automation.


Video fields

  • video_name: Video title shown in the list
  • video_url: Video URL
  • video_publication_time: Published time (as shown on YouTube)
  • video_view_count: View count (as shown on YouTube)

Comment fields

  • commenter_name: Comment author display name
  • commenter_url: Comment author channel URL
  • comment_text: Comment content
  • comment_publish_date: Comment publish time (as shown on YouTube)
  • comment_likes: Like count for the comment
  • reply_count: Number of replies (if available)


Why YouTube Comments API is right for you

  • One call integration

Send video plus comment data directly into your CRM, BI tools, databases, or automation workflows via API.

  • Zero maintenance

No scraping scripts, no selector babysitting, and no proxy or anti bot setup required.

  • Audience insight at scale

Turn comments into product feedback, objections, feature requests, and sentiment signals.

  • Built for workflows

Perfect for content research, competitive monitoring, community insight, and topic tracking.

In short

Search → API call → Video list plus comments delivered


API Parameters

Parameter

Description

Default

Supported values (examples)

keywords

Search keywords used to find videos on YouTube

AI

Any keyword or phrase e.g. AI, automation, n8n, web scraping

Comments_limit

Maximum number of comments to extract per video

10

Positive integer e.g. 10, 20, 50

Scroll_count

Number of times to scroll in the comments section to load more comments before extraction

2

Positive integer e.g. 1, 2, 5, 10

Code to integrate


Click Get code, replace the API key, and run the code directly in your application.


API Key, get from: https://www.browseract.com/reception/integrations
API_KEY = os.getenv("BROWSERACT_API_KEY", "app-abcdefghijklmn")

You only need to replace:

 app-abcdefghijklmn

with your own API key, and the code will run successfully.

You can find your API key in the API & Integrations section of the BrowserAct dashboard.


API Example


Input

keywords: AI

Comments_limit: 10

Scroll_count: 2


Steps

  1. Click Get the Code
  2. Run the request
  3. Receive structured results via API


API Results


{
"item": [
{
"video_name": "AI’s exponential leap: What next for jobs?",
"video_url": "https://www.youtube.com/watch?v=tYvYYFJ3Gww&pp=ygUCQUk%3D",
"video_publication_time": "22 hours ago",
"video_view_count": "22K views"
}
],
"children_1": [
{
"commenter name": "@JJSeattle",
"commenter url": "https://www.youtube.com/@JJSeattle",
"comment_text": "Oh sure, jobs are safe... . Tell that to the writers, editors, voice over actors, artists, models, etc.",
"Comment publish date": "16 hours ago",
"comment_likes": "23",
"reply_count": "Reply"
},


Create Your Own YouTube Comments API

To create your own YouTube Comments API, start from a prebuilt template.

  1. Click Create from Template in the top-right corner
  2. Complete the setup
  3. You’ll receive a callable workflow_id

Once created, you can use the BrowserAct API to invoke your workflow programmatically and retrieve YouTube video and comment data directly in your application.


Need help? Contact us at

Discord: [Discord Community]

E mail: service@browseract.com


What can we do for youWhat can we do for you

FAQ About the template

YouTube Comments API | Extract Comments Data via API