# YouTube Search Scraper – Extended (`flashdata/youtube-search-extended`) Actor

Search YouTube by keyword and request up to 700 results with available titles, channels, durations, views and dates. Uses the extended-search rate. Requires a FlashData API key and Credits; Apify usage is billed separately.

- **URL**: https://apify.com/flashdata/youtube-search-extended.md
- **Developed by:** [FlashData](https://apify.com/flashdata) (community)
- **Categories:** Videos, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 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/actors/running/actors-in-store.md#pay-per-usage

## 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 Scraper – Extended

Build a larger collection of YouTube search results for a topic. Extended Search lets you request up to 700 items from one query, giving content researchers and analysts more candidates to review than the standard 20-result search.

### What you get

- **Larger result sets:** request 1–700 search items from a single keyword query.
- **Search filters:** narrow the upload period, type, duration and supported features, with selectable sort order.
- **Exportable metadata:** titles and video IDs with available channel, duration, view and date fields, ready for JSON or CSV.

Use it to explore broad topics, assemble a video research dataset or compare a larger set of content before selecting individual videos.

### Example output

The **YouTube Extended Search results** dataset contains one returned search item per row. This example is illustrative, not a live result:

```json
{
  "query": "battery recycling explained",
  "videoId": "abcdefghijk",
  "title": "Example battery recycling explainer",
  "channel": "Example Science",
  "durationString": "5:00",
  "viewCount": 1234,
  "uploadDate": "2026-01-15",
  "request_id": "req_example"
}
```

Fields depend on the returned item and result type. **Complete response and status** preserves additional returned fields and usage information.

### Quick start

1. Get a [FlashData API key](https://flashdata.dev/app/api-keys) with `youtube_search_extended` access and available Credits.
2. Enter one query and your key, then set `max_results` above 20 when you need a larger collection. Optional filters narrow the search.
3. Click **Start**, then open **YouTube Extended Search results** to inspect and export the returned collection.

```json
{
  "flashdataApiKey": "YOUR_FLASHDATA_API_KEY",
  "query": "battery recycling explained",
  "max_results": 50,
  "filters": {
    "type": "video",
    "sort_by": "relevance"
  }
}
```

### Input parameters

| Parameter | Required | Description |
| --- | --- | --- |
| `query` | Yes | One search query, e.g. battery recycling explained.  |
| `flashdataApiKey` | Yes | Your FlashData API key, stored as encrypted input.  |
| `max_results` | No | Maximum results (1–700). Actual count may be lower. Range: 1–700. Default: `20`. |
| `filters` | No | JSON filters, e.g. {"upload_date":"this_week","type":"video"}. See README for supported values.  |

Each run handles one query. The default is 20 results, so set max_results explicitly when you want more. The maximum of 700 is a requested ceiling, not a guaranteed delivery count.

### Search filters

Pass these fields inside `filters`:

| Filter | Supported values |
| --- | --- |
| `upload_date` | `today`, `last_hour`, `this_week`, `this_month`, `this_year` |
| `type` | `video`, `channel`, `playlist`, `movie` |
| `duration` | `<4`, `4-20`, `>20` (minutes) |
| `sort_by` | `rating`, `relevance`, `view_count`, `upload_date` |
| Boolean features | `360`, `3d`, `4k`, `creative_commons`, `hd`, `hdr`, `live`, `location`, `purchased`, `subtitles`, `vr180` |

For example, `"subtitles": true` filters discovery results; it does not fetch the subtitle text.

### Pricing

Requests use the **extended-search FlashData rate**, which is higher than the standard YouTube search rate, even when you request a small result set. Check your [FlashData account rate](https://flashdata.dev/pricing). This Actor adds no service fee; Apify compute, storage and other platform usage are billed separately.

### FAQ

**When should I use Extended instead of standard Search?**

Use Extended when you need more than the standard 20-result ceiling. For a short shortlist, the standard YouTube Search Scraper uses the lower search rate.

**Will a request for 700 return 700 results?**

Not necessarily. The query, filters and available YouTube results determine the actual count. It is not an exhaustive archive or an unlimited collection mode.

**Can I submit multiple queries or continue through pages?**

This Actor accepts one query per run and does not expose automatic pagination or a continuation token. Use separate runs for additional queries.

**Does it fetch captions or enrich every video with full details?**

It returns search metadata. Captions, full video metadata and downloads are separate operations.

**What if a run fails?**

Check key permissions and Credits for authentication errors. After a timeout or interruption, inspect **Complete response and status** and FlashData Jobs/usage before starting again: the request may already have been charged. A new run can create another charge.

### Support

Open an issue on this Actor or email <support@flashdata.dev> with the run URL or request ID. Do not include API keys.

[API documentation](https://flashdata.dev/docs/sources/youtube_search_extended) · [Terms](https://flashdata.dev/legal/terms) · [Privacy](https://flashdata.dev/legal/privacy)

This is an independent FlashData integration, not an official YouTube product.

# Actor input Schema

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

One search query, e.g. battery recycling explained.

## `flashdataApiKey` (type: `string`):

Requires youtube_search_extended access. Get your key: https://flashdata.dev/app/api-keys

## `max_results` (type: `integer`):

Maximum results (1–700). Actual count may be lower.

## `filters` (type: `object`):

JSON filters, e.g. {"upload_date":"this_week","type":"video"}. See README for supported values.

## Actor input object example

```json
{
  "max_results": 20
}
```

# Actor output Schema

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

No description

## `response` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("flashdata/youtube-search-extended").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("flashdata/youtube-search-extended").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 '{}' |
apify call flashdata/youtube-search-extended --silent --output-dataset

```

## MCP server setup

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

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/nrXwozgzdarQcldwf/builds/5SEbSFpz8kvsLeuIg/openapi.json
