Export public YouTube videos, Shorts, live results, channels, and playlists by keyword. Apply native YouTube filters and country/language localization, then download ranked results with IDs, metrics, metadata, thumbnails, and source URLs.
Use it for YouTube SEO, creator discovery, content research, competitor monitoring, market mapping, and recurring search-rank snapshots. No YouTube login or API key is required.
What can it do?
- Public videos, Shorts, live and upcoming video results
- Channels and playlists
- Result rank and source-query provenance
- Video, channel, and playlist IDs and URLs
- Channel names and public channel URLs
- Visible publish time, duration, views, subscribers, and video counts
- Numeric duration and count fields for sorting and analysis
- Snippets, badges, and all available thumbnail URLs
- Short, live, and upcoming classification
- Search URL, continuation page, position on page, stable result key, and scrape timestamp
This Actor reads YouTube's public search surface. It does not open every video detail page, so it deliberately does not collect comments, transcripts, likes, exact publish timestamps, or complete channel catalogs.
Use cases
- Track public YouTube rank snapshots for brand, product, and topic searches.
- Find videos, Shorts, live streams, channels, and playlists for content research.
- Discover creators and public channel metrics for outreach or market mapping.
- Compare visible content formats, titles, publish windows, and view signals across markets.
- Feed repeatable search exports into spreadsheets, dashboards, alerts, and research agents.
Input settings
| Setting | JSON field | Description |
|---|---|---|
| Search queries | queries |
One to 50 keywords or phrases. Blank input fails before the start event is charged; duplicate queries run once. |
| Results per query | maxResultsPerQuery |
Save 1-500 unique matching rows per query. |
| Result type | resultType |
Mixed results, videos (including Shorts/live), channels, or playlists. |
| Sort | sortBy |
Relevance, rating, upload date, or view count. |
| Upload date | uploadDate |
Any time, hour, today, week, month, or year. |
| Duration | duration |
Any, under 4 minutes, 4-20 minutes, or over 20 minutes. |
| Video feature | videoFeature |
Any, live, HD, subtitles/CC, or Creative Commons. |
| Country | country |
Optional two-letter localization code such as US, GB, PT, or DE. |
| Language | language |
Optional code such as en, pt, de, or en-GB. |
| Raw filter token | sp |
Advanced token copied from a YouTube search URL. When set, it overrides the structured YouTube filters. |
| Proxy | proxyConfiguration |
Optional Apify Proxy configuration. Retries use fresh sessions. |
| Reliability controls | retryCount, initialRetryDelayMillis, requestPacingMillis, runTimeSecs |
Optional retry, pacing, and safe-deadline tuning. Defaults suit most runs. |
YouTube decides which filter combinations it supports. A raw sp token is kept for backward compatibility and advanced combinations that are not represented by the structured fields.
Example input
{
"queries": ["web scraping tutorial", "Apify automation"],
"maxResultsPerQuery": 25,
"resultType": "videos",
"sortBy": "uploadDate",
"uploadDate": "month",
"duration": "medium",
"country": "US",
"language": "en",
"proxyConfiguration": {
"useApifyProxy": true
}
}
Example output
{
"query": "web scraping tutorial",
"rank": 1,
"resultType": "video",
"title": "Web scraping tutorial",
"url": "https://www.youtube.com/watch?v=example",
"videoId": "example",
"channelId": "UCexample",
"playlistId": null,
"channelName": "Example Channel",
"channelUrl": "https://www.youtube.com/@example",
"publishedTimeText": "2 weeks ago",
"durationText": "12:34",
"durationSeconds": 754,
"viewCountText": "10K views",
"viewCount": 10000,
"subscriberCountText": null,
"subscriberCount": null,
"videoCountText": null,
"videoCount": null,
"descriptionSnippet": "A visible public search-result snippet...",
"thumbnailUrl": "https://i.ytimg.com/vi/example/hq720.jpg",
"thumbnailUrls": ["https://i.ytimg.com/vi/example/hq720.jpg"],
"isShort": false,
"isLive": false,
"isUpcoming": false,
"badges": [],
"searchUrl": "https://www.youtube.com/results?search_query=web+scraping+tutorial",
"page": 1,
"positionOnPage": 1,
"resultKey": "video:example",
"scrapedAt": "2026-07-14T12:00:00.000Z"
}
Download results as JSON, CSV, Excel, XML, or RSS, or consume them through the Apify API and MCP server. RUN_SUMMARY in the run's key-value store records each query's status, pages, retries, saved rows, recognized empty results, partial failures, and deadline state.
Reliability behavior
- Input is validated before the start event is charged.
- Rate limits, transient server responses, network failures, and challenge pages receive bounded retries with fresh proxy sessions.
- Queries are isolated: one failed query does not discard rows already saved by other queries.
- Continuation failures are reported as partial results instead of silently truncating the dataset.
- Repeated results and continuation tokens are stopped safely.
- A safe work deadline leaves time to persist rows and
RUN_SUMMARYbefore the platform timeout. - A changed or blocked YouTube response does not become a misleading successful zero-row run.
- Recognized valid no-match searches finish successfully with
EMPTY_FILTEREDinRUN_SUMMARYand no result-event charge.
YouTube may localize, personalize, reorder, or A/B test public results. Search ranks are a snapshot of the public response returned for this run, not a guarantee of a universal or complete result count.
API
JavaScript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/youtube-search-results-scraper').call({
queries: ['web scraping tutorial'],
maxResultsPerQuery: 25,
resultType: 'videos',
country: 'US',
language: 'en',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
Python
from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('fetch_cat/youtube-search-results-scraper').call(run_input={
'queries': ['web scraping tutorial'],
'maxResultsPerQuery': 25,
'resultType': 'videos',
'country': 'US',
'language': 'en',
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
cURL
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~youtube-search-results-scraper/runs?token=YOUR_APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"queries":["web scraping tutorial"],"maxResultsPerQuery":25,"resultType":"videos","country":"US","language":"en"}'
MCP and AI agents
Use this Actor as an agent tool through the Apify MCP server:
https://mcp.apify.com/?tools=fetch_cat/youtube-search-results-scraper
Add it to Claude Code:
claude mcp add apify-youtube-search 'https://mcp.apify.com/?tools=fetch_cat/youtube-search-results-scraper'
Example MCP JSON configuration:
{
"mcpServers": {
"apify-youtube-search": {
"url": "https://mcp.apify.com/?tools=fetch_cat/youtube-search-results-scraper"
}
}
}
Example prompts:
- “Find 50 recent YouTube videos about browser automation in the US and group them by channel.”
- “Find channels ranking for three competitor topics and return their public subscriber counts.”
- “Collect playlists about web scraping and give me the source URL for every row.”
The Actor's input, output, dataset, and RUN_SUMMARY schemas are published for OpenAPI, MCP, and agent clients.
Scheduling and integrations
Schedule identical queries daily or weekly to compare public rank snapshots. Send datasets to Google Sheets, Airtable, a warehouse, a BI dashboard, or a webhook. Keep query, rank, searchUrl, and scrapedAt when building longitudinal reports.
Support
If a run behaves unexpectedly, open an Actor issue with:
- The run ID or run URL.
- The input JSON, with private proxy URLs or credentials removed.
- The expected output and actual output returned by the dataset.
- An example reproducible public URL or public search query, when possible.
Do not post private tokens or credentials. RUN_SUMMARY helps distinguish a valid no-match search from a YouTube layout change, block, partial continuation failure, or deadline stop.