YouTube video or Short details API

Title, description, stats, duration, channel, thumbnails, chapters, caption tracks and whether YouTube marks it as paid promotion.

GETapi.socialscrape.io/v1/youtube/video
Cost
1 credit
Cached repeats
0 creditssend max_age_days, results kept 30 days
Failed requests
0 credits
Status
Betashape may still gain fields

is_sponsored, null when YouTube's player could not be read for this request. Views, likes and the publish time are exact; the comment and subscriber counts are the abbreviated figures YouTube shows logged out, with the display text in extra. Works for Shorts and lives.

You send one of url or id.

Request

Send your key in the x-api-key header.

curl
curl -G "https://api.socialscrape.io/v1/youtube/video" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode 'id=QP5Fs3AYuWE'
Python
import os
import requests

params = {
    "id": "QP5Fs3AYuWE",
}
res = requests.get(
    "https://api.socialscrape.io/v1/youtube/video",
    headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
    params=params,
    timeout=60,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
const url = new URL("https://api.socialscrape.io/v1/youtube/video");
url.search = new URLSearchParams({
  id: "QP5Fs3AYuWE",
}).toString();
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();

if (body.ok) {
  console.log(body.data);
} else {
  console.error(body.error.code, body.error.message);
}
n8n
{
  "nodes": [
    {
      "name": "SocialScrape YouTube video or Short details",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/youtube/video",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "id",
              "value": "QP5Fs3AYuWE"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Parameters

NameTypeRequiredDescription
urlurlone ofVideo or Short URL (watch, youtu.be, shorts, live, embed).
idstringone of11-character video id. Also accepted as videoId, video_id.
languagestringPreferred response language, 2 letters (en, es, fr). Not guaranteed: YouTube localises on its own. Also accepted as lang.

Every request also accepts trim, raw and max_age_days.

Response

Sample from a recorded response, shortened. Values are public data, not yours.

Status 200Sample
{
  "ok": true,
  "credits_charged": 1,
  "credits_remaining": 4999,
  "cached": false,
  "cached_at": null,
  "request_id": "req_d4fe60a3d3a459bd87016778",
  "data": {
    "object": "post",
    "platform": "youtube",
    "id": "QP5Fs3AYuWE",
    "url": "https://www.youtube.com/shorts/QP5Fs3AYuWE",
    "type": "short",
    "author": {
      "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
      "handle": "NASA",
      "name": "NASA",
      "url": "https://www.youtube.com/@NASA",
      "avatar_url": "https://yt3.ggpht.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s176-c-k-c0x00ffffff-no-rj",
      "verified": true
    },
    "title": "2026 Total Solar Eclipse Over Spain",
    "text": "On Aug. 12, 2026, a total solar eclipse passed over Greenland, Iceland, northern Russia, the Atlantic Ocean, Spain, and a small corner of Portugal.\n\nWatch th...",
    "published_at": "2026-08-12T19:08:21Z",
    "duration_seconds": 35,
    "language": null,
    "hashtags": null,
    "mentions": null,
    "stats": {
      "views": 199507,
      "likes": 5927,
      "comments": null,
      "shares": null,
      "saves": null,
      "dislikes": null
    },
    "media": {
      "thumbnail_url": "https://i.ytimg.com/vi/QP5Fs3AYuWE/maxresdefault.jpg?sqp=-oaymwEoCIAKENAF8quKqQMcGADwAQH4AbYIgAKAD4oCDAgAEAEYZSBlKGUwDw==&rs=AOn4CLAT9U1JJD_l2_VOJY3iTy0h7-Tq1w",
      "video_url": null,
      "audio_url": null,
      "image_urls": null,
      "width": null,
      "height": null
    },
    "song": null,
    "location": null,
    "is_pinned": null,
    "is_sponsored": false,
    "extra": {
      "caption_tracks": [
        {
          "auto_generated": true,
          "language": "ar",
          "name": "Arabic (auto-generated)",
          "translatable": true
        },
        {
          "auto_generated": true,
          "language": "bn",
          "name": "Bangla (auto-generated)",
          "translatable": true
        },
        {
          "auto_generated": true,
          "language": "nl-NL",
          "name": "Dutch (Netherlands) (auto-generated)",
          "translatable": true
        }
      ],
      "category": "Science & Technology",
      "channel_subscribers": 15100000,
      "channel_subscribers_approximate": true,
      "channel_subscribers_text": "15.1M subscribers",
      "is_family_safe": true
    }
  },
  "cursor": null,
  "has_more": null
}

Fields

One Post in data.

A field the platform does not give is null, never made up. Extra platform details are in extra.

FieldTypeAlwaysNotes
object"post"
platformPlatformyes
idstringyes
urlstring or null
type"video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown"
authorAuthor or null
titlestring or null
textstring or null
published_atstring (ISO 8601 date-time) or null
duration_secondsnumber or null
languagestring or null
hashtagsstring[] or null
mentionsstring[] or null
statsStats
Show the other 6 fields
FieldTypeAlwaysNotes
mediaMedia
songSongRef or null
locationPlace or null
is_pinnedboolean or null
is_sponsoredboolean or null
extraobject or null

Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.

Questions

Which errors can it return?

invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.

Is there an SDK call for it?

The preview Python client has client.youtube.video(...) and the TypeScript client client.youtube.video(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.

Can an AI agent call it?

Yes. The MCP server reaches every built endpoint, with the same prices.

Build on social data early.

Developers and agent builders get the first keys.

Get early access