{
"videoId":"dQw4w9WgXcQ",
"views":1580000000,
"likes":15400000,
"comments":1120000,
"engagementRate":0.011,
"channelMedianViews":420000,
"isAboveMedian":true,
"aiRecommendations":"• Use a more curiosity-driven title…"
}
{"error":"Video not found","code":404}
Vastauskoodit
Code
Description
200 Success
Request processed OK.
400 Bad Request
Input validation failed.
401 Unauthorized
Missing / wrong API key.
403 Forbidden
Key inactive or not allowed.
429 Rate Limit
Too many requests.
500 Server Error
Unexpected failure.
AI Audit
youtube/video/audit0.0200 credits
Parameters
API Key
body · string
· required
Video
body · string
· required
Sample size
body · string
Code Samples
Response
Status:—
Headers
Body
YouTube Video API — Practical Guide
A hands-on guide to the YouTube Video API actions you’ll actually use: what each endpoint does,
the problems it solves, the few parameters that matter, and how to read responses to build
smarter UIs (mix builders, QA tools, SEO audits, and moderation dashboards).
Last updated: 21 marras 2025, 20:05
API Version: v1
Burst: 20 req/s
Latency: 59 msCost: 0.009 credits/req
The youtube/video module turns a single YouTube video ID (or URL) into the practical signals you need:
core metadata, engagement metrics, restrictions & status, comments,
SEO surfaces (tags, hashtags, links), playlists featuring the video, and AI-powered audits.
Use results to choose thumbnails/titles, estimate watch-time, detect country blocks, or group videos into mixes.
Watch-time fields. Added perViewSec and watchHours to watchtime for easier planning.
2025-11-21
Engagement wrapper. Standardized engagement{ ... } payload in engagement-rate.
2025-11-21
Trending check. Response now includes categoryName (derived from categoryId).
2025-11-14
Comments API. Optional repliesOn flag now returns structured replies (replies{ cnt, items[] }).
2025-11-07
AI Audit. Baseline sampling (sample 10–100) and channel median comparison added; clearer aiRecommendations.
2025-10-31
Unified responses. Normalized keys across actions (e.g., thumbnails{}, statistics{}, restrictions{}).
Use the API Playgrounds below each section in this page to test requests with your own video IDs.
Usein kysytyt kysymykset
You can fetch titles, descriptions, tags, thumbnails, comments (with replies), statistics (views, likes, comments), audience engagement, video chapters, playlists containing a video, and even request an AI-powered content audit.
Both are supported! You can pass a YouTube video ID (e.g., dQw4w9WgXcQ) or a full YouTube video URL.
The API returns a clear error message and HTTP status code (e.g., 404 for not found, 403 for restricted/private videos).
Enintään 20 pyyntöä / sekunti per avain. Ei päivä- tai kuukausirajoja – maksat vain käytön mukaan.
Käytämme krediittijärjestelmää. Osta kerran – krediitit eivät koskaan vanhene eikä tilausmaksuja ole.
Jokainen HTTP-kutsu on yksi pyyntö; jokainen pyyntö kuluttaa tietyn määrän krediittejä käytettävästä päätepisteestä riippuen.
Kyllä. Ne eivät vanhene ennen kuin käytät ne (mutta niitä ei palauteta).
Krediittejä ei voi hyvittää. Osta siis vain tarvitsemasi määrä – voit lisätä saldoa milloin tahansa.
Hinnat ilmoitetaan krediitteinä, ei dollareina. Jokaisella päätepisteellä on oma hintansa – katso yllä oleva “Krediittejä / pyyntö” -merkintä.