YouTube Video & Channel Scraper avatar

YouTube Video & Channel Scraper

Pricing

from $1.50 / 1,000 results

Go to Apify Store
YouTube Video & Channel Scraper

YouTube Video & Channel Scraper

Extract YouTube video data via official API v3: titles, views, likes, comments, thumbnails, channel stats, tags. Search by keyword or scrape entire channels. Requires YouTube API key. Perfect for content research, competitor analysis, trend monitoring.

Pricing

from $1.50 / 1,000 results

Rating

0.0

(0)

Developer

cloud9

cloud9

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

17 hours ago

Last modified

Share

Extract YouTube video data via official API v3: titles, views, likes, comments, thumbnails, channel stats, tags. Search by keyword or scrape entire channels. Requires YouTube API key. Perfect for content research, competitor analysis, trend monitoring.

Use cases

  • Research a keyword's competition and top-performing videos
  • Track a channel's upload cadence and view growth
  • Benchmark competitor channels for content strategy
  • Build a video-discovery or curation feed
  • Collect metadata for thumbnail and title analysis

Input

You need your own free YouTube Data API v3 key. Get one at https://console.cloud.google.com/apis/library/youtube.googleapis.com — it takes a minute and costs nothing. Without it the Actor cannot fetch data.

ParameterTypeRequiredDefaultDescription
apiKeystringNoYour YouTube Data API v3 key. Get it from Google Cloud Console.
keywordstringNo"machine learning"Keyword to search for videos (required for search mode)
channelIdstringNoOptional: Scrape specific channel's data
maxResultsintegerNo50Maximum number of results to return (1-500)
sortstringNo"relevance"Sort results by Allowed: relevance, date, viewCount, rating.
videoTypestringNo"any"Filter by video type Allowed: any, episode, movie.
videoDurationstringNo"any"Filter by video duration Allowed: any, short, medium, long.

Example input

{
"keyword": "machine learning",
"maxResults": 50,
"sort": "relevance",
"videoType": "any",
"videoDuration": "any",
"apiKey": "YOUR_API_KEY"
}

Output

Each dataset item has the following shape (fields vary by mode):

FieldType
videoIdstring
titlestring
channelTitlestring
viewCountnumber
likeCountnumber
publishedAtstring
urlstring

The dataset also ships a preset table view (Overview), so the key columns are readable straight away in Apify Console, and exportable to JSON, CSV, Excel, or XML.

How to run it

In Apify Console — open the Actor, fill in the input form, click Start, then download the results from the Dataset tab.

With the JavaScript client

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('cloud9_ai/youtube-scraper').call({
"keyword": "machine learning",
"maxResults": 50,
"sort": "relevance",
"videoType": "any",
"videoDuration": "any",
"apiKey": "YOUR_API_KEY"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

With the Python client

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('cloud9_ai/youtube-scraper').call(run_input={
"keyword": "machine learning",
"maxResults": 50,
"sort": "relevance",
"videoType": "any",
"videoDuration": "any",
"apiKey": "YOUR_API_KEY"
})
for item in client.dataset(run['defaultDatasetId']).iterate_items():
print(item)

With the APIPOST https://api.apify.com/v2/acts/cloud9_ai~youtube-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN with the input JSON as the body.

Notes and limits

  • Bring your own YouTube Data API v3 key (free — https://console.cloud.google.com/apis/library/youtube.googleapis.com). It is a secret input, so it is not written to the dataset or the log.
  • maxResults caps how much a single run collects, which is also what caps the run's cost.
  • Requests to the source are paced to stay inside its rate limits.
  • Only publicly available data is collected. How you use the output is your responsibility, including the source's terms of use and any applicable data-protection law.

Support

Found a bug, or need a field that isn't in the output? Open an issue on the Issues tab of this Actor in Apify Console. Issues there are read and answered.

License

Apache-2.0