# YouTube Channel Search Scraper (`powerai/youtube-channel-search-scraper`) Actor

Search videos inside a YouTube channel by keyword and export matching items with metadata and timestamps.

- **URL**: https://apify.com/powerai/youtube-channel-search-scraper.md
- **Developed by:** [PowerAI](https://apify.com/powerai) (community)
- **Categories:** Social media, Videos, Integrations
- **Stats:** 14 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## YouTube Channel Search Scraper

Search videos within a specific YouTube channel and export one row per matching item.

### Key Features

- Required **Channel ID** (`id`) and **search query** (`q`)
- Collect up to your chosen **maximum** number of matching items; continues with **cursor** paging until that limit or until there are no more pages
- Typical fields include `type`, `video.videoId`, `video.title`, `video.author`, `video.descriptionSnippet`, `video.thumbnails`, `video.movingThumbnails`, `video.lengthSeconds`, `video.publishedTimeText`, and `video.stats`
- Supports optional localization hints: `hl` (language) and `gl` (country)
- Each record includes **scrapedAt** (ISO 8601)

### Why Use It?

- **Practical**: Quickly find channel videos on a specific topic
- **Structured**: Clean JSON rows for analysis, filtering, and automation
- **Efficient**: Cursor pagination until cap or feed end

### Great For

- Topic-focused channel research
- Building filtered datasets from creator archives
- Tracking coverage of keywords by a channel

### Input Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `id` | Yes | YouTube channel ID. |
| `q` | Yes | Keyword to search within the channel. |
| `maxResults` | No | Maximum rows to collect (default: 48). |
| `hl` | No | Language hint, e.g. `en`. |
| `gl` | No | Country hint, e.g. `US`. |

### Output

Each dataset row is one item from `contents[]` plus **scrapedAt** appended by the actor.

| Area | Field | Description |
|------|-------|-------------|
| Root | `type` | Item type returned by the feed. |
| Root | `video` | Video object payload. |
| Root | `scrapedAt` | Collection timestamp (ISO 8601). |
| `video` | `videoId` | YouTube video ID. |
| `video` | `title` | Video title. |
| `video` | `author` | Author metadata, including channel identity and badges. |
| `video` | `descriptionSnippet` | Short description preview text. |
| `video` | `badges` | Video-level badges (for example `CC`). |
| `video` | `thumbnails` | Thumbnail URL variants. |
| `video` | `movingThumbnails` | Animated thumbnail variants (when available). |
| `video` | `lengthSeconds` | Duration in seconds (when available). |
| `video` | `publishedTimeText` | Relative publish time text. |
| `video` | `stats.views` | View count when available. |
| `video` | `isLiveNow` | Whether this item is currently live (when available). |

#### Sample record

```json
{
  "type": "video",
  "video": {
    "author": {
      "avatar": [
        {
          "height": 68,
          "url": "https://yt3.googleusercontent.com/WZ_63J_-745xyW_DGxGi3VUyTZAe0Jvhw2ZCg7fdz-tv9esTbNPZTFR9X79QzA0ArIrMjYJCDA=s68-c-k-c0x00ffffff-no-rj",
          "width": 68
        }
      ],
      "badges": [
        {
          "text": "Verified",
          "type": "VERIFIED_CHANNEL"
        }
      ],
      "canonicalBaseUrl": "/@GoogleDevelopers",
      "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
      "title": "Google for Developers"
    },
    "badges": ["CC"],
    "descriptionSnippet": "Oh, Javascript. What are your thoughts on this programming language?\\n\\nSubscribe to Google for Developers → https://goo.gle/developers \\n\\nSpeakers: Meg Bauman, M.E Francis",
    "isLiveNow": false,
    "lengthSeconds": 27,
    "movingThumbnails": [
      {
        "height": 180,
        "url": "https://i.ytimg.com/an_webp/gPoz3Lt5gv8/mqdefault_6s.webp?du=3000&sqp=CPK-iM4G&rs=AOn4CLDOlI2WRYpYNvBa9nTp5x43ysYWbw",
        "width": 320
      }
    ],
    "publishedTimeText": "8 months ago",
    "stats": {
      "views": 34211
    },
    "thumbnails": [
      {
        "height": 94,
        "url": "https://i.ytimg.com/vi/gPoz3Lt5gv8/hqdefault.jpg?sqp=-oaymwE1CKgBEF5IVfKriqkDKAgBFQAAiEIYAXABwAEG8AEB-AG2CIACgA-KAgwIABABGDwgTShyMA8=&rs=AOn4CLBawq5xXnSQBVJzoLF-DrVnL-z7Xw",
        "width": 168
      },
      {
        "height": 110,
        "url": "https://i.ytimg.com/vi/gPoz3Lt5gv8/hqdefault.jpg?sqp=-oaymwE1CMQBEG5IVfKriqkDKAgBFQAAiEIYAXABwAEG8AEB-AG2CIACgA-KAgwIABABGDwgTShyMA8=&rs=AOn4CLCLWSqC_ws26ZhC2WwHQPgQ8MfFQQ",
        "width": 196
      }
    ],
    "title": "Just JavaScript things. 🙃",
    "videoId": "gPoz3Lt5gv8"
  },
  "scrapedAt": "2026-03-24T06:50:43.710Z"
}
```

### Notes

- Returned fields vary by result type and channel content.
- Respect YouTube terms and applicable laws when using scraped data.

# Actor input Schema

## `id` (type: `string`):

YouTube channel ID (for example, UC\_x5XG1OV2P6uZZ5FSM9Ttw).

## `q` (type: `string`):

Keyword to search within the channel videos.

## `maxResults` (type: `integer`):

Maximum number of matching videos to collect across pages.

## `hl` (type: `string`):

Interface language hint (for example, en).

## `gl` (type: `string`):

Country hint (for example, US).

## Actor input object example

```json
{
  "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
  "q": "javascript",
  "maxResults": 48,
  "hl": "en",
  "gl": "US"
}
```

# 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 = {
    "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
    "q": "javascript",
    "maxResults": 48,
    "hl": "en",
    "gl": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerai/youtube-channel-search-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 = {
    "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
    "q": "javascript",
    "maxResults": 48,
    "hl": "en",
    "gl": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("powerai/youtube-channel-search-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 '{
  "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
  "q": "javascript",
  "maxResults": 48,
  "hl": "en",
  "gl": "US"
}' |
apify call powerai/youtube-channel-search-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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