# YouTube Video Details Scraper - Stats, Subtitles & Comments (`socialscrapers/youtube-video-details-scraper`) Actor

YouTube Video Details Scraper: full details of YouTube videos from URLs or IDs: title, description, exact views, likes, comment count, publish date, duration, tags, chapters, channel. Optional subtitles (SRT, VTT, text) and comments. No login or API key. $0.46 per 1,000 videos.

- **URL**: https://apify.com/socialscrapers/youtube-video-details-scraper.md
- **Developed by:** [Social Scrapers](https://apify.com/socialscrapers) (community)
- **Categories:** Videos, Social media, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.37 / 1,000 videos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

**YouTube Video Details Scraper** gets the **full details of any YouTube video** from its URL or ID: title, description, **exact views, likes and comment count**, publish date and time, duration, tags, hashtags, chapters, category, thumbnail, links in the description, and the channel with its subscribers. Add **subtitles** (SRT, WebVTT, plain text or XML, in the languages you choose) and **comments with replies** when you need them. **No login, no API key**: paste a list of videos and download JSON, CSV or Excel, from **$0.46 per 1,000 videos**.

> 💡 **Need a feature that isn't here? Just ask.** Open an issue on the **Issues** tab and tell us what you need: a new field, filter, input type or output format. We build requested features fast, usually within 24 hours, at no extra cost.

> ⭐ **Found it useful?** A short review on the **Reviews** tab helps other people find this scraper, and tells us what to build next.

### What does YouTube Video Details Scraper do?

- 🎬 **Reads every video you paste**: watch URLs, `youtu.be` share links, Shorts, live and embed URLs, or bare 11-character video IDs, in any mix.
- 📊 **Exact numbers**: exact view, like and comment counts as YouTube stores them, not rounded "1.2M" labels.
- 🧾 **The whole metadata**: title, full description, tags, hashtags, category, chapters with their start times, links in the description, publish date and time, duration, and flags for Shorts, live streams, members-only, age-restricted, unlisted and paid promotion.
- 💬 **Optional subtitles**: the creator's captions or YouTube's automatic ones, in your preferred languages or all of them, as SRT, WebVTT, plain text or XML.
- 🗨️ **Optional comments**: top or newest comments of each video, with their replies, likes, authors and dates, saved right after the video.
- ✅ **Pay only for what is saved**: a video that is private or deleted costs nothing, and a maximum cost per run stops the scraper cleanly.

### What data can you extract from a YouTube video?

| Item | Data |
| --- | --- |
| **Video** | title, description, URL, publish date and time, duration (seconds and hh:mm:ss), views, likes, comment count, comments turned off, tags, hashtags, category, thumbnail, chapters, links in the description, video type (video, Short, stream), live status, members-only, age-restricted, unlisted, family-safe, paid promotion |
| **Channel of the video** | channel name, @handle, URL and ID, subscribers, verified badge |
| **Subtitles** (optional) | language, language name, automatic or by the creator, format, the subtitle text with its timing |
| **Comments** (optional) | text, author and author channel, likes, reply count, date, pinned, edited, hearted by the creator, the parent comment for replies |

### How to get YouTube video details

1. Open YouTube Video Details Scraper on Apify and click **Try for free**.
2. Paste the **video URLs or IDs**, one per line.
3. Optionally turn on **Save subtitles** and pick the languages and format.
4. Optionally turn on **Save comments** and set how many per video.
5. Click **Start**, then download the results as JSON, CSV, Excel, XML or HTML, or read them through the API.

#### How to get a video's transcript with its details

Turn on **Save subtitles** and pick **Plain text** as the format for the words only, or **SRT** to keep the timing. Leave the languages at `en` to get English, or list several in order of preference.

#### How to check the stats of many videos at once

Paste hundreds or thousands of URLs or IDs: they are read side by side, each video once, even if it appears twice in your list. Schedule the run to track how views and likes grow.

#### How to export a video's comments with its details

Turn on **Save comments**, set **Max comments per video**, and choose top or newest first. Each comment is saved as its own item right after its video, so a CSV export lists the video and then its comments.

### How much does it cost to get YouTube video details?

Pay per result, with platform usage and proxies included and no monthly fee for the Actor:

| Result | Price per 1,000 | Silver plan | Gold plan |
| --- | --- | --- | --- |
| Videos (all details) | **$0.46** | $0.414 | $0.368 |
| Subtitles (per video, only with Save subtitles on) | **$0.94** | $0.846 | $0.752 |
| Comments (replies included, only with Save comments on) | **$0.23** | $0.207 | $0.184 |

Each run also has Apify's standard **Actor start** charge: $0.001 per run (one event per GB of memory, at least one; this Actor uses at most 1 GB, so one event per run).

Examples:

- **The details of 1,000 videos**: **$0.46**.
- **1,000 videos with English subtitles**: $0.46 + $0.94 = **$1.40**.
- **100 videos with 200 comments each** (20,000 comments): $0.05 + $4.60 = **$4.65**.

Apify's free plan comes with $5 of platform credit every month, enough for the details of about 10,000 videos. Set a **maximum cost per run** and the scraper stops cleanly before the first result that would go over it.

### Input example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=iG9CE55wbtY",
    "https://youtu.be/jNQXAC9IVRw",
    "dQw4w9WgXcQ"
  ],
  "downloadSubtitles": true,
  "subtitlesLanguages": ["en"],
  "subtitlesFormat": "srt",
  "includeComments": true,
  "maxCommentsPerVideo": 100,
  "commentsSortBy": "top"
}
```

### Output example

A TED talk with its English subtitles (shortened):

```json
{
  "dataType": "video",
  "id": "iG9CE55wbtY",
  "url": "https://www.youtube.com/watch?v=iG9CE55wbtY",
  "title": "Do schools kill creativity? | Sir Ken Robinson | TED",
  "description": "Visit http://TED.com to get our entire library of TED Talks, transcripts, translations ...",
  "publishedAt": "2007-01-07T05:00:34.000Z",
  "durationSeconds": 1203,
  "duration": "00:20:03",
  "viewCount": 25109861,
  "likeCount": 308410,
  "commentCount": 13056,
  "commentsTurnedOff": false,
  "tags": ["TED", "TEDTalks", "education", "creativity", "innovation"],
  "category": "Education",
  "thumbnail": "https://i.ytimg.com/vi/iG9CE55wbtY/hqdefault.jpg",
  "videoType": "video",
  "liveStatus": "none",
  "isAgeRestricted": false,
  "isUnlisted": false,
  "chapters": [
    { "title": "Introduction", "startSeconds": 0 },
    { "title": "Three themes", "startSeconds": 42 }
  ],
  "subtitles": [
    {
      "language": "en",
      "languageName": "English",
      "isAutoGenerated": false,
      "format": "srt",
      "content": "1\n00:00:27,103 --> 00:00:29,678\nGood morning. How are you?\n\n2\n00:00:29,702 --> 00:00:31,105\n(Audience) Good.\n..."
    }
  ],
  "channelId": "UCAuUUnT6oDeKwE6v1NGQxug",
  "channelName": "TED",
  "channelHandle": "@TED",
  "channelUrl": "https://www.youtube.com/@TED",
  "channelSubscriberCount": 28000000,
  "channelIsVerified": true,
  "sourceType": "video",
  "sourceUrl": "https://www.youtube.com/watch?v=iG9CE55wbtY",
  "scrapedAt": "2026-11-12T22:28:28.900Z"
}
```

One of its comments, saved right after it:

```json
{
  "dataType": "comment",
  "id": "UgwmFj3VNoshBQcwt8N4AaABAg",
  "videoId": "iG9CE55wbtY",
  "videoTitle": "Do schools kill creativity? | Sir Ken Robinson | TED",
  "text": "It's incredibly upsetting how old is this and how everything is still the same.",
  "likeCount": 5200,
  "replyCount": 55,
  "publishedAt": "2019-11-12T00:00:00.000Z",
  "publishedTimeText": "7 years ago",
  "isPinned": false,
  "hasCreatorHeart": false,
  "parentId": null
}
```

### Use cases

- **Performance tracking**: views, likes and comment counts of your videos or a competitor's, checked on a schedule.
- **Content research**: titles, descriptions, tags, chapters and lengths of the videos that work in your niche.
- **Catalog enrichment**: turn a spreadsheet of video links into complete, structured records.
- **AI and NLP datasets**: video metadata with transcripts and audience comments, ready for summarization or analysis.
- **Link and sponsor audits**: the links in each description and the paid promotion flag.

### Use it via API, Python, JavaScript and integrations

Run it and get the results in one call with the [Apify API](https://docs.apify.com/api/v2):

```bash
curl -X POST "https://api.apify.com/v2/acts/socialscrapers~youtube-video-details-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": ["https://www.youtube.com/watch?v=iG9CE55wbtY", "jNQXAC9IVRw"]}'
```

Python, with the [Apify client](https://docs.apify.com/api/client/python):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("socialscrapers/youtube-video-details-scraper").call(run_input={
    "startUrls": ["https://youtu.be/iG9CE55wbtY"],
    "downloadSubtitles": True,
    "subtitlesFormat": "plaintext",
})
for video in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(video["title"], video["viewCount"], video["likeCount"])
```

JavaScript, with the [Apify client](https://docs.apify.com/api/client/js):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('socialscrapers/youtube-video-details-scraper').call({ startUrls: ['jNQXAC9IVRw'], includeComments: true, maxCommentsPerVideo: 50 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Schedule runs, get a webhook when one finishes, or send the results to **Make, Zapier, n8n, Google Sheets** and other tools through [Apify integrations](https://docs.apify.com/integrations). AI agents and assistants can run it through [Apify's MCP server](https://docs.apify.com/mcp).

### YouTube Data API vs YouTube Video Details Scraper

| | Official YouTube Data API | YouTube Video Details Scraper |
| --- | --- | --- |
| Setup | Google Cloud project and API key | None: paste the videos |
| Limits | 10,000 quota units a day by default | No quota |
| Subtitles | Downloading caption tracks needs the video owner's authorization | Any public video's subtitles, in the languages you pick |
| Chapters | Not returned | Chapter titles and start times |
| Price | Free within the quota | $0.46 per 1,000 videos |

### Limits

- **Public videos only.** The scraper never signs in. A video that is private or deleted, or that YouTube shows only to signed-in viewers, gets a status line in the run's message instead of a result, and costs nothing. Members-only and age-restricted videos are saved, with their flags, when YouTube shows their details to visitors.
- **Subscriber counts** are as precise as YouTube shows them ("28M" becomes 28000000). Video views, likes and comment counts are exact.
- **Comment dates** are estimated from YouTube's "3 weeks ago" text, to the day for dates a day or more back.
- **Live chat** is not collected; live streams have a chat instead of comments.
- **A run with 0 results still succeeds**, with a status message naming each video and why. When nothing in the input can be used at all, the run also ends as Succeeded, with a status message that starts "Nothing to scrape:" and says what to fix; no results are charged. A run fails only when YouTube refuses every one of 3 or more videos and a well-known public channel is refused too (the scraper is then blocked; try again later).
- **Runs stop in time.** A run that is about to reach its timeout stops a little early, keeps every result it saved and ends as Succeeded; raise the timeout to get more.

### FAQ

**Is it legal to scrape YouTube video details?**
YouTube Video Details Scraper collects only data that anyone can see without signing in. Comments and channel names can be personal data protected by laws such as the GDPR, so collect only what you need. You are responsible for how you use the data and for following YouTube's terms and the laws that apply to you.

**Do I need a YouTube API key or account?**
No. Paste the videos and start the run.

**Which links work?**
Watch URLs, `youtu.be` links (with or without the app's `?si=…` share parameter), `m.youtube.com` and `music.youtube.com` links, Shorts, live and embed URLs, and bare video IDs.

**How do I get the videos of a channel or a search?**
Use [YouTube Channel Scraper](https://apify.com/socialscrapers/youtube-channel-scraper) for channels, or [YouTube Scraper](https://apify.com/socialscrapers/youtube-scraper) for channels, playlists, hashtags and search in one Actor; they save the same video details.

**Can I get only the transcript?**
[YouTube Transcript Scraper](https://apify.com/socialscrapers/youtube-transcript-scraper) is built for transcripts alone, with timed segments and SRT or WebVTT files.

**Does it download the videos?**
No. It collects data about the videos, not the video files.

### Other scrapers by Social Scrapers

| Scraper | What it gets |
| --- | --- |
| [TikTok API](https://apify.com/socialscrapers/tiktok-api) | Profiles, Videos and Comments |
| [TikTok Comments Scraper](https://apify.com/socialscrapers/tiktok-comments-scraper) | Comments, Replies and Likes |
| [TikTok Hashtag Scraper](https://apify.com/socialscrapers/tiktok-hashtag-scraper) | Top Videos, Views and Likes |
| [TikTok Profile Scraper](https://apify.com/socialscrapers/tiktok-profile-scraper) | Followers, Bio, Stats and Videos |
| [TikTok Scraper](https://apify.com/socialscrapers/tiktok-scraper) | Videos, Profiles, Hashtags and Comments |
| [TikTok Sound Scraper](https://apify.com/socialscrapers/tiktok-sound-scraper) | Videos Using a Sound and Music Info |
| [TikTok Video Scraper](https://apify.com/socialscrapers/tiktok-video-scraper) | Views, Likes, Captions and Comments |
| [Instagram API](https://apify.com/socialscrapers/instagram-api) | Profiles, Posts, Reels, Comments and Hashtags |
| [Instagram Comments Scraper](https://apify.com/socialscrapers/instagram-comments-scraper) | Comments, Likes and Reply Counts |
| [Instagram Hashtag Scraper](https://apify.com/socialscrapers/instagram-hashtag-scraper) | Reels and Keyword Search |
| [Instagram Post Details Scraper](https://apify.com/socialscrapers/instagram-post-details-scraper) | Likes, Comments, Views and Media |
| [Instagram Post Scraper](https://apify.com/socialscrapers/instagram-post-scraper) | Posts, Reels and Comments |
| [Instagram Profile Scraper](https://apify.com/socialscrapers/instagram-profile-scraper) | Followers, Bio, Posts and Reels |
| [Instagram Reels Scraper](https://apify.com/socialscrapers/instagram-reels-scraper) | Reels, Plays, Likes and Comments |
| [Instagram Reels Transcript Scraper](https://apify.com/socialscrapers/instagram-reels-transcript-scraper) | Speech to Text and Captions |
| [Instagram Scraper](https://apify.com/socialscrapers/instagram-scraper) | Posts, Profiles, Reels, Comments and Hashtags |
| [YouTube API](https://apify.com/socialscrapers/youtube-api) | Videos, Transcripts, Search, Channels and Comments |
| [YouTube Channel Scraper](https://apify.com/socialscrapers/youtube-channel-scraper) | Videos, Shorts, Subscribers and About |
| [YouTube Comments Scraper](https://apify.com/socialscrapers/youtube-comments-scraper) | Comments, Replies and Likes |
| [YouTube Scraper](https://apify.com/socialscrapers/youtube-scraper) | Videos, Shorts, Channels and Comments |
| [YouTube Search Scraper](https://apify.com/socialscrapers/youtube-search-scraper) | Videos, Channels, Views and Filters |
| [YouTube Shorts Scraper](https://apify.com/socialscrapers/youtube-shorts-scraper) | Shorts, Views, Likes and Search |
| [YouTube Transcript Scraper](https://apify.com/socialscrapers/youtube-transcript-scraper) | Subtitles, Captions and SRT |
| [Facebook Ads Library Scraper](https://apify.com/socialscrapers/facebook-ads-library-scraper) | Meta Ad Library and Spend |
| [Facebook Comments Scraper](https://apify.com/socialscrapers/facebook-comments-scraper) | Posts, Reels, Videos and Replies |
| [Facebook Groups Scraper](https://apify.com/socialscrapers/facebook-groups-scraper) | Public Group Posts and Reactions |
| [Facebook Marketplace Scraper](https://apify.com/socialscrapers/facebook-marketplace-scraper) | Prices, Locations and Sellers |
| [Facebook Page Contact Info Scraper](https://apify.com/socialscrapers/facebook-page-contact-scraper) | Email, Phone and WhatsApp |
| [Facebook Posts Scraper](https://apify.com/socialscrapers/facebook-profile-posts-scraper) | Pages, Profiles and Timelines |
| [Facebook Pages Scraper](https://apify.com/socialscrapers/facebook-profile-scraper) | Profiles, Contact Info and Reviews |
| [Facebook Reels Scraper](https://apify.com/socialscrapers/facebook-reels-scraper) | Reels, Videos, Plays and Captions |
| [X (Twitter) Profile Scraper](https://apify.com/socialscrapers/x-profile-scraper) | Followers, Bio and Tweets |
| [X (Twitter) Tweet Scraper](https://apify.com/socialscrapers/x-tweet-scraper) | Latest Posts by Profile |
| [Threads Profile Scraper](https://apify.com/socialscrapers/threads-profile-scraper) | Followers, Bio, Links and Posts |
| [Threads Replies Scraper](https://apify.com/socialscrapers/threads-replies-scraper) | Comments, Authors, Likes and Media |
| [Threads Scraper](https://apify.com/socialscrapers/threads-scraper) | Posts, Profiles, Replies and Search |
| [Threads Search Scraper](https://apify.com/socialscrapers/threads-search-scraper) | Keywords, Hashtags, Top and Recent Posts |
| [Reddit Comments Scraper](https://apify.com/socialscrapers/reddit-comments-scraper) | Threads, Replies, Votes and Authors |
| [Reddit Scraper](https://apify.com/socialscrapers/reddit-scraper) | Posts, Comments, Subreddits, Users and Search |
| [Reddit Search Scraper](https://apify.com/socialscrapers/reddit-search-scraper) | Posts by Keyword, Subreddit and Date |
| [Reddit User Scraper](https://apify.com/socialscrapers/reddit-user-scraper) | Profiles, Karma, Posts and Comments |
| [Subreddit Scraper](https://apify.com/socialscrapers/subreddit-scraper) | Hot, New and Top Posts with Comments |
| [Quora Scraper](https://apify.com/socialscrapers/quora-scraper) | Answers, Questions, Profiles and Topic Search |
| [LinkedIn Ad Library Scraper](https://apify.com/socialscrapers/linkedin-ad-library-scraper) | Ads, Advertisers and Impressions |
| [LinkedIn Job Search Scraper](https://apify.com/socialscrapers/linkedin-job-search-scraper) | Filters, Salaries and New Jobs |
| [LinkedIn Jobs Scraper](https://apify.com/socialscrapers/linkedin-jobs-scraper) | Job Listings, Salaries and Companies |
| [Google Maps Email Extractor](https://apify.com/socialscrapers/google-maps-email-extractor) | Emails, Phones and Social Links |
| [Google Maps Scraper](https://apify.com/socialscrapers/google-maps-scraper) | Places, Phones, Websites, Ratings and Hours |
| [Google News Scraper](https://apify.com/socialscrapers/google-news-scraper) | Headlines, Articles and Search |
| [Google Ads Transparency Scraper](https://apify.com/socialscrapers/google-ads-transparency-scraper) | Ad Creatives and Advertisers |
| [Amazon Product Scraper](https://apify.com/socialscrapers/amazon-product-scraper) | Search Results, Prices, Ratings, ASINs |
| [Indeed Jobs Scraper](https://apify.com/socialscrapers/indeed-jobs-scraper) | Salaries, Full Descriptions, Company Data |
| [Contact Details Scraper](https://apify.com/socialscrapers/contact-details-scraper) | Emails, Phones and Social Links |
| [Telegram Channel Scraper](https://apify.com/socialscrapers/telegram-channel-scraper) | Posts, Views and Media |
| [Doximity Scraper](https://apify.com/socialscrapers/doximity-physician-scraper) | Physician Profiles and Doctor Directory |
| [KevinMD Scraper](https://apify.com/socialscrapers/kevinmd-articles-scraper) | Physician Articles and Author Specialties |
| [Op-Med Scraper](https://apify.com/socialscrapers/opmed-articles-scraper) | Physician Essays and Doctor Profiles |
| [Career Site Jobs Scraper](https://apify.com/socialscrapers/career-site-jobs-scraper) | Greenhouse, Lever, Ashby and Workday |
| [Google Trends Scraper](https://apify.com/socialscrapers/google-trends-scraper) | Interest Over Time, Regions and Queries |

# Actor input Schema

## `startUrls` (type: `array`):

The videos to get, one per line: <code>https://www.youtube.com/watch?v=…</code>, <code>https://youtu.be/…</code>, Shorts, live and embed URLs, or bare 11-character video IDs. Share links with the app's <code>?si=…</code> parameter work as they are.

## `downloadSubtitles` (type: `boolean`):

Save each video's subtitles (captions) with its details, in the language and format below. Videos without subtitles get an empty list.

## `subtitlesLanguages` (type: `array`):

Language codes in order of preference, such as <code>en</code>, <code>es</code> or <code>pt-BR</code>. Each video gets the first of these it has (the creator's subtitles before automatic ones), else its main language. Leave empty for the main language.

## `subtitlesAllLanguages` (type: `boolean`):

Save every subtitle language a video has, instead of one.

## `subtitlesIncludeAutoGenerated` (type: `boolean`):

Use YouTube's automatic (speech recognition) subtitles when a video has no subtitles from its creator in your language.

## `subtitlesFormat` (type: `string`):

SRT and WebVTT keep the timing; plain text is the words only; XML is YouTube's own timed text.

## `includeComments` (type: `boolean`):

Save each video's comments as separate items, right after the video.

## `maxCommentsPerVideo` (type: `integer`):

How many top-level comments to save for each video. No upper limit. Example: <code>1000</code>.

## `maxRepliesPerComment` (type: `integer`):

How many replies to save under each comment. 0 saves no replies. Example: <code>20</code>.

## `commentsSortBy` (type: `string`):

Top comments or newest first.

## `includeChannelInfo` (type: `boolean`):

Channel items are not part of this Actor.

## `proxyConfiguration` (type: `object`):

Residential proxies give the most reliable results.

## `maxConcurrency` (type: `integer`):

How many videos are read at the same time. Example: <code>20</code>.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=iG9CE55wbtY",
    "https://youtu.be/jNQXAC9IVRw"
  ],
  "downloadSubtitles": false,
  "subtitlesLanguages": [
    "en"
  ],
  "subtitlesAllLanguages": false,
  "subtitlesIncludeAutoGenerated": true,
  "subtitlesFormat": "srt",
  "includeComments": false,
  "maxCommentsPerVideo": 100,
  "maxRepliesPerComment": 0,
  "commentsSortBy": "top",
  "includeChannelInfo": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 20
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        "https://www.youtube.com/watch?v=iG9CE55wbtY",
        "https://youtu.be/jNQXAC9IVRw"
    ],
    "subtitlesLanguages": [
        "en"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialscrapers/youtube-video-details-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [
        "https://www.youtube.com/watch?v=iG9CE55wbtY",
        "https://youtu.be/jNQXAC9IVRw",
    ],
    "subtitlesLanguages": ["en"],
}

# Run the Actor and wait for it to finish
run = client.actor("socialscrapers/youtube-video-details-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://www.youtube.com/watch?v=iG9CE55wbtY",
    "https://youtu.be/jNQXAC9IVRw"
  ],
  "subtitlesLanguages": [
    "en"
  ]
}' |
apify call socialscrapers/youtube-video-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialscrapers/youtube-video-details-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/P7mN4ugeqWvsge8tg/builds/SwJ13H8YsXp2QXmHk/openapi.json
