# Yahoo Video Scraper (`searchapi/yahoo-videos-scraper`) Actor

Scrapes Yahoo Videos for any query. Extracts the full canonical video-vertical schema: title, URL, platform, channel, duration, views, dates, thumbnail, dimensions, language, category, tags, and more.

- **URL**: https://apify.com/searchapi/yahoo-videos-scraper.md
- **Developed by:** [Search API](https://apify.com/searchapi) (community)
- **Categories:** Videos, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 41.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 search 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/actors/running/actors-in-store.md#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

## Yahoo Videos Scraper

Search public Yahoo Video Search and export normalized, API-ready video cards. The Actor uses Yahoo's server-rendered mobile result HTML, extracts 30 cards per page, follows real `b=1,31,61…` pagination, and completes typical runs in seconds without launching a browser.

### Features

- Single-query and deduplicated multiple-query modes
- Fair interleaving with global and per-query limits
- Up to 20 pages per query, currently about 30 source cards each
- Verified US, UK, and Canada regional Yahoo Video hosts
- Source-backed short, medium, and long duration filters
- Platform filters for YouTube, Vimeo, Dailymotion, TikTok, Twitch, Facebook, X, and other sources
- Yahoo relevance, shortest-first, and longest-first ordering
- Stable IDs and global video URL deduplication
- Real video and canonical embed URLs with platform video IDs
- Titles, full Yahoo descriptions, durations, thumbnails, reported dimensions, aspect ratio, and platform/domain metadata
- Direct, Apify Residential/Datacenter, and custom proxy operation
- Bounded retries, strict response validation, block detection, and clean no-results handling

### Input

Provide `query`, `queries`, or both. Duplicate queries are removed case-insensitively.

| Field | Description | Default |
| --- | --- | --- |
| `query` | One Yahoo Video query | — |
| `queries` | Up to 20 queries | — |
| `maxItems` | Maximum videos across all queries | `100` |
| `maxItemsPerQuery` | Optional cap per query | fair share of `maxItems` |
| `maxPages` | Maximum pages per query, 1–20 | `10` |
| `country` | Two-letter country code | `us` |
| `language` | Language or language-country locale | `en` |
| `duration` | `any`, `short`, `medium`, or `long` | `any` |
| `platform` | Any or a supported source platform | `any` |
| `sortBy` | `relevance`, `durationAsc`, or `durationDesc` | `relevance` |
| `maxConcurrency` | Concurrent Yahoo page requests, 1–10 | `5` |
| `maxRequestRetries` | Temporary retries, 0–3 | `2` |
| `requestTimeoutSecs` | Per-request timeout | `30` |
| `proxyConfiguration` | Apify or custom proxy configuration | direct |

Example batch input:

```json
{
  "queries": ["machine learning", "artificial intelligence documentary"],
  "maxItems": 20,
  "maxItemsPerQuery": 10,
  "maxPages": 3,
  "duration": "short",
  "platform": "youtube",
  "sortBy": "durationAsc",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

Set `maxItems` to `1` for one search item.

### Output

The 50-field dataset contract can include:

- stable ID and global, query, page, and page-card positions
- title, full Yahoo description, real video URL, domain, and source platform
- platform video ID and canonical embed URL
- Yahoo thumbnail URL, alternative text, title, width, height, aspect ratio, and host
- duration label, numeric seconds, and derived short/medium/long category
- exact query, regional search host, country, language, filters, ordering, provenance, and aggregate search metadata

Unavailable optional values are omitted rather than emitted as `null`, empty strings, or fabricated placeholders. Yahoo Video cards currently do not supply trustworthy channel, view-count, upload-date, engagement, tag, category, quality, or resolution metadata, so the Actor does not claim those fields.

### Filter behavior

Yahoo's former `age` and `videodur` URL parameters no longer change current video result cards. The Actor enforces duration and platform filters after extraction using Yahoo's displayed duration and real destination domain.

Yahoo cards expose no publication date. Non-empty legacy `timeRange` input therefore fails validation instead of silently returning unfiltered data.

Duration categories are:

- `short`: under 5 minutes
- `medium`: 5 minutes through 19:59
- `long`: 20 minutes or longer

Duration sorting covers the candidates fetched within `maxPages`; it does not claim to sort Yahoo's entire index.

### Regional behavior

`us`, `gb`, and `ca` use verified regional Yahoo Video Search hosts. Other valid two-letter country codes use the global host with locale context because the tested AU and IN video subdomains currently return empty card layouts.

### Performance and resilience

Yahoo serves 30 mobile result cards in the initial HTML. The Actor fetches independent pages and queries concurrently using one stable proxy session per query. It validates HTTP status, HTML content type, final Yahoo host, response size, challenge content, and current card structure before parsing or storing anything.

Challenge pages are never retried or stored. Temporary network, rate-limit, and server failures use bounded exponential backoff. Logs never include raw HTML, result URLs, tracking/beacon data, cookies, or proxy credentials.

### Proxy notes

Use Apify Residential or Datacenter proxies when direct access is rate-limited. `GOOGLE_SERP` cannot be used because it supports selected Google Search/Shopping requests, not Yahoo.

### Local run

```bash
npm ci
apify run --purge --input-file INPUT.json
```

Results are written to `storage/datasets/default`.

### Limitations

Some queries return overlapping videos on adjacent Yahoo pages; the Actor removes them globally. Yahoo can also return genuine fallback videos for very narrow queries. A structural no-results page is distinguished from those legitimate fallback cards. The Actor does not bypass authentication, CAPTCHAs, paywalls, or access controls.

# Actor input Schema

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

One query to enter in Yahoo Video Search.

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

Optional batch of up to 20 queries. Duplicate queries are removed and results are interleaved fairly.

## `maxItems` (type: `integer`):

Maximum videos across all queries.

## `maxItemsPerQuery` (type: `integer`):

Optional per-query cap. Defaults to a fair share of maxItems.

## `maxPages` (type: `integer`):

Maximum Yahoo result pages inspected per query. Each server-rendered page currently contains about 30 cards.

## `country` (type: `string`):

Two-letter country code. US, GB, and CA use verified regional Yahoo Video Search hosts; other codes use Yahoo's global host and locale context.

## `language` (type: `string`):

Language or language-country locale used in Yahoo's language parameter and request headers.

## `duration` (type: `string`):

Filter Yahoo's displayed duration: short under 5 minutes, medium 5–20 minutes, or long 20+ minutes. Legacy empty input remains accepted.

## `platform` (type: `string`):

Filter by the source platform/domain Yahoo supplies.

## `sortBy` (type: `string`):

Preserve Yahoo relevance or sort fetched candidates by duration.

## `maxConcurrency` (type: `integer`):

Maximum Yahoo pages fetched at once.

## `maxRequestRetries` (type: `integer`):

Bounded retries for temporary network, rate-limit, and server failures. Challenge pages are never retried.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each Yahoo result-page request.

## `proxyConfiguration` (type: `object`):

Direct, Apify Residential/Datacenter, or custom proxy settings. GOOGLE\_SERP is not applicable to Yahoo.

## `debug` (type: `boolean`):

Log safe structural diagnostics without HTML, response bodies, tracking URLs, or secrets.

## Actor input object example

```json
{
  "query": "machine learning",
  "maxItems": 100,
  "maxPages": 10,
  "country": "us",
  "language": "en",
  "duration": "any",
  "platform": "any",
  "sortBy": "relevance",
  "maxConcurrency": 5,
  "maxRequestRetries": 2,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debug": false
}
```

# 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": "machine learning",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("searchapi/yahoo-videos-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 = {
    "query": "machine learning",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("searchapi/yahoo-videos-scraper").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 '{
  "query": "machine learning",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call searchapi/yahoo-videos-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/9qqOYQWVVkeRWetnQ/builds/Nxc6jWqC8MiCet3Xc/openapi.json
