YouTube API
Videos, comments, accounts.
The YouTube API lets you search videos and read video details, comments, account profiles and an account's videos, with no YouTube account or login. Each call costs 2 credits ($0.004 to $0.0067); failed calls are free. YouTube does not give the author's follower count with a post, so that field is returned as null. Use it over HTTP with an API key, or through MCP from your AI client. Last tested 2026-11-05.
Last tested: Last updated:
/v1/search200 OK2 creditsplatform: "youtube" · query: "meteor shower"nullcomments nullshares nullcollects nullviews 1,840textpublished_atauthor.verifiedauthor.followers+75 actions.
Plus 2 only YouTube has.
Open a row to see its request. Its full parameters and response fields are on its own page.
SearchFind videos by keyword: text, author and views./v1/search2 credits≈ $0.0067
platformquery+2 optionaltype=useraccounts instead of posts2 creditscurl https://api.socialtoai.com/v1/search \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "query": "meteor shower" }'POST /v1/searchYour key goes in the Authorization headerDetailOne video by ID or link: text, author, likes, comment count, views and publish time./v1/detail2 credits≈ $0.0067
platformid or urlinclude=transcriptthe transcript of the video2 creditscurl https://api.socialtoai.com/v1/detail \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "id": "dQw4w9WgXcQ" }'POST /v1/detailYour key goes in the Authorization headerCommentsThe comments under one video: text, likes and reply count./v1/comments2 credits≈ $0.0067
platformid or url+1 optionalreply_ofthe replies under one comment2 creditscurl https://api.socialtoai.com/v1/comments \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "id": "dQw4w9WgXcQ" }'POST /v1/commentsYour key goes in the Authorization headerUser ProfileOne account: name, bio, followers and post count./v1/user_profile2 credits≈ $0.0067
platformid or usernamecurl https://api.socialtoai.com/v1/user_profile \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw" }'POST /v1/user_profileYour key goes in the Authorization headerUser PostsThe recent videos of one account./v1/user_posts2 credits≈ $0.0067
platformid or username+2 optionalcurl https://api.socialtoai.com/v1/user_posts \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "youtube", "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw" }'POST /v1/user_postsYour key goes in the Authorization headerNot offered on YouTube: trending.
Compared with TikTok: YouTube videos also give title and images but do not give author followers, shares, saves or hashtags; its accounts do not give following.
Channel postsGet a page of the posts on a YouTube channel's Posts tab (once Community) by channel ID or handle, newest first.youtube.community_posts2 credits≈ $0.0067
Get a page of the posts on a YouTube channel's Posts tab (once Community) by channel ID or handle, newest first: text, pictures, likes, the video a post carries.
id or usernamecurl https://api.socialtoai.com/v1/call/youtube.community_posts \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw" }'POST /v1/call/youtube.community_postsYour key goes in the Authorization headerPost detailGet one YouTube channel post (once a Community post) by ID or link.youtube.community_post2 credits≈ $0.0067
Get one YouTube channel post (once a Community post) by ID or link: text, channel, pictures, likes, the video it carries.
id or urlcurl https://api.socialtoai.com/v1/call/youtube.community_post \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "id": "UgkxYEgmAc4YqqFhbP9FnxTlU0LxEi2TRKNT" }'POST /v1/call/youtube.community_postYour key goes in the Authorization headerWhat a whole job costs.
| The job | How it adds up | Credits | About |
|---|---|---|---|
| Search 1,000 results on YouTube | usually 20 a page, 50 pages | 100 credits | about $0.33 |
| Read 1,000 YouTube comments | usually 20 a page, 50 pages | 100 credits | about $0.33 |
| Backfill one YouTube account: a list of 200 videos and 20 in full | 7 list pages + 20 full reads | 54 credits | about $0.18 |
| Watch 1 YouTube account daily, at most a month | 10 credits × 31 days | 310 credits | about $1.03 |
Priced at the $10 pack; larger purchases bring it down. A watch runs only while it is on, and you can pause it at any time. There is no subscription.
Or skip the parameters.
Just ask.
Connect SocialToAI once over MCP. Your AI picks the calls, and you see what each one cost.
Which is bigger on YouTube this week: home coffee or matcha?
- search“home coffee”2 credits
- search“matcha”2 credits
Read the comments on this YouTube video and tell me what people complain about.
- detailthe video you pasted2 credits
- commentsfirst 3 pages6 credits
Find five YouTube accounts that post about camping coffee and show me what they posted lately.
- searchaccounts · “camping coffee”2 credits
- user_posts5 accounts10 credits
Same shape on every platform.
Learn it once.
A YouTube video and a Xiaohongshu note come back with the same field names. What a platform cannot give comes back as null.
{ "platform": "youtube", "id": "…", "ref": "…", "approx": [ { "field": "metrics.comments", "kind": "approximate" } ], "type": "content", "url": "https://example.com/…", "format": "video", "title": "…", "text": "…", "published_at": "2021-02-22T19:16:56.000Z", "author": { "id": "…", "username": "…", "name": "…", "verified": null, "followers": null }, "metrics": { "likes": 388123, "comments": 26000, "shares": null, "collects": null, "views": 17954533, "reposts": null }, "images": ["https://example.com/…"], "hashtags": null, "is_pinned": null}author.verifiedauthor.followersmetrics.sharesmetrics.collectsmetrics.repostshashtagsis_pinned{ "platform": "xiaohongshu", "id": "…", "ref": "…", "approx": [], "type": "content", "url": "https://example.com/…", "format": "image", "title": "…", "text": "…", "published_at": "2026-10-09T01:00:34.000Z", "author": { "id": "…", "username": "…", "name": "…", "verified": null, "followers": null }, "metrics": { "likes": 927, "comments": 122, "shares": 256, "collects": 59, "views": null, "reposts": null }, "images": ["https://example.com/…", "https://example.com/…"], "hashtags": ["…", "…"], "is_pinned": false}author.verifiedauthor.followersmetrics.viewsmetrics.reposts7 tools read YouTube.
All toolsDoes YouTube have an official API?
YouTube offers the official YouTube Data API. Any developer can enable it in a Google Cloud project and read public videos, channels, comments and search results with an API key, within a free daily quota; more quota requires a compliance audit.
Source: YouTube's developer documentation, checked 2026-10-17.
| Who can use it | Cost | Limits | Source | |
|---|---|---|---|---|
| YouTube Data API v3 | Any developer with a Google Cloud project and an API key. | Free within the quota: by default 100 search.list calls and 10,000 units a day for the other endpoints. | A read of a list usually costs 1 unit; more quota is requested through Google's quota extension form. | developers.google.com, checked 2026-10-29 |
| Captions download | A signed-in user with permission to edit the video. | 200 quota units a call. | Downloads caption tracks only of videos the user can edit, so not of any public video. | developers.google.com, checked 2026-10-29 |
| SocialToAI | Anyone with a key; no YouTube account of yours and no review. | From 2 credits a call (≈$0.0067); failed calls are free. | Publicly visible content only; up to 100 items a call. | Pricing |
1,000 videos here: about 50 youtube.search calls (typically 20 a page), 100 credits, $0.33 at the first pack. Estimate your cost
- YouTube transcript APIThe full transcript of any public video, by link.
- Comments API, every platformWhich platforms give comments, how many a page, at what price.
- Transcript API, every platformWhich platforms give a transcript, timed or not.
- How to analyze video comments with AI, and keep the original wordswhat comments say, with original words: the tool or your AI, price per platform, a recorded answer
- How to get the numbers for hundreds of post links at oncethe numbers of hundreds of links in one job: prices per platform, what the free credits run, and what it stops for
- Monitor competitors' accounts every daycompetitors' accounts, daily: what is new and what beat their usual, from 9 credits an account
- Monitor brand mentions every day, with the posts behind thema brand, daily, across platforms: attitudes and the posts behind them, from 16 credits a run
- YouTube MCP serverLet your AI read YouTube.