# YouTube Video Scraper — Search, Metadata, Stats, Comments (`dexterous_material/opencalw-youtube-video-scraper`) Actor

Extract YouTube video data by search: titles, views, likes, comments, channel info, tags, durations. HTTP-only engine for speed and cost efficiency. Perfect for content research, SEO analysis, and competitor tracking.

- **URL**: https://apify.com/dexterous\_material/opencalw-youtube-video-scraper.md
- **Developed by:** [Daniel Ramacher](https://apify.com/dexterous_material) (community)
- **Categories:** Social media, Marketing, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Opencalw YouTube Video Scraper

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue)](https://apify.com/opencalw/opencalw-youtube-video-scraper)
![Version](https://img.shields.io/badge/version-1.0-green)
![Pricing](https://img.shields.io/badge/pricing-0.03%24%2Fvideo-orange)

Extract YouTube video data by search query — titles, descriptions, view counts, likes, comments, channel info, tags, and duration. HTTP-only engine using curl_cffi — no browser needed, no API quota limits.

---

### Features

- **Search by Query** — Find videos for any search term
- **Detailed Metadata** — Title, description, duration, tags
- **Engagement Stats** — Views, likes, comments
- **Channel Info** — Name and ID for each video
- **OEmbed Integration** — Fast metadata via YouTube OEmbed API
- **No API Key Needed** — Works without YouTube Data API
- **Free Tier Funnel** — First 5 videos free per run, then $0.03/video

### Use Cases

| Use Case | Description |
|----------|-------------|
| Content Research | Find trending videos by topic |
| SEO Analysis | Analyze video titles, tags, and descriptions |
| Competitor Tracking | Monitor competitor channel activity |
| Trend Monitoring | Track view/like patterns over time |
| Niche Discovery | Find underserved content categories |

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `queries` | array | ✅ | Search queries |
| `maxVideosPerQuery` | integer | ❌ | Max videos per query (default: 20, max: 100) |
| `language` | string | ❌ | UI language (default: "de") |

### Output

| Field | Type | Description |
|-------|------|-------------|
| `videoId` | string | YouTube video ID |
| `title` | string | Video title |
| `url` | string | Full video URL |
| `channelName` | string | Channel name |
| `channelId` | string | Channel ID |
| `duration` | string | Duration text (e.g., "12:34") |
| `viewCount` | integer | View count |
| `likeCount` | integer | Like count |
| `commentCount` | integer | Comment count |
| `description` | string | Video description (first 2000 chars) |
| `tags` | array | Video tags/keywords |
| `publishedAt` | string | Relative publish time |
| `thumbnailUrl` | string | Thumbnail URL |
| `isLive` | boolean | Is currently live? |

### Pricing

| Tier | Price | Description |
|------|-------|-------------|
| Free | $0.00 | First 5 videos per run |
| Paid | $0.03/video | Every video after free tier |

### Technical Details

#### Architecture

````

curl\_cffi Session -> YouTube Search HTML -> ytInitialData JSON
-> Video List -> OEmbed API (details) + Watch Page (stats)
-> Apify Dataset

````

#### Requirements

- Python 3.12+
- curl_cffi
- BeautifulSoup4

### Changelog

#### v1.0 (2026-05-15)
- Initial release
- YouTube search via ytInitialData parsing
- Video details via OEmbed API + Watch page
- Engagement stats (views, likes, comments)
- Free tier funnel (5 videos free per run)
- $0.03/video PPE pricing

### Part of the Opencalw Ecosystem

Maximize your data extraction with our complete suite of scrapers:

| Actor | Price | Data |
|-------|-------|------|
| [Google Maps Scraper v3.0](https://apify.com/opencalw/opencalw-google-maps-reviews) | $0.08/place | 40+ fields, email, opening hours |
| [Instagram Hashtag Tracker v2.0](https://apify.com/opencalw/opencalw-instagram-hashtag-tracker) | $0.05/post | Posts by hashtag, likes, comments, engagement |
| [TikTok Video Scraper v1.0](https://apify.com/opencalw/opencalw-tiktok-video-scraper) | $0.04/video | Search, trending, hashtag, stats, author info |

### License

AGPL-3.0

# Actor input Schema

## `queries` (type: `array`):

Liste von Suchbegriffen (z.B. ['python tutorial', 'cooking recipes', 'tech reviews'])
## `maxVideosPerQuery` (type: `integer`):

Maximale Videos pro Suchanfrage
## `language` (type: `string`):

Sprache für YouTube-Oberfläche

## Actor input object example

```json
{
  "queries": [
    "python tutorial",
    "cooking recipes",
    "tech reviews"
  ],
  "maxVideosPerQuery": 20,
  "language": "de"
}
````

# 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 = {
    "queries": [
        "python tutorial",
        "cooking recipes",
        "tech reviews"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dexterous_material/opencalw-youtube-video-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 = { "queries": [
        "python tutorial",
        "cooking recipes",
        "tech reviews",
    ] }

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

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

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

```

## CLI example

```bash
echo '{
  "queries": [
    "python tutorial",
    "cooking recipes",
    "tech reviews"
  ]
}' |
apify call dexterous_material/opencalw-youtube-video-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dexterous_material/opencalw-youtube-video-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Video Scraper — Search, Metadata, Stats, Comments",
        "description": "Extract YouTube video data by search: titles, views, likes, comments, channel info, tags, durations. HTTP-only engine for speed and cost efficiency. Perfect for content research, SEO analysis, and competitor tracking.",
        "version": "1.0",
        "x-build-id": "4JdrWHyCxjcmaxpZD"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dexterous_material~opencalw-youtube-video-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dexterous_material-opencalw-youtube-video-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dexterous_material~opencalw-youtube-video-scraper/runs": {
            "post": {
                "operationId": "runs-sync-dexterous_material-opencalw-youtube-video-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dexterous_material~opencalw-youtube-video-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-dexterous_material-opencalw-youtube-video-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "Suchbegriffe",
                        "type": "array",
                        "description": "Liste von Suchbegriffen (z.B. ['python tutorial', 'cooking recipes', 'tech reviews'])",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxVideosPerQuery": {
                        "title": "Max Videos pro Suche",
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximale Videos pro Suchanfrage",
                        "default": 20
                    },
                    "language": {
                        "title": "Sprache",
                        "enum": [
                            "de",
                            "en",
                            "fr",
                            "es",
                            "it",
                            "nl",
                            "pt",
                            "pl",
                            "tr",
                            "ru",
                            "ar",
                            "ja",
                            "ko"
                        ],
                        "type": "string",
                        "description": "Sprache für YouTube-Oberfläche",
                        "default": "de"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
