YouTube Scraper: Search Results to Video Data avatar

YouTube Scraper: Search Results to Video Data

Pricing

from $2.00 / 1,000 results

Go to Apify Store
YouTube Scraper: Search Results to Video Data

YouTube Scraper: Search Results to Video Data

Type a search term and get YouTube videos as clean JSON: title, URL, channel, channel URL, views, duration, upload time, snippet and thumbnail. Up to 500 videos per run, duplicates removed, no API key or quota. Monitor mode flags new videos.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

Turgay NANTA

Turgay NANTA

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a month ago

Last modified

Share

YouTube Scraper: Search Results to Video Data (No API Key)

You want to know which videos already rank for a keyword, who made them, how many views they have and how long they are. Doing that by hand means scrolling, copying and pasting into a sheet. Doing it with the official YouTube Data API means a Google Cloud project, an API key and a daily quota.

Type a search term. This YouTube scraper reads YouTube's public search results and returns every video as clean, de-duplicated JSON: video ID, title, URL, channel name, channel URL, view count text, duration, upload time text, description snippet and thumbnail.

  • One input: a search query, exactly as you would type it into YouTube.
  • Up to 500 videos per run: the Actor follows YouTube's own "load more" pages until it reaches your limit or the results run out.
  • No API key, no Google Cloud project, no login.
  • Clean output: duplicate videos across pages are removed, tracking parameters are stripped from URLs, whitespace is normalized.
  • Monitor mode: schedule the same query and get only the videos that are new since the last run.
  • Cheap to try: 20 videos cost about $0.04 (see Pricing).

Example output (one video)

{
"id": "mAYbmcqPphc",
"title": "The Fellow ES1 Espresso Machine Review",
"url": "https://www.youtube.com/watch?v=mAYbmcqPphc",
"channel": "James Hoffmann",
"channel_url": "https://www.youtube.com/@jameshoffmann",
"views_text": "765,400 views",
"duration": "34:16",
"published_text": "1mo ago",
"description": "Join The Drip Feed Newsletter (and check out the first issue) here: https://thedripfeed.",
"thumbnail": "https://i.ytimg.com/vi/mAYbmcqPphc/hq720.jpg?..."
}

Captured from a local test run of the query "home espresso machine review" on 2026-09-28 (thumbnail URL shortened). View counts and dates change over time; your run returns what YouTube shows at that moment.


At a glance

InputA YouTube search query (query) and how many videos you want (maxResults, 1-500)
OutputOne dataset row per video + a final _summary row
Fields per videoid, title, url, channel, channel_url, views_text, duration, published_text, description (snippet), thumbnail
SourceYouTube's public search results page and its "load more" pages
API key neededNo
Monitor modeFlags videos that are new since the previous run of the same query
PricingPay per video returned; see Pricing
Runs onApify Console, API, schedules, n8n, Make, Zapier, AI agents via MCP

Quick start

  1. Type a search term into Search query, for example home espresso machine review.
  2. Set Max results (20 is the default; up to 500).
  3. Click Start. Open the Output or Dataset tab and export as JSON, CSV, Excel or HTML.

The Actor also runs with an empty input: it uses the example query from the input form, so you can see the output format with one click.


What you can do with it

Content creators and YouTube strategists

Before you script a video, run the keyword you want to rank for. You get the titles, channels, lengths and view counts of the videos that YouTube already shows for it. Sort by channel to see who dominates the topic, look at durations to see what length the top results have, and read the titles to find an angle nobody has covered yet.

SEO and content marketing teams

YouTube results often appear in Google for how-to and review queries. Run your target keywords and collect the video titles and descriptions that compete for them. The description snippet shows which words YouTube highlighted for the query.

Brand and product marketers

Search your product name, your competitors' names and "vs" queries. See which channels review products in your category and how many views those reviews get. The channel_url field gives you a direct link for outreach lists.

Influencer and partnership managers

Search a niche ("budget travel japan", "home workout no equipment") and collect the channels that publish on it. Export to a sheet, remove duplicates by channel, and you have a first list of creators to review.

Researchers, analysts and students

Collect the result set for a topic at a point in time and keep it as a dataset. Repeat the run weekly with monitor mode to see which new videos enter the results.

Developers and AI agents

Give an agent a simple tool: "search YouTube for X and return the top N videos as JSON". No API key management, no quota errors, one HTTP call.


Worked example: mapping a niche before your first video

You plan a channel about home espresso.

  1. Run the broad query home espresso machine review with maxResults 100.
  2. Export to a sheet. Count rows per channel. A few channels will appear many times: those are the established reviewers.
  3. Look at duration. If most top results are 15-35 minutes, long-form reviews are the norm for this query. A tight 8-minute comparison may be a gap.
  4. Look at published_text. If many results are years old, the topic has room for fresh content.
  5. Run narrower queries (espresso machine under 300, espresso machine for beginners) and compare. Queries with fewer established channels are easier entry points.
  6. Turn on monitor mode for your three main queries and schedule weekly runs. Each week you see only the new videos that entered the results.

How it works

  1. Search page. The Actor requests YouTube's public search results page for your query, with an English-language browser header, and reads the structured data that the page itself uses to render results.
  2. More pages. If you asked for more videos than the first page holds (usually 10-20), it requests the next result pages through YouTube's own continuation mechanism, the same one the site uses when you scroll down. It stops when it has enough unique videos, when YouTube has no more pages, or after a safety limit of 60 extra pages.
  3. Extract. Only regular video results are kept. Shorts shelves, channel cards, playlists and other widgets in the result page are skipped.
  4. De-duplicate. The same video can appear on two pages. Each video ID is kept once.
  5. Normalize. Text is trimmed, URLs are made canonical (lower-case host, tracking parameters and fragments removed).
  6. Write. Each video becomes one dataset row. A final _summary row reports the totals.

Reliability behavior

  • If the first search page cannot be downloaded after three attempts, or YouTube's page no longer contains the data the Actor reads, the run fails with a clear error message. It does not return an empty "success" that looks like "no results".
  • If a later page fails (for example YouTube refuses one continuation request), the run keeps the videos it already collected and finishes normally.
  • If the search really returns no videos, you get one _summary row with a note, and only the start fee is charged.

Input

FieldTypeDefaultDescription
querystringexample queryThe YouTube search term. Anything you would type into the YouTube search box.
maxResultsinteger20How many unique videos to return, 1-500.
enrichbooleanfalseAdds emails (addresses found in the description snippet), domain and completeness to each video. Charged per enriched video; see below.
monitorbooleanfalseCompares this run with the previous run of the same query and lists the new videos in a _changes row.

Example: 100 videos for one query

{
"query": "home espresso machine review",
"maxResults": 100
}

Example: weekly monitoring of a topic

{
"query": "n8n tutorial",
"maxResults": 50,
"monitor": true
}

Output

One row per video

FieldExampleNotes
idmAYbmcqPphcYouTube video ID
titleThe Fellow ES1 Espresso Machine ReviewVideo title as shown in results
urlhttps://www.youtube.com/watch?v=mAYbmcqPphcCanonical watch URL
channelJames HoffmannChannel name
channel_urlhttps://www.youtube.com/@jameshoffmannChannel handle URL
views_text765,400 viewsView count as text, exactly as YouTube displays it
duration34:16Length as text (mm:ss or h:mm:ss); empty for some live streams
published_text1mo agoRelative upload time as displayed by YouTube
descriptionJoin The Drip Feed...The description snippet shown under the result, not the full description
thumbnailhttps://i.ytimg.com/...Largest thumbnail URL in the result

Each row also carries a few generic fields shared with our other scrapers (price, price_text, location, seller, rating, reviews). YouTube search results do not have these values, so they are always empty for this Actor. You can hide them in the dataset view or drop them on export.

The _summary row

The last row of every run: total_raw (videos read), total_clean (unique videos returned), deduped (duplicates removed), with_url, with_price (always 0 here) and enriched.

The _changes row (monitor mode)

A list of video IDs that were not in the previous run of the same query. Present only when there are new videos.

Filtering helper rows out

The _summary and _changes rows have no id. In a spreadsheet, filter out rows where id is empty. Through the API, skip items that contain a _summary or _changes key.

Converting text fields to numbers

  • Views: views_text is text such as 765,400 views or No views. Remove everything except digits to get a number.
  • Duration: split duration on : and convert to seconds (34:16 is 2,056 seconds).
  • Upload time: published_text is relative (3 weeks ago, 1 year ago). If you need an exact date, record the run date next to it.

Monitor mode

Monitor mode answers "what is new for this search since last time?".

  1. Turn on monitor and save the input as a task (one task per query).
  2. Add a schedule to the task, for example weekly.
  3. The first run is the baseline. It returns the current videos and stores their IDs. Nothing is flagged as new and no change alerts are charged.
  4. Each later run returns the current videos as usual and adds a _changes row with the IDs that were not in the previous run of that query. Each new video is charged as one change-alert event.

The stored IDs live in a named key-value store called youtube-scraper-monitor in your own Apify account, one record per query. Different queries do not interfere with each other. Delete the store (or the record) to start a fresh baseline.

Note that in monitor mode the full result list is still returned and charged per video; the _changes row is an addition, not a filter.


Enrichment (optional)

With enrich on, each video gets:

  • emails: e-mail addresses found in the description snippet (only when the snippet contains one; most do not),
  • domain: the host of the video URL (always www.youtube.com for this Actor),
  • completeness: a generic score shared with our other scrapers. For YouTube videos it is always low, because it counts fields such as price and location that YouTube results do not have.

Every video receives domain and completeness, so every video is charged as enriched when this option is on. Turn it on only if you want the e-mail addresses that sometimes appear in description snippets. For most research, leave it off.


Pricing

This Actor charges per event. Current prices are on the Pricing tab; at the time of writing:

EventWhenPrice
actor-startOnce per run$0.0001
resultPer video returned$0.002
enrichmentPer video, only when enrich is on$0.01
change-alertPer new video in monitor mode (not on the first, baseline run)$0.005

Examples

RunCalculationTotal
20 videos$0.0001 + 20 x $0.002$0.0401
100 videos$0.0001 + 100 x $0.002$0.2001
500 videos$0.0001 + 500 x $0.002$1.0001
100 videos with enrich$0.2001 + 100 x $0.01$1.2001
Weekly monitor, 50 videos, 5 new$0.0001 + 50 x $0.002 + 5 x $0.005$0.1251
Search with no resultsstart fee only$0.0001

Platform usage (compute) is included in these event prices for pay-per-event Actors on Apify. There is no separate scraper or proxy that bills your account.


Integrations

API (synchronous, get results in the response)

curl -X POST "https://api.apify.com/v2/acts/enezli~youtube-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"home espresso machine review","maxResults":50}'

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("enezli/youtube-scraper").call(
run_input={"query": "home espresso machine review", "maxResults": 50})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if item.get("id"):
print(item["views_text"], item["title"], item["url"])

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('enezli/youtube-scraper').call({
query: 'home espresso machine review',
maxResults: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((i) => i.id).map((i) => i.title));

Schedules

Save an input as a task and attach a schedule (daily, weekly, monthly). Combine with monitor mode to receive only new videos for each query.

n8n, Make, Zapier

Use the Apify app or node: Run Actor (or run a saved task) → Get dataset items → filter rows with an id → append to Google Sheets, Airtable or Notion. For monitor mode, read the _changes row and post the new video URLs to Slack or e-mail.

AI agents (MCP)

The Actor is available through the Apify MCP server, so assistants such as Claude or Cursor can call it as a tool: "find the 30 most relevant YouTube videos about X and summarize the channels".


Workflow recipes

Competitor upload watch. Create one task per competitor brand query ("brand name" review), turn on monitor mode and schedule weekly. Send the _changes IDs to a Slack channel as watch links.

Keyword gap sheet. Run 10 related queries with 50 videos each. In a sheet, count how often each channel appears across all queries. Channels that appear everywhere are your real competition; queries where they are absent are your openings.

Creator shortlist. Search 5-10 niche queries, keep channel and channel_url, remove duplicates, and review the list manually. This gives you a starting list of creators who publish on your topic.

Title research. Export 200 titles for your topic and look for recurring words and formats ("vs", "after 1 year", "beginner", numbers). Use the patterns as input for your own titles.

Agent tool. Expose the Actor to your AI assistant via MCP and let it fetch fresh search results before it answers questions about a topic.


Tips for better results

  • Write queries like a viewer. YouTube returns what it would show a person typing the same words. Quotes and specific phrases narrow the results.
  • Use several narrow queries instead of one broad query with 500 results. Deep result pages are less relevant.
  • Keep one query per task when you use monitor mode, so each query has its own baseline.
  • Record the run date. published_text and views_text are relative and change over time.
  • Leave enrich off unless you specifically want e-mail addresses from description snippets.

Limitations

  • Search results only. The Actor returns the fields visible in search results. It does not open each video page, so it does not return likes, subscriber counts, comments, full descriptions, tags, transcripts or exact upload dates.
  • Regular videos only. Shorts shelves, channel cards and playlists that appear inside search results are skipped.
  • No search filters. Upload date, duration and sort filters are not available as inputs; the query is sent as you type it.
  • Text fields are as displayed. views_text, duration and published_text are YouTube's display text, not parsed numbers or dates.
  • Result depth depends on YouTube. Some queries end after a few pages; you may receive fewer videos than maxResults.
  • Results vary. YouTube personalizes and localizes results. The Actor sends an English-language request without a login, so results can differ from what you see in your own browser.
  • Layout changes. If YouTube changes its page structure, the run fails with a clear error instead of returning wrong data.

Troubleshooting

SymptomLikely causeWhat to do
Fewer videos than maxResultsYouTube has no more result pages for this query, or a later page was refusedNormal for narrow queries; use several related queries
Run failed: page could not be downloadedTemporary network problem or YouTube refused the requestRun again later
Run failed: ytInitialData not foundYouTube changed its page or served a consent/blocked pageRun again; if it persists, report it in the Issues tab
Only a _summary row with a noteThe query returned no videosUse a broader or differently worded query
price, location, seller are emptyThese generic fields do not exist on YouTubeIgnore or hide them
Every video counted as enrichedenrich adds domain and completeness to every videoTurn enrich off unless you need e-mails
Monitor run flags nothingFirst run for this query (baseline) or no new videosExpected; new videos appear from the second run on

FAQ

Do I need a YouTube or Google API key? No. The Actor reads YouTube's public search results page. There is no quota to manage.

How many videos can I get per query? Up to 500 per run. The real number depends on how deep YouTube's results go for that query.

Can I scrape a specific channel's videos? Not directly. You can search for the channel name plus a topic, but the Actor always works on search results, not on a channel's video list.

Does it return likes, subscribers or comments? No. Those require opening each video or channel page, which this Actor does not do. It returns what the search results show.

Are Shorts included? Regular video results are included. Shorts shown in their own shelf inside search results are skipped.

Why is the view count text and not a number? It is copied exactly as YouTube displays it, including formats like No views. See Converting text fields to numbers.

How does monitor mode know what is new? It stores the video IDs of each run per query in your own key-value store and compares the next run of the same query against them.

Am I charged for duplicates? No. Duplicates are removed before results are written and charged.

What happens if YouTube blocks the request? The Actor retries the first page three times. If it still fails, the run fails with an error message; you are charged only the start fee.

Can I export to Excel or Google Sheets? Yes. The dataset exports to CSV, Excel, JSON, XML and HTML from the Console, and integrations can write straight to Google Sheets.

Which language are results in? The request asks for English-language results. Video titles stay in their original language.

Can I run many queries at once? Run one query per run and start several runs in parallel, or loop over queries through the API. Each run has its own dataset.


What's new

  • More than one page of results: the Actor now follows YouTube's continuation pages up to your maxResults (up to 500). Earlier versions returned only the first page.
  • Monitor mode per query: each query keeps its own baseline, and the first run no longer charges change alerts.

Trademarks

This Actor is not affiliated with, endorsed by, or connected to YouTube or Google. YouTube is a trademark of Google LLC. All other names are trademarks of their respective owners.