# YouTube Scraper - Cheapest YouTube Search & Video API (`busayoroyalty08/youtube-scraper-api`) Actor

Cheapest YouTube scraper at $0.14 per 1,000 videos. Scrape YouTube search results by keyword: video titles, views, channel names, durations, publish dates and URLs (up to 20 videos per search term). YouTube data API with no API key or quota limits.

- **URL**: https://apify.com/busayoroyalty08/youtube-scraper-api.md
- **Developed by:** [DataLeadsPRO](https://apify.com/busayoroyalty08) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.14 / 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.

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 Scraper API – Videos, Search & Channels

Scrape YouTube videos, search results, channels, playlists, Shorts and trending content. Extract titles, descriptions, views, likes, comments, dates, thumbnails and channel metadata.

> **Pricing:** from **$0.0001/1,000 videos** - and **no charge for empty results**.
> You only pay for successfully delivered results. Failed, empty, duplicate and filtered results are free.

### What data can it extract?

Depending on the selected input, results can include:

- `videoId` - Unique video identifier.
- `title` - Title of the video or result.
- `channelTitle` - Title of the channel.
- `channelId` - Unique channel identifier.
- `views` - Number of views or plays.
- `likes` - Number of likes.
- `commentsCount` - Number of comments.
- `publishedAt` - Publication date in ISO 8601 format.
- `duration` - Video duration in ISO 8601 format.
- `thumbnailUrl` - Thumbnail image URL.
- `url` - Source URL of the item.

Unavailable fields are returned as `null` instead of fabricated values.

### Example output

```json
{
  "videoId": "dQw4w9WgXcQ",
  "title": "Example video title",
  "channelTitle": "Example Channel",
  "channelId": "UCexample123",
  "views": 1234567,
  "likes": 54321,
  "commentsCount": 4321,
  "publishedAt": "2026-09-01T10:00:00Z",
  "duration": "PT4M13S",
  "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
```

### How to use YouTube Scraper API

1. Click **Try for free** on the Apify Store page.
2. Add URLs, usernames or search terms.
3. Set **Maximum results** to control spending, then run.
4. Export as JSON, CSV, Excel, or consume via API.

### Usage

#### Python (Apify Client)

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_API_TOKEN')
run = client.actor('DataLeadsPRO/youtube-scraper-api').call(run_input={
    'searchTerms': ['space launch']
})
for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('DataLeadsPRO/youtube-scraper-api').call({
    'searchTerms': ['space launch']
});
const { items } = await client.dataset(run.defaultDatasetId).list();
console.log(items);
```

#### REST / OpenAPI

```bash
curl -X POST 'https://api.apify.com/v2/acts/DataLeadsPRO~youtube-scraper-api/runs?token=YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{ "searchTerms": ["space launch"] }'
```

This Actor ships an OpenAPI 3.1 specification (`openapi.yaml`) and can be exposed through MCP for AI agent integrations.

### YouTube data extractor

This YouTube data extractor covers videos, search results, channels and Shorts without YouTube Data API quota limits or API key management.

### Why DataLeadsPRO?

- Transparent per-result pricing with **no charge for empty results**
- Structured, documented output fields - no fabricated data
- Python, JavaScript, REST, CLI, OpenAPI and MCP integration examples
- Fast, maintained and monitored infrastructure

### Common use cases

- **Market research** - track public content, creators and engagement.
- **Competitor monitoring** - monitor public accounts, posts, videos or search results.
- **AI and LLM datasets** - feed structured public data into RAG systems, agents and analytics pipelines.
- **Lead and creator discovery** - build structured public datasets for research and outreach qualification.
- **Social listening** - monitor public conversations around brands, products or topics.

### Frequently asked questions

**How much does videos scraping cost?**

From $0.0001 per 1,000 successfully delivered results on the FREE tier, with Bronze, Silver and Gold volume tiers below that.

**Do empty searches cost money?**

No result event is charged when no successful result is delivered.

**Can I use this through an API?**

Yes - REST, Python, JavaScript, CLI, OpenAPI or MCP.

**Can I export the results?**

Yes. Apify datasets support JSON, CSV, Excel, XML and other formats.

**Can I schedule this scraper?**

Yes. Use Apify schedules to rerun saved inputs automatically.

### Related actors

- [DataLeadsPRO/x-twitter-scraper-api](https://github.com/DataLeadsPRO/x-twitter-scraper-api)
- [DataLeadsPRO/x-profile-scraper](https://github.com/DataLeadsPRO/x-profile-scraper)
- [DataLeadsPRO/x-scraper-unlimited](https://github.com/DataLeadsPRO/x-scraper-unlimited)
- [DataLeadsPRO/x-replies-scraper-api](https://github.com/DataLeadsPRO/x-replies-scraper-api)
- [DataLeadsPRO/x-list-scraper-api](https://github.com/DataLeadsPRO/x-list-scraper-api)
- [DataLeadsPRO/instagram-scraper-api](https://github.com/DataLeadsPRO/instagram-scraper-api)

### Responsible use

This Actor is intended for extracting publicly available information. Users are responsible for complying with applicable laws, platform terms and data-protection requirements. This Actor is an independent tool and is not affiliated with or endorsed by the platform owner.

### License

MIT - see [LICENSE](LICENSE).

# Actor input Schema

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

Add public YouTube URLs to scrape.

## `searchTerms` (type: `array`):

Keywords, hashtags or search queries.

## `usernames` (type: `array`):

Enter usernames without the @ symbol.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "searchTerms": [
    "space launch"
  ]
}
```

# Actor output Schema

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

Successfully extracted and billable results.

## `diagnostics` (type: `string`):

Failed, unavailable, duplicate or rejected inputs. These records are not billed as results.

# 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": [
        {
            "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
        }
    ],
    "searchTerms": [
        "space launch"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("busayoroyalty08/youtube-scraper-api").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": [{ "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }],
    "searchTerms": ["space launch"],
}

# Run the Actor and wait for it to finish
run = client.actor("busayoroyalty08/youtube-scraper-api").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": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "searchTerms": [
    "space launch"
  ]
}' |
apify call busayoroyalty08/youtube-scraper-api --silent --output-dataset

```

## MCP server setup

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

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/mBf0laMuH4SdCWvBf/builds/mzXjMQRghy2UPm1hQ/openapi.json
