YouTube Search Results Scraper - Keywords to CSV avatar

YouTube Search Results Scraper - Keywords to CSV

Pricing

from $1.20 / 1,000 results

Go to Apify Store
YouTube Search Results Scraper - Keywords to CSV

YouTube Search Results Scraper - Keywords to CSV

Search YouTube by keyword and export video titles, channels, views and search positions. Skip known video IDs and duplicate results. Includes per-query run reports.

Pricing

from $1.20 / 1,000 results

Rating

0.0

(0)

Developer

Ben

Ben

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

7 hours ago

Last modified

Share

YouTube Search Results Scraper: keyword search to CSV

Search YouTube by keyword and export video titles, watch URLs, channels, views and search positions. Use one query or a small keyword set to build a content-research dataset without downloading videos or supplying a YouTube API key.

Try it: open the saved Python and automation search example. Result events cost $1.50 per 1,000 exported videos on the Free plan, plus the Actor-start event. Duplicate videos across queries are exported once.

Paste this into the JSON input, run, then choose Dataset → Export → CSV:

{"queries": ["python tutorial"], "maxResults": 3}

The Actor inspects up to three candidate videos for that query. maxResults is per query, so two queries with a limit of three inspect at most six candidates. Duplicate removal or exclusions can produce fewer rows.

Real output

Selected fields from a September 10, 2026 run. Search order and view counts change:

{
"video_id": "_uQrJ0TkZlc",
"url": "https://www.youtube.com/watch?v=_uQrJ0TkZlc",
"title": "Python Full Course for Beginners",
"duration_seconds": 22447,
"channel": "Programming with Mosh",
"view_count": 48936637,
"timestamp": null,
"query": "python tutorial",
"search_rank": 1
}
FieldsWhat they contain
video_id, url, titleVideo identity and canonical watch URL
query, search_rankFirst matching query and one-based position before exclusions or deduplication
channel, channel_id, channel_url, uploader_idChannel metadata exposed by the search result
duration_seconds, view_count, channel_is_verifiedPublic result metrics when available
description, thumbnail, timestampSearch-description snippet, image and optional timestamp; this is not a full video-detail lookup

timestamp and other optional fields can be null. The Actor does not infer missing dates, engagement or subscriber counts. Search positions describe this run's response, not a personalized or location-specific ranking guarantee.

Keyword monitoring without repeat exports

InputDefaultLimits
queries["python tutorial"]1–20 nonblank phrases, up to 300 characters each; exact duplicate phrases run once
maxResults101–100 candidate videos per query
excludeVideoIds[]Up to 10,000 previously exported eleven-character IDs

To skip a known video, add its video_id:

{"queries": ["python tutorial"], "maxResults": 3, "excludeVideoIds": ["_uQrJ0TkZlc"]}

Exclusions do not make the Actor search beyond maxResults. The remaining rows keep their original search position. The Actor does not remember previous runs automatically; store your exported IDs and pass them into the next run.

When a video appears under several queries, the dataset keeps the first query only. If you need a separate ranking record for every keyword, run each query separately. This duplicate-removal behavior was added in September 2026.

Costs and run status

At Free-plan pricing, each exported video costs $0.0015. The Actor-start event costs $0.00005 per allocated GB, with a minimum of one event. At 512 MB, three exported videos cost $0.00455 in Actor events. Existing plan discounts remain available; the Pricing tab shows your applicable rate.

Excluded and duplicate videos do not produce result charges. Set a maximum charge in run options to limit spending. Source failures still incur the start event, and any valid rows already exported retain their result charges.

Open Output → Run summary for per-query returned/exported counts, duplicate and exclusion counts, failures and the stop reason. If any query fails, the run fails after saving its summary and any valid partial results. Inspect both before retrying, so already delivered videos can be excluded.

Export with Python

Install apify-client, set APIFY_TOKEN and APIFY_DATASET_ID, then export a completed run without starting another:

import csv
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
rows = list(client.dataset(os.environ["APIFY_DATASET_ID"]).iterate_items())
fields = ["video_id", "title", "url", "channel", "view_count", "query", "search_rank"]
with open("youtube-search.csv", "w", newline="", encoding="utf-8") as output:
writer = csv.DictWriter(output, fieldnames=fields, extrasaction="ignore")
writer.writeheader()
writer.writerows(rows)

Save separate Tasks for different research topics, schedule them in Apify and compare datasets by video_id. API, n8n and Make workflows can use the same saved input.

Choose the right YouTube tool

NeedActor
Discover videos from keywordsThis Actor
Export an existing playlistYouTube Playlist Extractor
Read a known video's detailsYouTube Video Metadata Scraper
Get available captionsYouTube Transcript Scraper

Common questions

Does it return every result? No. YouTube search is dynamic and this Actor caps each query at 100 candidates. A successful run is a bounded snapshot.

Can it filter search by country, language or upload date? These are not supported input controls. Do not treat missing timestamps as evidence that a video falls within a date range.

Does it download media or comments? No. It exports search metadata only.

Why are there fewer rows than the limit? The source may return fewer candidates, duplicate videos may overlap between queries, IDs may be excluded, or the charge limit may stop delivery. Inspect SUMMARY for the observed reason.