# YouTube Search Scraper — Live Results by Influship (`influship/youtube-search`) Actor

Search YouTube and get live results including video titles, channels, views, upload dates, and thumbnails. Supports localized search and returns both videos and channels. No login required.

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

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

## 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

## YouTube Search Scraper

Search YouTube programmatically and extract structured data about videos and channels. This actor lets you query YouTube just like a user would, but returns clean, structured JSON data ready for analysis, monitoring, or integration into your workflows.

### What is YouTube Search Scraper?

YouTube Search Scraper takes any search query and returns detailed information about the matching videos and channels found on YouTube. Unlike manual searching, you get machine-readable results with all metadata extracted and normalized, including view counts, channel verification status, video durations, and publication dates. Results can be localized by country and language, giving you the same geo-targeted results a user in that region would see.

### What can this actor do?

- **Search YouTube** — Enter any search query and get back structured results
- **Video results** — Get video ID, title, description, URL, thumbnail, channel info, view count, duration, and publish date
- **Channel results** — Get channel ID, name, handle, subscriber count, video count, description, and verification status
- **Localized results** — Specify country and language codes to get region-specific search results
- **Verified channel detection** — Easily identify verified YouTube channels in results
- **Configurable result count** — Request up to 50 results per search

### What data can you extract?

#### Video Results

| Field | Description |
|-------|-------------|
| type | Always "video" for video results |
| video_id | Unique YouTube video identifier |
| title | Video title |
| description | Video description snippet |
| url | Direct URL to the video |
| thumbnail_url | Video thumbnail image URL |
| channel_name | Name of the channel that uploaded the video |
| channel_id | Unique channel identifier |
| channel_handle | Channel handle (e.g. @username) |
| channel_verified | Whether the channel is verified |
| view_count | Number of views |
| view_count_text | Human-readable view count (e.g. "1.2M views") |
| duration_seconds | Video length in seconds |
| duration_text | Human-readable duration (e.g. "12:34") |
| published_at | Publication timestamp |
| published_text | Relative publish time (e.g. "3 days ago") |

#### Channel Results

| Field | Description |
|-------|-------------|
| type | Always "channel" for channel results |
| channel_id | Unique channel identifier |
| channel_name | Channel display name |
| channel_handle | Channel handle (e.g. @username) |
| channel_verified | Whether the channel is verified |
| description | Channel description |
| subscriber_count | Number of subscribers |
| thumbnail_url | Channel avatar image URL |
| url | Direct URL to the channel |
| video_count | Total number of videos on the channel |

### Use Cases

- **Competitor research** — Monitor what content competitors are publishing and how it performs
- **Content discovery** — Find trending videos and popular channels in your niche
- **Trend analysis** — Track search results over time to identify emerging topics and creators
- **Influencer discovery** — Find YouTube creators by topic with subscriber and verification data
- **Market research** — Analyze video content landscape for any industry or keyword
- **SEO monitoring** — Track how videos rank for specific search terms

### How to use

1. Enter your search query
2. Optionally set country and language codes for localized results
3. Set max results (default 20, up to 50)
4. Run the actor
5. Download results as JSON, CSV, or Excel

### Input example

```json
{
  "query": "machine learning tutorial for beginners",
  "maxResults": 30,
  "countryCode": "US",
  "languageCode": "en"
}
````

### Output example

```json
{
  "type": "video",
  "video_id": "dQw4w9WgXcQ",
  "title": "Machine Learning in 10 Minutes",
  "description": "A beginner-friendly introduction to machine learning concepts...",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "thumbnail_url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
  "channel_name": "Tech Academy",
  "channel_id": "UC1234567890",
  "channel_handle": "@techacademy",
  "channel_verified": true,
  "view_count": 2450000,
  "view_count_text": "2.4M views",
  "duration_seconds": 612,
  "duration_text": "10:12",
  "published_at": "2024-11-15T10:00:00Z",
  "published_text": "3 months ago"
}
```

### Pricing

This actor uses **pay-per-event** pricing:

- **Actor start**: Small fee per run
- **Per result**: Fee for each video or channel result returned

Platform usage costs are included — you only pay the per-event fees.

### FAQ

**What types of results are returned?**
YouTube search returns a mix of video and channel results. Each result includes a `type` field ("video" or "channel") so you can easily filter by type.

**Can I get localized results?**
Yes. Set the `countryCode` and `languageCode` fields to get the same results a user in that region would see. For example, set `countryCode` to "JP" and `languageCode` to "ja" for Japanese results.

**Can I use this with the Apify API?**
Yes! Call this actor via the Apify API or any Apify integration (Zapier, Make, etc.)

**Need more features?**
Check out our other actors for influencer search, profile lookup, and more.

# Actor input Schema

## `query` (type: `string`):

The search term to look up on YouTube. Example: 'python tutorial', 'cooking recipes', 'tech reviews 2024'

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

Maximum number of results to return (1-50)

## `countryCode` (type: `string`):

ISO 3166-1 alpha-2 country code for localized results (e.g. 'US', 'GB', 'DE')

## `languageCode` (type: `string`):

ISO 639-1 language code for result language (e.g. 'en', 'es', 'fr')

## Actor input object example

```json
{
  "query": "how to build a web app",
  "maxResults": 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 = {
    "query": "how to build a web app"
};

// Run the Actor and wait for it to finish
const run = await client.actor("influship/youtube-search").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 = { "query": "how to build a web app" }

# Run the Actor and wait for it to finish
run = client.actor("influship/youtube-search").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 '{
  "query": "how to build a web app"
}' |
apify call influship/youtube-search --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Search Scraper — Live Results by Influship",
        "description": "Search YouTube and get live results including video titles, channels, views, upload dates, and thumbnails. Supports localized search and returns both videos and channels. No login required.",
        "version": "0.0",
        "x-build-id": "aLylXQ7AGAe2cvtaS"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/influship~youtube-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-influship-youtube-search",
                "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/influship~youtube-search/runs": {
            "post": {
                "operationId": "runs-sync-influship-youtube-search",
                "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/influship~youtube-search/run-sync": {
            "post": {
                "operationId": "run-sync-influship-youtube-search",
                "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": [
                    "query"
                ],
                "properties": {
                    "query": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "The search term to look up on YouTube. Example: 'python tutorial', 'cooking recipes', 'tech reviews 2024'"
                    },
                    "maxResults": {
                        "title": "Maximum Results",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of results to return (1-50)",
                        "default": 20
                    },
                    "countryCode": {
                        "title": "Country Code",
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 country code for localized results (e.g. 'US', 'GB', 'DE')"
                    },
                    "languageCode": {
                        "title": "Language Code",
                        "type": "string",
                        "description": "ISO 639-1 language code for result language (e.g. 'en', 'es', 'fr')"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
