Skip to content

Video

GET/v1/youtube/video1 credit

Returns a YouTube video's or Short's details: title, description and its links, view, like and comment counts, publish date, channel, chapters, keywords, caption and audio tracks, download formats, the most-replayed heat map and related videos.

01Query parameters

NameTypeDescription
urlrequiredstringYouTube video URL: a watch, youtu.be, Shorts, live or embed link.
cache_max_ageoptionalstringAccepted for compatibility; every call is fetched fresh, so the value does not change the answer.Accepted values:1d3d7d14d30d

02Request

curl "https://api.scrapesocial.ai/v1/youtube/video?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ" \
  -H "x-api-key: $SCRAPESOCIAL_KEY"

03Responses

Real answers from the API. Lists are shortened to 2 items.

GET /v1/youtube/video?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "type": "video",
  "id": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Autobiography 📚 OUT NOW! \nFollow this link to get your copy and listen to Rick’s ‘Never’ playlist ❤️ #RickAstleyNever\nhttps://linktr.ee/rickastleynever\n\n“Never Gonna Give You Up” was a global smash on its release in July 1987, topping the charts in 25 countries including Rick’s native UK and the US Billboard Hot 100.  It…",
  "descriptionLinks": [
    "https://www.youtube.com/hashtag/rickastleynever",
    "https://linktr.ee/rickastleynever"
  ],
  "commentCountText": "2.4M",
  "commentCountInt": 2400000,
  "likeCountText": "19497271",
  "likeCountInt": 19497271,
  "viewCountText": "1,830,411,723",
  "viewCountInt": 1830411723,
  "publishDateText": "Oct 24, 2009",
  "collaborators": [],
  "channel": {
    "id": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "url": "https://www.youtube.com/@RickAstleyYT",
    "handle": "RickAstleyYT",
    "title": "Rick Astley",
    "thumbnail": "https://yt3.ggpht.com/_ShEGOdg-t5YGJse14Ooq6FYBZqX_QSlhaTNjG06miYusm5lWm1UroLyVxnYtahADfRTVLtuVQ=s48-c-k-c0x00ffffff-no-rj"
  },
  "chapters": [],
  "watchNextVideos": [
    {
      "id": "OPf0YbXqDm0",
      "title": "Mark Ronson - Uptown Funk (Official Video) ft. Bruno Mars",
      "thumbnail": "https://i.ytimg.com/vi/OPf0YbXqDm0/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLAnIdK32U-YJVjx2z1UckUdsF7gwQ",
      "channel": {
        "title": "Mark Ronson",
        "url": null,
        "handle": null,
        "id": "UCSY5V7BJSrxNvvBF0Drslow"
      },
      "publishedTimeText": "11y ago",
      "publishedTime": null,
      "publishDateText": "11y ago",
      "publishDate": null,
      "viewCountText": "5.9B",
      "viewCountInt": 5900000000,
      "lengthText": "4:31",
      "lengthInSeconds": 271,
      "videoUrl": "https://www.youtube.com/watch?v=OPf0YbXqDm0"
    },
    {
      "id": "YnopHCL1Jk8",
      "title": "O-Zone - Dragostea Din Tei [Official Video]",
      "thumbnail": "https://i.ytimg.com/vi/YnopHCL1Jk8/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLCW9MGhndGQyJGpybzsSIRcHz36_Q",
      "channel": {
        "title": "Time Records",
        "url": "https://www.youtube.com/@TimeRecords",
        "handle": "TimeRecords",
        "id": "UCWOom9E_zqXS0VdWW949WUA"
      },
      "publishedTimeText": "15y ago",
      "publishedTime": null,
      "publishDateText": "15y ago",
      "publishDate": null,
      "viewCountText": "303M",
      "viewCountInt": 303000000,
      "lengthText": "4:46",
      "lengthInSeconds": 286,
      "videoUrl": "https://www.youtube.com/watch?v=YnopHCL1Jk8"
    }
  ],
  "thumbnail": "https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "publishDate": "2009-10-24T23:57:33-07:00",
  "keywords": [
    "rick astley",
    "Never Gonna Give You Up"
  ],
  "genre": "Music",
  "durationMs": 214000,
  "durationFormatted": "00:03:34",
  "captionTracks": [
    {
      "baseUrl": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=ezjeas-LBY_P0u8P6ZS42QM&caps=asr&opi=112496729&exp=xpo&xoaf=5&xowf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1792973547&sparams=ip,ipbits,expire,v,ei,caps,opi,exp,xoaf&signature=4C1233461C3A80650A9667A8152A941C0C7050E5.4FE19B53468A14F90E27FDAFC35A01E464505308&key=yt8&lang=en",
      "name": {
        "simpleText": "English"
      },
      "vssId": ".en",
      "languageCode": "en",
      "isTranslatable": true,
      "trackName": ""
    },
    {
      "baseUrl": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=ezjeas-LBY_P0u8P6ZS42QM&caps=asr&opi=112496729&exp=xpo&xoaf=5&xowf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1792973547&sparams=ip,ipbits,expire,v,ei,caps,opi,exp,xoaf&signature=4C1233461C3A80650A9667A8152A941C0C7050E5.4FE19B53468A14F90E27FDAFC35A01E464505308&key=yt8&kind=asr&lang=en",
      "name": {
        "simpleText": "English (auto-generated)"
      },
      "vssId": "a.en",
      "languageCode": "en",
      "kind": "asr",
      "isTranslatable": true,
      "trackName": ""
    }
  ],
  "audioTracks": [],
  "downloadOptions": {
    "expiresInSeconds": "21540",
    "hlsManifestUrl": null,
    "dashManifestUrl": null,
    "formats": [
      {
        "itag": 18,
        "url": "https://rr3---sn-u0g3uxax3-qptl.googlevideo.com/videoplayback?expire=1792969947&ei=ezjeas-LBY_P0u8P6ZS42QM&ip=78.166.63.115&id=o-AGL8ME3aTYB2OgZfCKcEpj0b5D_YAj-N2YEI05qNdQVq&itag=18&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&cps=1087&met=1792948347%2C&mh=7c&mm=18%2C29&mn=sn-u0g3uxax3-qptl%2Csn-ajnv45-5i&ms=aub%2Crdu&mv=m&mvi=3&pl=21&rms=aub%2Caub&initcwndbps=1488000&bui=AWzQHwo05Gdi2OLiRrx…",
        "cdnUrl": "https://rr3---sn-u0g3uxax3-qptl.googlevideo.com/videoplayback?expire=1792969947&ei=ezjeas-LBY_P0u8P6ZS42QM&ip=78.166.63.115&id=o-AGL8ME3aTYB2OgZfCKcEpj0b5D_YAj-N2YEI05qNdQVq&itag=18&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&cps=1087&met=1792948347%2C&mh=7c&mm=18%2C29&mn=sn-u0g3uxax3-qptl%2Csn-ajnv45-5i&ms=aub%2Crdu&mv=m&mvi=3&pl=21&rms=aub%2Caub&initcwndbps=1488000&bui=AWzQHwo05Gdi2OLiRrx…",
        "expiresAt": "2026-10-25T23:12:27.000Z",
        "mimeType": "video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"",
        "codecs": "avc1.42001E, mp4a.40.2",
        "bitrate": 444226,
        "width": 640,
        "height": 360,
        "quality": "medium",
        "qualityLabel": "360p",
        "fps": 25,
        "audioQuality": "AUDIO_QUALITY_LOW",
        "audioSampleRate": "44100",
        "audioChannels": 2,
        "approxDurationMs": "213089",
        "projectionType": "RECTANGULAR",
        "hasVideo": true,
        "hasAudio": true,
        "requiresSignatureDecipher": false,
        "signatureCipher": null
      }
    ],
    "note": "These are YouTube's muxed audio+video formats when exposed. Links can expire, and some videos may only expose signature-ciphered URLs."
  },
  "most_replayed": {
    "markers": [
      {
        "startMillis": 0,
        "durationMillis": 2140,
        "intensityScoreNormalized": 1
      },
      {
        "startMillis": 2140,
        "durationMillis": 2140,
        "intensityScoreNormalized": 0.4230315549340408
      }
    ],
    "ranges": [
      {
        "visibleTimeRangeStartMillis": 0,
        "visibleTimeRangeEndMillis": 6420,
        "decorationTimeMillis": 2140,
        "label": "Most replayed"
      }
    ]
  },
  "isPaidPromotion": false
}

Common to every endpoint

Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.

GET /v1/cosmos/profile?handle=design

{
  "success": false,
  "message": "Invalid API key"
}

04Notes

Download URLs in `downloadOptions` expire (see `expiresInSeconds`). `most_replayed` is null when YouTube has no heat map for the video, and `collaborators` is always an empty list. A URL that is not a YouTube video is a 400, an unknown or removed video a 404, an age-restricted video a 403; all free.

05Errors & credits

Every error has success: false, a real HTTP status and costs no credits.

  • 400missing_parameter

    A required parameter is missing or invalid.

  • 403private_account

    The account is private or age-restricted.

  • 404not_found

    No such account.

  • 503upstream_error

    The platform did not answer; retry shortly.