# YouTube Search API: Rankings, Views & Transcripts (`steady-scrape/youtube-search-video-stats`) Actor

Search YouTube by keyword and get ranked videos, Shorts, views, channels and publish dates, plus optional likes, comments count, subscriber count, tags and transcripts for any video. No login, no browser, no proxies to manage.

- **URL**: https://apify.com/steady-scrape/youtube-search-video-stats.md
- **Developed by:** [SteadyScrape](https://apify.com/steady-scrape) (community)
- **Categories:** Social media, Videos, Marketing
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.13 / 1,000 search results

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 Search API: Rankings, Views & Transcripts

Search YouTube by keyword and get the results **in the order YouTube ranks them**: videos, Shorts, views, channel, publish date and duration. Add full video stats (likes, comment count, channel subscribers, tags, category, full description) and **transcripts** with one switch. You can also look up a list of video URLs directly.

No YouTube login, no browser, no proxies to configure. The data comes from a licensed SERP data API instead of scraping YouTube pages, so runs don't break when YouTube changes its HTML and don't fail on 403s or rate limits.

### What you can do with it

- **Keyword research for YouTube:** see who ranks for a query, their view counts, and how old the top videos are.
- **Track your channel's rank:** add your channel to *Track my channels* and schedule a daily run. The run summary shows your best position for every query.
- **Competitor and influencer research:** get views, likes, comments and subscriber counts for any list of videos.
- **Transcripts for AI and content work:** pull captions (optionally translated) for search results or for your own list of videos.
- **Shorts vs long-form:** every row has `isShort`, and you can turn Shorts off.

### Input

| Field | What it does |
|---|---|
| Search queries | Keywords, one per line |
| Max results per query | 1-700 ranked results per query (default 20) |
| Country / Language | Where and in which language to search (default US / en) |
| Include Shorts | Keep Shorts in results (default on) |
| Include channel and playlist results | Also return channel and playlist cards |
| Video URLs or IDs | Look up specific videos (watch, youtu.be, Shorts or IDs) |
| Add full video stats | Likes, comments, subscribers, tags, category, description for search results |
| Add transcripts | Captions text; optionally timestamped segments and translation |
| Track my channels | Channel URLs, @handles or IDs to flag and rank-check |

Example:

```json
{
  "searchQueries": ["python tutorial", "home espresso machine review"],
  "maxResultsPerQuery": 20,
  "country": "US",
  "addVideoDetails": true,
  "trackChannels": ["@yourchannel"]
}
```

### Output

One dataset row per search result or per video. Search rows look like this:

```json
{
  "type": "search",
  "query": "python tutorial",
  "position": 1,
  "resultType": "video",
  "videoId": "abc123def45",
  "url": "https://www.youtube.com/watch?v=abc123def45",
  "title": "Python Tutorial for Beginners",
  "channelName": "Example Channel",
  "channelHandle": "@example",
  "viewCount": 1250000,
  "publishedAt": "2025-03-14T10:00:00+00:00",
  "durationSec": 3720,
  "isShort": false,
  "likeCount": 31000,
  "commentCount": 1200,
  "channelSubscriberCount": 850000,
  "status": "ok"
}
```

The dataset has three views: **Search results**, **Video stats** and **Transcripts**. The `OUTPUT` record holds a run summary with totals, the events charged and the tracked channels' positions per query.

### Pricing

Pay per result. No monthly fee and no proxy costs.

| Event | Price | Paid plans (Bronze / Silver / Gold) |
|---|---|---|
| Run start (once per run, only when results are delivered) | $0.02 | $0.02 |
| Search result | $0.0015 ($1.50 per 1,000) | $0.00135 / $0.0012 / $0.001125 |
| Full video stats (per video) | $0.006 | $0.0054 / $0.0048 / $0.0045 |
| Transcript (per video with captions) | $0.0065 | $0.00585 / $0.0052 / $0.004875 |

Example runs at list price:

| Run | Cost |
|---|---|
| 1 query, top 20 results | $0.05 |
| Daily rank check: 5 queries x 50 results | $0.40 per day |
| 10 queries x 100 results | $1.52 |
| 2 queries x 20 results + full stats + transcripts | about $0.55 |
| 100 video URLs with full stats | $0.62 |

You are **not** charged for:

- queries with no results, videos that don't exist or are private, and videos without captions;
- invalid inputs and errors;
- results skipped because your max charge per run was reached.

Set **Maximum cost per run** in the run options to cap your spend; the Actor plans the run to fit and reports anything skipped.

### Run time and cost examples

Costs use the current list prices on the Apify Free plan, including Apify's $0.00005 start event. Run times are from our own test runs in October 2026 at the default memory; yours depend on the input.

| Run | Run time (our tests) | Cost (Free plan) |
|---|---|---|
| 1 query, top 20 results | not measured yet | about $0.05 |
| 5 queries x 50 results (daily rank check) | not measured yet | about $0.40 |
| 100 video URLs with full stats | not measured yet | about $0.62 |

Search result: $0.0015 on the Apify Free plan, $0.00135 on Starter (Bronze), $0.0012 on Scale (Silver), $0.001125 on Business (Gold) and above. The discount is applied automatically. Full video stats: $0.006 / $0.0054 / $0.0048 / $0.0045. Transcript: $0.0065 / $0.00585 / $0.0052 / $0.004875.

### Notes and limits

- Results reflect what YouTube shows a signed-out viewer in the chosen country. Personalized results are not available.
- Data is public video and channel metadata only. No comments text, no personal data, no account access.
- Results are fetched through a queue and usually arrive within 10-30 seconds per batch, so a run of a few hundred queries still finishes in minutes.
- View counts in search results can be rounded by YouTube; turn on *full video stats* for exact counts.
- Transcripts are YouTube's captions (manual or auto-generated). Very long transcripts are truncated at 1,000,000 characters.

### Use it from an AI agent (Apify MCP)

Give Claude, Cursor, VS Code or any other MCP client this Actor as a tool through the [Apify MCP server](https://mcp.apify.com). Add this to your client's MCP config; you sign in to Apify with OAuth on first connect:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=steady-scrape/youtube-search-video-stats"
    }
  }
}
```

Clients without OAuth can send an `Authorization: Bearer <APIFY_TOKEN>` header instead. Then ask, for example: *"Search YouTube for 'n8n tutorial', return the top 20 videos with views and publish dates, and get the transcript of the top one."* The agent starts a normal run, so the prices above and your maximum charge per run still apply.

### FAQ

**How do I track where my video ranks on YouTube for a keyword?** Run your keywords on a daily schedule. Each result has its rank position, so you can chart where your video sits over time.

**Can I get YouTube transcripts in bulk?** Yes. Add video URLs (or search results) with transcripts on. You pay $0.0065 per video that has captions; videos without captions are free.

**Do I need a YouTube API key or quota?** No. There's no API key, login, browser or proxy to manage.

**How much does a YouTube search cost?** One query with the top 20 results costs about $0.05, including the $0.02 run start.

### Support

Open an issue on the Issues tab with your run ID and we'll take a look, usually within a day.

### Acceptable use

You may not use results from this service to build or operate a search engine, or any product or service that competes with or harms the business of search engine providers.

— SteadyScrape

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search on YouTube, one per line. Each query returns the results in the same order YouTube ranks them. Duplicates are removed; queries over 300 characters are reported for free.

## `maxResultsPerQuery` (type: `integer`):

How many ranked results to return per query (1-700). You only pay for rows you get.

## `country` (type: `string`):

Country to search from, as a 2-letter code (US, GB, DE, IN...) or an English name. Rankings differ by country.

## `language` (type: `string`):

Interface language code, e.g. en, es, de, fr, pt, ja.

## `includeShorts` (type: `boolean`):

Keep YouTube Shorts in search results. Each row has isShort so you can filter later.

## `includeChannelsAndPlaylists` (type: `boolean`):

Also return channel and playlist cards that appear in search results (off = videos and Shorts only).

## `videos` (type: `array`):

Optional. Look up specific videos directly (watch, youtu.be, Shorts, embed URLs or 11-character IDs). Each returns full video stats.

## `addVideoDetails` (type: `boolean`):

Adds likes, comment count, channel subscriber count, tags, category, full description and caption languages to each video in search results. Charged per video enriched.

## `addTranscripts` (type: `boolean`):

Adds the video transcript (captions) to each video in search results and to each video URL. Charged per transcript found; videos without captions are free.

## `transcriptSegments` (type: `boolean`):

Also return transcript segments with start/end times, not just the plain text.

## `transcriptLanguage` (type: `string`):

Optional language code (e.g. en, es). Leave empty to get the original captions.

## `trackChannels` (type: `array`):

Optional channel URLs, @handles or channel IDs. Rows from these channels get isTrackedChannel = true and the run summary lists each query's best position for them, so you can schedule a daily rank check.

## Actor input object example

```json
{
  "searchQueries": [
    "python tutorial",
    "home espresso machine review"
  ],
  "maxResultsPerQuery": 20,
  "country": "US",
  "language": "en",
  "includeShorts": true,
  "includeChannelsAndPlaylists": false,
  "addVideoDetails": false,
  "addTranscripts": false,
  "transcriptSegments": false
}
```

# Actor output Schema

## `search` (type: `string`):

No description

## `videos` (type: `string`):

No description

## `transcripts` (type: `string`):

No description

## `summary` (type: `string`):

Totals, charges and tracked-channel positions.

# 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 = {
    "searchQueries": [
        "python tutorial",
        "home espresso machine review"
    ],
    "maxResultsPerQuery": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("steady-scrape/youtube-search-video-stats").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 = {
    "searchQueries": [
        "python tutorial",
        "home espresso machine review",
    ],
    "maxResultsPerQuery": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("steady-scrape/youtube-search-video-stats").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 '{
  "searchQueries": [
    "python tutorial",
    "home espresso machine review"
  ],
  "maxResultsPerQuery": 20
}' |
apify call steady-scrape/youtube-search-video-stats --silent --output-dataset

```

## MCP server setup

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

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/JsViS3aczIMdcEHTo/builds/ekFWxfgQcOdGeGxgU/openapi.json
