YouTube Video Data Scraper avatar

YouTube Video Data Scraper

Pricing

from $3.99 / 1,000 results

Go to Apify Store
YouTube Video Data Scraper

YouTube Video Data Scraper

Extract rich public YouTube video and channel metadata, including descriptions, engagement labels, chapters, thumbnails, captions, availability signals, and bounded related-video cards when exposed.

Pricing

from $3.99 / 1,000 results

Rating

0.0

(0)

Developer

Google API

Google API

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Features

Limited permissions

Share

Collect public metadata from YouTube videos. Provide video URLs or IDs, or use a YouTube search query to find videos. Each dataset record represents one video.

Input

  • videoUrls: Public YouTube watch, Shorts, live, embed, or youtu.be links, or 11-character video IDs.
  • startUrls: Public video or search URLs.
  • query / queries: Public YouTube search phrases. Each query reads its first results page.
  • maxItems: Maximum valid video records; defaults to 10.
  • page / maxPages: Search continuation pages are not supported; only the first search page is read.
  • proxyConfiguration: Optional Apify Proxy settings for public requests.
  • sourceMode: public_watch (default) preserves the original public player/watch-page scraper, including its access-boundary behavior; that public route is not retried or bypassed. youtube_data_api is a separate, default-off adapter backed by the YouTube Data API videos.list (part=snippet,statistics,contentDetails).

Example input:

{
"videoUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
"maxItems": 1
}

Dataset

Each record includes videoId, title, videoUrl, and canonicalUrl. Other fields can include:

  • Channel: Name, ID, handle, URL, profile images, verification badge, and subscriber counts.
  • Description: Complete public description, snippet, character count, links, and formatted HTML.
  • Engagement and duration: Views, likes, comments, live-viewer counts, duration, and source labels. Live viewers are separate from lifetime views.
  • Dates and status: Publication and upload dates, relative date text, live times, category, language, playability, and explicit public status flags.
  • Availability and captions: Available countries, caption availability, languages, and public caption track metadata.
  • Additional details: Keywords, hashtags, chapters, related video cards, license, and music credits when exposed.

Counts and flags appear only when YouTube provides them. Abbreviated counts are marked approximate; relative dates are not converted into estimated timestamps.

Example output record (selected source-backed fields; counts change over time):

{
"videoId": "jNQXAC9IVRw",
"title": "Me at the zoo",
"videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"canonicalUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"channelName": "jawed",
"descriptionLength": 264,
"durationSeconds": 19,
"viewCount": 448689390,
"likeCount": 20139722,
"relativeDateText": "21y ago"
}

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

Authorized API mode (default-off)

sourceMode: "youtube_data_api" uses exactly one bounded videos.list request for explicit video IDs. It consumes only the snippet, statistics, and contentDetails parts: the complete returned description (never a 500-character snippet), source-backed chapters and links, source-only tags, exact statistics, and a comment count only when the API returns one. Player-only fields (playability, captions, live state, category, subscriber/verification signals, related cards) are omitted rather than synthesized, and no video/audio download field is ever produced. When the credential is absent, the run emits zero dataset rows and makes zero API requests (API_AUTHORIZATION_PENDING).

Credential mechanism (exactly one): a protected environment secret named APIFY_SECRET_YOUTUBE_DATA_API_KEY (plain YOUTUBE_DATA_API_KEY fallback), supplied as a protected Apify environment secret — never as an input field. The key is attached only as the X-Goog-Api-Key request header, never placed in a URL, dataset row, log line, diagnostic, or Key-Value Store record. apify@3.7.2 has no Actor.getSecret(). This independent Actor is not affiliated with YouTube or Google; API mode requires your own authorized project, credential, quota, and data-use review.

Billing/quota prerequisite: even with a configured key, the adapter stops before the first request unless the protected environment variable YOUTUBE_DATA_API_BILLING_CONFIRMED is set to the exact string true (operator attestation that the authorized project has the YouTube Data API enabled, billing attached and quota available). A missing or unconfirmed attestation emits zero dataset rows and writes API_AUTHORIZATION_PENDING with reason billing_quota_prerequisite_missing; it never retries or falls back to the public watch page. Provider-issued quota/billing refusals (403/429 with an allowlisted reason) are likewise terminal stops with no identical retry. Public sourceMode never reads this variable.

Results and limits

maxItems applies across direct videos and search results. Search sources read one initial results page each; later pages are not loaded.

Run output provides a dataset link, output totals, and run health information.

Responsible use

This Actor reads public YouTube video information. Follow YouTube's terms, applicable law, and your data-protection obligations. This independent Actor is not affiliated with or endorsed by YouTube or Google.