The YouTube Data API is free but quota-bound: 10,000 units a day per project, and search has its own bucket of 100 calls a day. Transcripts of other people’s videos aren’t available at all. One GET returns a channel’s videos with view counts in the Data API’s own youtube#… shapes, 1 credit a page, with no quota.
The official YouTube API
The YouTube Data API v3 is the right choice at low volume. Its limits are quota, not money:
- Each Google Cloud project gets 10,000 units a day, plus separate buckets of 100 `search.list` calls and 100 uploads a day. Quotas reset at midnight Pacific Time; more needs Google’s quota extension form and audit.
- Most reads (
videos.list,channels.list,commentThreads.list) cost 1 unit;search.listcosts 100. captions.downloadcosts 200 units and works only for videos you can edit, so it can’t return other channels’ transcripts.
Sources: Quota costs, Getting started, captions.download.
Quick start
- Get a keySign up with an email code: 100 free credits, no card. An agent can sign itself up with
POST https://api.groundsocial.dev/v1/agent/signup. - Set it in your shell
export GROUNDSOCIAL_API_KEY=gs_live_… - Make the callA channel’s videos with views:
GET /v1/youtube/channels/@mkbhd/videos, 1 credit.
curl "https://api.groundsocial.dev/v1/youtube/channels/@mkbhd/videos?sort=popular" \
-H "Authorization: Bearer $GROUNDSOCIAL_API_KEY"Sample response
Trimmed from the real response on 27 November 2026: lists cut to their first items and long strings shortened. Every field is described in the tutorial.
{
"kind": "youtube#videoListResponse",
"items": [
{
"kind": "youtube#video",
"id": "Oy8zSYKkczI",
"snippet": {
"publishedTimeText": "7 years ago",
"publishedAt": "2019-11-29T02:19:39.176Z",
"publishedAtIsApproximate": true,
"channelId": "UCBJycsmduvYEL83R_U4JriQ",
"channelTitle": "Marques Brownlee",
"title": "Retro Tech: Game Boy",
"liveBroadcastContent": "none"
},
"channel": {
"id": "UCBJycsmduvYEL83R_U4JriQ",
"title": "Marques Brownlee",
"handle": "@mkbhd",
"url": "https://www.youtube.com/@mkbhd"
},
"statistics": {
"viewCount": "40000000"
},
"statisticsAreApproximate": true,
"contentDetails": {
"duration": "PT23M49S",
"durationSeconds": 1429
}
}
],
"nextPageToken": "WPL0Xo7UyeeVter_SotmDA",
"pageInfo": {
"resultsPerPage": 30
}
}Get every page
/v1/youtube/channels/@mkbhd/videos returns videos a page at a time, and each page costs 1 credit. Pass the response’s nextPageToken back as after until it runs out.
// Collect up to 5 pages of videos.
const first = 'https://api.groundsocial.dev/v1/youtube/channels/@mkbhd/videos?sort=latest'
const items: unknown[] = []
let cursor: string | undefined
for (let page = 0; page < 5; page++) {
const url = new URL(first)
if (cursor) url.searchParams.set('after', cursor)
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}` },
})
if (!res.ok) throw new Error((await res.json()).error.hint)
const data = await res.json()
items.push(...(data.items ?? []))
cursor = data.nextPageToken ?? undefined
if (!cursor) break
}
console.log(items.length, 'videos')What else you can get from YouTube
| What you get | Endpoint | Credits |
|---|---|---|
| A channel’s videos with views | GET /v1/youtube/channels/@mkbhd/videos | 1 |
| Subscribers, views, links | GET /v1/youtube/channels/@mkbhd | 1 |
| Title, views, likes, duration | GET /v1/youtube/videos/dQw4w9WgXcQ | 1 |
| Any public video’s transcript | GET /v1/youtube/videos/dQw4w9WgXcQ/transcript | 2 |
| Comments, 20 a page | GET /v1/youtube/videos/dQw4w9WgXcQ/comments | 1 |
| Search videos | GET /v1/youtube/search | 1 |
| A channel’s Shorts | GET /v1/youtube/channels/@mkbhd/shorts | 1 |
Each row links to its tutorial. Every YouTube endpoint and price: YouTube API.
Tips
- Channels take a handle (
@mkbhd), aUC…id or any channel URL; videos take an id or any URL form (watch, youtu.be, shorts, embed). - Responses use the Data API’s field names (
snippet,statistics.viewCount,nextPageToken), so existing parsing code keeps working. details=trueon a channel’s videos adds exact counts and dates to every row.- Transcripts come with
segments(start, duration, text) for linking to the second, andtextfor summaries and embeddings.
Use it from Claude or Cursor (MCP)
Every endpoint is also an MCP tool on the remote server https://api.groundsocial.dev/mcp. The ?platforms=youtube below loads only the YouTube tools. The client signs in with OAuth, or send your key as a Bearer token. Tools used in this guide: youtube_channel_videos, youtube_channel_get, youtube_video_get, youtube_video_transcript, youtube_video_comments, youtube_search_videos, youtube_channel_shorts.
claude mcp add --transport http groundsocial "https://api.groundsocial.dev/mcp?platforms=youtube"Setup for ChatGPT, VS Code, Windsurf, n8n and others: MCP client setup.
Pricing
Pay per call from prepaid credits; no subscription. 100 free credits cover the examples on this page. Costs below are at the credit packs’ highest and lowest rates.
| Job | Credits | Cost |
|---|---|---|
| 500 channels with their latest 30 videos | 1,000 | $1.00 → $0.40 |
| 1,000 searches | 1,000 | $1.00 → $0.40 |
| Transcripts of a 300-video channel | 610 | $0.61 → $0.24 |
FAQ
Should I just use the official API?
If 10,000 units a day covers you and you don’t need transcripts, yes. Use this when you need more searches, other people’s transcripts, one key for several platforms, or an MCP tool for an agent.
What if a video has no captions?
The transcript call answers 404 target_not_found and is not charged. Asking for a language the video has no track in does the same, and the hint lists the languages it has.
Are view counts exact?
List rows carry the counts YouTube shows on the page; details=true or the video endpoint gives exact viewCount, likeCount and commentCount.
Are failed calls charged?
No. A target that does not exist answers 404 target_not_found, an upstream failure answers 503, and neither costs anything. Credits never expire.
Is Groundsocial official?
No. Groundsocial is an independent API that reads what the platform shows a logged-out visitor. YouTube is a trademark of Google LLC. We are not affiliated with or endorsed by Google or YouTube.
Go deeper
- YouTube tutorials: 26 endpoints in six languages
- What is the YouTube API quota limit?
- Is the YouTube Data API free?
- How do I get YouTube transcripts with an API?
- Is there an MCP server for social media data?
- YouTube Data API alternatives
- Groundsocial vs the YouTube Data API
- Video transcript API
- Creator analytics API
Related guides
YouTube is a trademark of Google LLC. We are not affiliated with or endorsed by Google or YouTube.
Try it on your own data
One key for YouTube and every other platform, over REST or MCP. Free credits on signup, no card.