Social Media Comments API: Read the Comments on Any Public Post by URL
Social Media Comments API: Read the Comments on Any Public Post by URL
SocialLens (sociallens.dev) has a social media comments API: send GET https://api.sociallens.dev/v1/post-comments with a platform and the post url, and you get the first page of public comments as JSON. It works on 5 networks only (TikTok, Instagram, YouTube, Facebook and Reddit), costs 1 credit per read, and uses the same Bearer-token request shape as the rest of the API.
If you need to read what people are saying under a specific public post, this is the endpoint. It is not a search tool and it does not walk the whole comment tree. This guide shows two real calls, explains every field, and is honest about the one thing that differs between networks: the replies count.
The request
Base URL is https://api.sociallens.dev/v1. Authentication is a Bearer header: Authorization: Bearer sk_live_.... The /post-comments endpoint reads the comments on one post, identified by its URL.
Supported values for platform on this endpoint: tiktok, instagram, youtube, facebook, reddit. The other networks SocialLens covers for profiles and posts are not available on /post-comments, so check the scope before you build on it.
Example 1: YouTube
curl "https://api.sociallens.dev/v1/post-comments?platform=youtube&url=https://www.youtube.com/watch?v=6C-xmYnZ_Rc&limit=2" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
{
"exists": true,
"url": "https://www.youtube.com/watch?v=6C-xmYnZ_Rc",
"platform": "youtube",
"count": 2,
"total": null,
"has_more": true,
"next_cursor": null,
"comments": [
{
"id": "UgwW_NdxKqzP_ASFXf94AaABAg",
"text": "Join my Whatnot stream tomorrow ...",
"author": {
"username": "MrBeast",
"name": null,
"verified": true
},
"likes": 10000,
"replies": 978,
"published_at": "2026-11-29T14:37:32Z"
},
{
"id": "UgzeWOx47DRl2SzhJtF4AaABAg",
"text": "...",
"author": {
"username": "fadiaklkl-l5v",
"name": null,
"verified": false
},
"likes": 11000,
"replies": 28,
"published_at": "2026-11-29T14:37:32Z"
}
],
"fetched_at": "2026-11-30T14:37:32Z"
}
(Comment text is shortened with "..." here for readability. The API returns the full text.)
Example 2: Instagram
curl "https://api.sociallens.dev/v1/post-comments?platform=instagram&url=https://www.instagram.com/p/Df-NlR0PjmN/&limit=2" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
{
"exists": true,
"url": "https://www.instagram.com/p/Df-NlR0PjmN/",
"platform": "instagram",
"count": 2,
"total": null,
"has_more": false,
"next_cursor": null,
"comments": [
{
"id": "17908697133416929",
"text": "Incredible beautiful!",
"author": {
"username": "myfriendwantstoknow2",
"name": null,
"verified": false
},
"likes": 0,
"replies": null,
"published_at": "2026-11-30T14:07:41Z"
},
{
"id": "18111507292963658",
"text": "...",
"author": {
"username": "selamariguia",
"name": null,
"verified": true
},
"likes": 0,
"replies": null,
"published_at": "2026-11-30T13:27:45Z"
}
]
}
Both calls are the same request shape. Only platform and url change.
What each field means
Envelope. exists tells you whether the post was found. count is how many comments came back in this response. total was null in both examples above, so do not rely on it for a full comment count. has_more says whether more comments exist beyond this page. fetched_at is when the read happened.
text. The comment body as published.
author. An object with username, name and verified. In both examples name was null and the username was the identifier you get, so plan around username rather than a display name. verified is a boolean.
likes. The like count on the comment. Use it as reported by the network at read time.
replies. The number of replies under that comment, with an important caveat covered in the next section.
published_at. An ISO 8601 UTC timestamp for when the comment was posted.
id. The comment identifier on the network, useful for deduplicating if you re-read a post.
The replies field: a real number on YouTube and Facebook, null elsewhere
This is the part to read carefully if you are building anything on reply counts.
- On YouTube and Facebook,
repliesis a real number. In the YouTube example above the first comment shows 978 replies and the second shows 28. - On Instagram, TikTok and Reddit,
repliesisnull.
null means "this network's comment read does not give us a reply count", not "zero replies". The Instagram example above shows it: both comments have "replies": null. If you treat null as 0 you will undercount, so check for null explicitly in your code.
In practice: if your analysis needs per-comment reply counts, YouTube is the network where this endpoint delivers them. On the other networks, use likes and published_at as your signals.
Unknown or missing posts
If the post does not exist (deleted, private, or a wrong URL), the response is HTTP 200 with "exists": false instead of an error status. Branch on exists in your code rather than on the status code alone.
What it does not do
Being straight about the limits saves you time:
- No full comment tree. You get the first page of comments, not every comment and every nested reply.
has_morecan betrue(as in the YouTube example), which tells you more comments exist, but this endpoint is not a bulk export of a whole thread. - No keyword search inside comments. You cannot ask for "comments that mention X". You read a post's comments and filter on your side.
- 5 networks only.
/post-commentsworks on TikTok, Instagram, YouTube, Facebook and Reddit. Other networks are not supported on this endpoint. - No historical backfill, no demographics. You read what is public now. The API does not return audience demographics, fraud scores or identity verification.
- Public content only. Private accounts and private posts are not readable.
When another route is the better fit
SocialLens is built for small teams, solo developers and self-serve projects that want one request shape and pay-as-you-go pricing. It is not the right tool for everything:
- You need every comment and every reply on a very large post, or deep historical archives. A provider or platform built for bulk collection will serve you better. Teams that need that scale often look at tools such as Apify or Data365. Compare their current coverage and terms yourself.
- You need comments on networks outside the 5 listed above. Check whether another provider such as EnsembleData covers the network and the depth you need.
- You need enterprise contracts, SLAs or custom volume commitments. SocialLens is self-serve, so an enterprise-focused vendor is the more honest fit there.
- You need influencer discovery, audience demographics or fraud checks. That is a different product category (for example Modash). Comments are raw text, not an audience report.
- You need creator-authorized data from logged-in accounts. A consent-based connection product such as Phyllo is built for that. This API reads public data only.
If your job is "take this post URL, read the top comments, feed them into my dashboard, classifier or alert", the small self-serve route is usually all you need.
Cost
Each /post-comments read costs 1 credit. New accounts get 250 free reads with no card. Credits never expire, and packs start from about US$19. There is no monthly subscription to keep alive, so a project that reads comments once a week costs only what it reads. Full details are on the pricing page.
FAQ
Which networks does the comments endpoint support?
TikTok, Instagram, YouTube, Facebook and Reddit. Other networks are not available on /post-comments.
Why is replies null on Instagram?
On Instagram, TikTok and Reddit the comment read does not provide a reply count, so the field comes back as null. It does not mean zero. On YouTube and Facebook it is a real number.
Can I get every comment on a post?
No. You get the first page of comments per read, not the full tree with all nested replies. Use has_more to know whether more exist.
Can I search comments by keyword?
Not through the API. Read the post's comments and filter them in your own code.
What happens if the URL is wrong or the post was removed?
You get HTTP 200 with "exists": false. Handle that case in your code.
Related guides
- Social media post metrics API
- Unified social media data API
- Social media API comparison
- Best Instagram data API
Last updated and data verified on November 30, 2026.