Home / How-to guides / YouTube Data API Scraper

How to get YouTube data with your own API key

YouTube videos, channels, keyword search and comments from the official API v3 with your own free key. Half the price of the market leader.

Open on Apify ↗Actor page

Updated 2026-11-24

The problem

Scrapers that read YouTube pages through proxies can break when the page changes. The official YouTube Data API v3 is free up to 10,000 units a day, but you still have to page through results and join videos, channels and comments yourself.

Steps

  1. Open the Actor on Apify. Create a free Apify account if you do not have one. Every account gets free monthly credit, enough to try this on real data. YouTube Data API Scraper ↗
  2. Fill in the input. The input is a small JSON. These are the first fields and example values:
input.json
{
  "apiKey": "YOUR_KEY",
  "searchQueries": [
    "apify tutorial"
  ],
  "channelUrls": [
    "@RickAstleyYT"
  ]
}
  1. Run it. Press Start in the console, or call it from the API, a schedule, n8n, Make or Zapier. See the run guide for code you can copy. Run guide (API, n8n, Make, MCP)
  2. Take the results. Open the Output tab to preview the dataset and download it as JSON, CSV or Excel. Through the API you read the same dataset items.

A tip for this Actor

Watch the API quota as well as the price. Google gives searches their own limit (100 search calls per day per project by default, 1 unit each), while listing the uploads of a channel costs 1 unit per call. For a daily check of known channels, use channelUrls rather than searches, and keep maxQuotaUnits as a cap.

Input fields

FieldTypeDescription
apiKeystringYour YouTube Data API v3 key (secret).
searchQueriesarrayKeywords to search.
channelUrlsarrayChannel URLs, @handles or IDs.
videoUrlsarrayVideo URLs or IDs.
includeCommentsbooleanAlso return top-level comments.

Real output sample

First item of 5 from a real run, shortened for display. The full sample is a download on the Actor page.

youtube-data-api-scraper.json
{
  "type": "video",
  "videoId": "AnMjd7XjYNE",
  "url": "https://www.youtube.com/watch?v=AnMjd7XjYNE",
  "title": "Como Usar Apify en Español (2026)",
  "description": "Como Usar Apify en Español (2026) \n\nGracias por ver. Me gusta, comparte y suscríbete para obtener más tutor…",
  "channelId": "UCLKEkwsYkHOJJ7BSPxW0APA",
  "channelTitle": "Guia Español",
  "channelUrl": "https://www.youtube.com/channel/UCLKEkwsYkHOJJ7BSPxW0APA",
  "publishedAt": "2024-08-11T15:33:42Z",
  "durationSeconds": 559,
  "duration": "9:19",
  "isShort": false,
  "viewCount": 11193,
  "likeCount": 121,
  "commentCount": 5,
  "engagementRatePct": 1.126,
  "tags": [],
  "categoryId": "22",
  "language": "en-US",
  "liveBroadcast": "none",
  "definition": "hd",
  "hasCaptions": false,
  "thumbnailUrl": "https://i.ytimg.com/vi/AnMjd7XjYNE/maxresdefault.jpg",
  "source": "youtube-data-api-v3"
}

What it costs

Pay per event: video is charged $0.00 each. Apify platform usage is billed separately and is usually a few cents per run.

ResultsResult events
100$0.20
1,000$2
10,000$20
100,000$200

Limits you should know

  • You need your own YouTube Data API v3 key to search and read channels. Without a key only specific video URLs work, in a basic mode that is unreliable on the cloud.
  • The API quota is yours (free by default: 10,000 units per day, plus 100 search calls per day; Google may change these limits). If it runs out, the run stops with a clear message and keeps what was already saved.
  • Transcripts and the full tree of comment replies are not included: top-level comments only.
  • You are responsible for complying with the YouTube API Services Terms of Service with your key. Comments contain author names: handle them under GDPR.

Questions

Why do I need my own key?

So the Google API cost and quota are yours; the free tier is 10,000 units per day.

Does it work without a key?

Only a basic mode for specific video URLs, best effort and gray with YouTube's terms.

Rate it on Apify

Used it? A rating or review on Apify helps other people judge it, and tells us what to fix.

Rate it on Apify ↗

Related guides

More guides