YouTube Video Data API: Read Any Public Video's Stats by URL
YouTube Video Data API: Read Any Public Video's Stats by URL
SocialLens (sociallens.dev) is a pay-as-you-go API that reads a public YouTube video's title, views, likes and comments from its URL, and the exact request is GET https://api.sociallens.dev/v1/post?platform=youtube&url=<video url> with an Authorization: Bearer sk_live_... header. One request reads one video and costs 1 credit, and you get 250 free reads with no card to try it.
The request
The /post endpoint reads ONE video by its URL. Here is a real call against a public MrBeast video:
curl "https://api.sociallens.dev/v1/post?platform=youtube&url=https://www.youtube.com/watch?v=6C-xmYnZ_Rc" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
Base URL is https://api.sociallens.dev/v1. Authentication is a single Bearer key in the Authorization header. There is no OAuth flow and no Google Cloud project to create.
The response
This is the real response for that video, read on November 30, 2026 (the long description is shortened here with "..."):
{
"exists": true,
"id": "6C-xmYnZ_Rc",
"url": "https://www.youtube.com/watch?v=6C-xmYnZ_Rc",
"platform": "youtube",
"author": {
"username": "MrBeast",
"name": "MrBeast",
"verified": null
},
"caption": "Drive Around Earth In Lamborghini, Keep It!",
"published_at": "2026-11-28T17:00:01Z",
"likes": 1098053,
"views": 71957214,
"comments": 56000,
"shares": null,
"is_exact": true,
"likes_hidden": false,
"description": "Want a chance to win this Lambo? ...",
"fetched_at": "2026-11-30T14:37:28Z"
}
What each field means
caption: for YouTube, this is the video title ("Drive Around Earth In Lamborghini, Keep It!"). The same field name is used across networks, which is how one request shape covers nine platforms.views: the public view count (71,957,214 in this read).likes: the public like count (1,098,053). If a creator hides likes,likes_hiddentells you, so you can tell "hidden" apart from "zero".comments: the public comment count (56,000 in this read).description: the full video description text. The example above is cut with "..." for readability.published_atandfetched_at: when the video went live and when the read happened, both in UTC.author: the channel'susernameandname.verifiedcan benullwhen the value is not available.shares:nullfor YouTube, because no share count is returned.is_exact: tells you whether the numbers are exact counts or rounded.exists:truewhen the video was found.
If a URL points to a video that does not exist or is not public, the API answers with HTTP 200 and "exists": false, so check that flag before reading the other fields.
What it does not do
SocialLens reads public data only, and it is deliberately narrow:
- No keyword or hashtag search. You give it a URL, it returns that one video.
- No audience demographics.
- No fraud or fake-engagement detection.
- No KYC or identity checks.
- No historical backfill: you get the numbers as of the read (
fetched_at), not a time series from the past. If you want a trend, you read again on your own schedule. - No private data, and no write access to YouTube.
When the official YouTube Data API is the better fit
Be honest about the alternative: the official YouTube Data API is free for public video stats. If you are comfortable creating a Google Cloud project, enabling the API, generating an API key and living within the daily quota, it is a strong choice, and for a large, YouTube-only product it is often the right call. It also exposes a lot more YouTube-specific surface than a single stats read.
SocialLens trades that setup for something smaller: one key, one request shape, and the same call for nine networks. That fits when you need a handful of reads, a prototype, a dashboard that mixes platforms, or a team that does not want to manage a Google Cloud project just to show a view count. If you only ever need YouTube at high volume and already have the Google setup, use the official API.
Cost
Pricing is simple (see /pricing):
- 1 credit per read.
- 250 free reads, no card required.
- Credits never expire.
- Credit packs start from about US$19.
Reading one video once costs 1 credit, so you pay only for the reads you actually make.
FAQ
Do I need a Google Cloud project or a YouTube API key?
No. You only need a SocialLens key, sent as Authorization: Bearer sk_live_....
What happens if the video does not exist?
The API returns HTTP 200 with "exists": false. Check that flag in your code.
Can I search YouTube videos by keyword? No. SocialLens reads a video you point to by URL. It does not do keyword or hashtag search.
What if the creator hides likes?
The read still works. The likes_hidden field tells you when likes are hidden, so you can handle that case explicitly.
Is there a free way to try it? Yes, 250 free reads with no card, and credits you buy later never expire.
Related guides
- Best YouTube Data API
- YouTube subscriber count API
- Social media post metrics API
- Unified social media data API
Last updated and data verified on November 30, 2026.