YouTube Video Data API: Read Any Public Video's Stats by URL

Published · 4 min read

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

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:

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):

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.

Last updated and data verified on November 30, 2026.

Run these requests yourself

Every example on this page is a real call to the SocialLens API. A new account starts with 250 free reads, no card needed, and a read that fails is never charged.

Keep reading