YouTubeYouTubeSocial

YouTube video stats by video id — views, likes, duration

youtube.youtube.video.detail

Get a YouTube video's metadata and stats (views, likes, comments, duration)

Price
freeAt provider cost
Success rate
100%Last 30 days · 7,337 calls
Latency p50
186 msp95 395 ms
Last verified
Jul 28, 2026Verified working
GEThttps://toolswitch.dev/v1/tools/youtube.youtube.video.detail?id=dQw4w9WgXcQ&part=snippet%2CstatisticsPreview
  • Uses platform quota
  • Synchronous response
  • Reads public data

Parameters

batching 50 ids costs the same 1 unit as one id — always batch

ParameterTypeRequiredDescriptionExample
Query parameters
idstringRequiredvideo id (the v= parameter of the watch URL); up to 50 comma-separated ids in one calldQw4w9WgXcQ
partstringRequiredsnippet=title/description/tags, statistics=counts, contentDetails=durationsnippet,statistics,contentDetails
  • Query parameters
  • idstringRequired

    video id (the v= parameter of the watch URL); up to 50 comma-separated ids in one call

    Example: dQw4w9WgXcQ

  • partstringRequired

    snippet=title/description/tags, statistics=counts, contentDetails=duration

    Example: snippet,statistics,contentDetails

Code samples

Replace $TOOLSWITCH_KEY with the key you created in the console.

Preview
curl -X GET 'https://toolswitch.dev/v1/tools/youtube.youtube.video.detail?id=dQw4w9WgXcQ&part=snippet%2Cstatistics' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY"

This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at free, including the service fee.