Introducing the SocialKit YouTube Comments API
We’re excited to announce the launch of the SocialKit YouTube Comments API, you can now retrieve comments from any YouTube video, including YouTube Shorts, with flexible filtering and sorting.
Quick Link
- API Endpoint:
https://api.socialkit.dev/youtube/comments
What’s New
- YouTube Comments Support: Fetch comments from standard videos and Shorts
- Sorting Options: Get the most top (popular) or new (recent) comments
- Control Volume: Request up to 100 comments per call
- Rich Metadata: Author handle, avatar, likes, reply counts, and position
Endpoint
https://api.socialkit.dev/youtube/comments
Example Request
GET https://api.socialkit.dev/youtube/comments?access_key=<your-access-key>&url=https://youtube.com/watch?v=dQw4w9WgXcQ&limit=2&sortBy=top
Example Response
{
"success": true,
"data": {
"url": "https://youtube.com/watch?v=dQw4w9WgXcQ",
"comments": [
{
"author": "@YouTube",
"text": "can confirm: he never gave us up",
"likes": 88,
"date": "",
"avatar": "https://yt3.ggpht.com/Bg5wS82KGryRmcsn1YbPThtbXoTmj2XJ9_7LmuE2RF6wbKJBkovfRypbSz6UD3gEu_nHiwGZtQ=s88-c-k-c0x00ffffff-no-rj",
"replyCount": 1,
"position": 1
},
{
"author": "@IIIII911IIIII",
"text": "But link sayd free robux",
"likes": 375,
"date": "",
"avatar": "https://yt3.ggpht.com/ixP_4DyuJRryaowxiBKNKv_pvpbEyQHIQrHCZODkNBW-0Lk7eTYo_vL1iB3mL4TFgnV0PNVQiQ=s88-c-k-c0x00ffffff-no-rj",
"replyCount": 738,
"position": 2
}
]
}
}
Parameters
- url
string
(Required)- The YouTube URL of the video to get comments for. Supports multiple URL formats, including Shorts.
- access_key
string
(Required)- Your API access key. Provide via the
access_key
query parameter,x-access-key
header, or request body.
- Your API access key. Provide via the
- limit
number
(Optional, default: 10; max: 100)- Number of comments to retrieve.
- sortBy
string
(Optional, default:new
)- Sort comments by
top
(most popular) ornew
(most recent).
- Sort comments by
Response Fields
Each comment object in data.comments
contains:
- author: Comment author’s username (with
@
prefix) - text: The comment text content
- likes: Number of likes on the comment (number)
- date: Comment date (may be empty)
- avatar: URL to the author’s profile picture
- replyCount: Number of replies to this comment
- position: Comment position in the sorted list
Use Cases
- Community Management: Monitor and analyze engagement
- Sentiment Analysis: Understand audience reactions
- Content Moderation: Identify spam or inappropriate content
- Market Research: Gather user feedback and opinions
- Competitor Analysis: Analyze engagement on competitor videos
- Social Listening: Track mentions and discussions
- Content Strategy: Learn what resonates with your audience
Notes
- Comments are retrieved in real-time from YouTube
- Avatar URLs may be empty for some users
- Reply counts include nested replies and may change over time
- The
position
field indicates the comment’s order in the sorted results
Getting Started
- Get an API key: Create a project and generate an access key on the Pricing page
- Make your first request: Call the endpoint with your
access_key
and the video URL - Integrate: Use sorting and limits to tailor output for dashboards, reports, or pipelines
Ready to build with comments?
- Explore API docs:
https://docs.socialkit.dev
- Try our free YouTube tools:
- Do you want to learn how to scrape YouTube comments with Puppeteer? Here's the tutorial: How to Scrape YouTube Comments With Puppeteer
The SocialKit YouTube Comments API makes it simple to bring real audience insights into your workflows, for both classic videos and Shorts.