YouTube Video Scraper by Hashtag With Exact Engagement Stats avatar

YouTube Video Scraper by Hashtag With Exact Engagement Stats

Pricing

from $4.99 / 1,000 results

Go to Apify Store
YouTube Video Scraper by Hashtag With Exact Engagement Stats

YouTube Video Scraper by Hashtag With Exact Engagement Stats

YouTube Video Scraper By Hashtag extracts videos linked to any YouTube hashtag. Collect titles, creators, views, likes, thumbnails, tags, and metadata. Ideal for trend research, content analysis, competitor tracking, and workflows needing structured hashtag-based YouTube data.

Pricing

from $4.99 / 1,000 results

Rating

0.0

(0)

Developer

API Empire

API Empire

Maintained by Community

Actor stats

1

Bookmarked

6

Total users

1

Monthly active users

2 days ago

Last modified

Share

YouTube Video Scraper — Extract Videos, Shorts & Engagement Stats

YouTube Video Scraper by Hashtag With Exact Engagement Stats searches YouTube by hashtag, plain keyword or @handle and returns matching videos and YouTube Shorts as structured JSON. Every row can be enriched with the exact view count, the exact like count and the creator's own tags — numbers pulled straight from YouTube's own player endpoint, not the rounded figures the search page shows. Every response is typed, normalized JSON: no HTML, no selectors, no page to parse. Point it at a hashtag, set an engagement filter, and get back videos, Shorts and hashtag category data ready to load into a script, a spreadsheet or an LLM pipeline.

What is YouTube Video Scraper by Hashtag With Exact Engagement Stats?

It is an Apify Actor that runs a YouTube search for one or more terms — a #hashtag, a bare keyword, or an @handle — and returns the matching videos and Shorts as JSON. No YouTube or Google account is required: the Actor reads YouTube's public search pages and its public InnerTube endpoints directly. For each result it can make one extra call to YouTube's own /player endpoint, the only place an exact view count, an exact like count and the creator's tags actually exist.

  • 🎬 Scrape videos and YouTube Shorts by hashtag, keyword or @handle
  • 📈 Enrich every row with exact views, exact likes, creator tags, category and upload date from YouTube's own player endpoint
  • 🎚️ Filter on minimum likes, minimum exact views, or tag text before a row is ever written (and therefore before it is charged)
  • 📦 Export results as JSON, CSV, Excel, XML or HTML — every format an Apify dataset supports
  • 🌐 Route the search pages, the continuation calls and the player lookups through an Apify proxy of your choice

What data does YouTube Video Scraper by Hashtag With Exact Engagement Stats collect?

Each run returns three kinds of data on every row: the video or Short itself, the exact engagement numbers behind it, and the hashtag/channel context it was found under.

Data TypeKey FieldsJSON Field Names
Videos & Shortstitle, video ID, watch URL, thumbnail, duration, relative publish timetitle, id, url, thumbnailUrl, durationText, publishedTimeText, type
Exact engagement statsexact view count, exact like count, creator tags, category, family-safe flag, ISO upload dateexactViewCount, likeCount, tags, tagCount, hasTags, category, isFamilySafe, lengthSeconds, publishDate
Hashtag & channel contextthe hashtag's own video/channel totals, the uploading channelhashtagCategoryData.categoryInfoText, hashtagVideoCount, hashtagChannelCount, channelName, channelId

Need more YouTube data?

If you need the channel side of YouTube rather than search results, API-Empire also publishes YouTube Channel Scraper - Transcripts for channel-level data and transcripts, and Youtube Most Replayed Scraper & Video Chapters for a single video's most-replayed heatmap and chapter markers. Run this Actor for discovery by hashtag or keyword, then hand the video IDs it returns to either of those for a deeper look at one channel or one video.

How does YouTube Video Scraper by Hashtag With Exact Engagement Stats differ from the official YouTube Data API?

The YouTube Data API v3 is Google's own public API; this Actor reaches the same public data through YouTube's website and InnerTube endpoints, without an API key or a quota.

FeatureYouTube Data API v3YouTube Video Scraper by Hashtag
SetupGoogle Cloud project, API key or OAuth consent screenFill in the input form on Apify and run
Daily quotaDefault 10,000 units/day; a single search.list call costs 100 units — about 100 searches/day before requesting an increase (developers.google.com, checked 2026-08-04)No daily quota built into the Actor; usage is governed by maxResults and maxStatLookups per run
Hashtag searchsearch.list takes a free-text q parameter; there is no dedicated hashtag filter or hashtag-totals field#hashtag, keyword and @handle terms are sent to YouTube's search endpoint verbatim, including the hashtag's own video/channel totals
ShortsNo dedicated Shorts flag; callers infer Shorts from duration heuristicsscrapeShortsOnly reads the live shortsLockupViewModel shelf directly, plus a type field on every row
Exact engagementvideos.list returns statistics.viewCount/likeCount and snippet.tags per video, but each call still spends quota and needs an API keyOne InnerTube /player POST per video, budgeted by maxStatLookups and statLookupConcurrency, no Google Cloud project needed

The official API is the right choice if you already have Google Cloud infrastructure and need guaranteed platform support under a documented ToS. This Actor is the faster path when you want hashtag-driven discovery and exact engagement numbers in one JSON call, without provisioning an API key first.

Why do developers and teams scrape YouTube?

For AI engineers and agent builders

An agent that needs to ground an answer in "what's trending on YouTube right now for X" can call this Actor with a hashtag or keyword, get back title, exactViewCount, likeCount and tags as typed JSON, and pass it straight into a RAG index or a tool-call response — no HTML parsing step between the scrape and the model.

For marketers and brand teams

Tracking how a hashtag campaign or a competitor's keyword is performing means comparing real engagement, not the rounded 123K views shown on the page. exactViewCount, likeCount and tagKeywords filtering let a team pull every video over a like threshold for a campaign hashtag and rank them without opening a single video.

For researchers and analysts

Studying what creators tag their own content with, or how upload volume under a hashtag changes over time, only works with exact, comparable numbers across videos. hashtagVideoCount, hashtagChannelCount and the per-video tags array give a public-data-only view of a hashtag's scale and how creators self-describe their videos.

For developers building data products

A monitoring pipeline that re-runs a set of hashtags on a schedule and diffs the results needs a stable JSON schema more than it needs any single field. Every row keeps the same 31 keys whether or not the player lookup succeeds, so a downstream job can filter on statsFetched instead of coding around missing fields.

How to scrape YouTube (step by step)

  1. Open the Actor's page on the Apify Store and click Try for free (or run it from the Apify Console if you already have access).
  2. Fill in searchTerms with at least one #hashtag, keyword or @handle — the run exits with an error and no scraped rows if both searchTerms and hashtags are empty.
  3. Set maxResults for how many videos to keep per term, and toggle scrapeShortsOnly, the engagement filters (minLikeCount, minExactViewCount, tagKeywords, requireTags) and fetchExactStats for the data you need.
  4. Click Start and watch the run log — it prints the resolved terms, the lookup budget, and the transport (proxy or none) it is using.
  5. Open the Dataset tab when the run finishes and export the results as JSON, CSV, Excel, XML or HTML.

What to do when YouTube changes its structure

YouTube has changed its search and Shorts page layout before, and it will again. This Actor is maintained, and its output schema is designed to stay stable on your end — the same field names and types keep flowing even after an internal parsing fix. No specific turnaround time is promised for any one fix.

⬇️ Input

All fields are optional — the schema has no required parameters — but the run still needs at least one search term in searchTerms or hashtags to return anything.

ParameterRequiredTypeDescriptionExample Value
searchTermsNoArrayOne or more terms — #chatgpt, chatgpt, @mkbhd. A # is never added for you, so a bare keyword really is a keyword search.["#chatgpt"]
hashtagsNoArrayBackward-compatible alias of searchTerms for callers built against the original actor. When filled, it takes priority over searchTerms.[]
maxResultsNoIntegerHow many videos to keep per search term, counted after filtering. Min 1, max 500, default 10.25
scrapeShortsOnlyNoBooleanRestrict results to YouTube Shorts, read from the live shortsLockupViewModel shelf. Default false.false
fetchExactStatsNoBooleanTurn on the per-video player lookup for exact views, exact likes, tags, category and upload date. Default true.true
maxStatLookupsNoIntegerHard cap on how many videos get the extra player call in one run. Min 0, max 1000, default 100.100
statLookupConcurrencyNoIntegerHow many player lookups run at once. Min 1, max 8, default 4.4
residentialStatsFallbackNoBooleanAuto-route only the player calls through an Apify residential exit when a datacenter IP is refused. Default true.true
includeFullDescriptionNoBooleanAdd the full video description to each enriched row. Default false.false
minLikeCountNoIntegerKeep only videos with at least this many likes. 0 disables the filter. Min 0, default 0.0
minExactViewCountNoIntegerKeep only videos with at least this many exact views. 0 disables the filter. Min 0, default 0.0
tagKeywordsNoArrayKeep a video only if at least one creator tag contains one of these words (case-insensitive substring match).[]
requireTagsNoBooleanDrop videos whose creator set no tags at all. Default false.false
proxyConfigurationNoObjectApify proxy configuration. Editor: proxy. Default prefill {"useApifyProxy": false}.{"useApifyProxy": true}

Example JSON input, with every field shown:

{
"searchTerms": ["#chatgpt", "@mkbhd"],
"hashtags": [],
"maxResults": 25,
"scrapeShortsOnly": false,
"fetchExactStats": true,
"maxStatLookups": 100,
"statLookupConcurrency": 4,
"residentialStatsFallback": true,
"includeFullDescription": false,
"minLikeCount": 0,
"minExactViewCount": 0,
"tagKeywords": [],
"requireTags": false,
"proxyConfiguration": { "useApifyProxy": true }
}

Common pitfall: maxResults is applied per search term, not across the whole run — asking for maxResults: 25 with three terms in searchTerms can return up to 75 rows, not 25.

⬆️ Output

Results are written to the Actor's default dataset as typed JSON, one item per video or Short, exportable as JSON, CSV, Excel, XML or HTML. The dataset's default view surfaces 26 of the fields below; the row the Actor actually pushes carries 31 keys.

Scraped video

{
"thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"title": "How ChatGPT Actually Works (Explained Simply)",
"id": "dQw4w9WgXcQ",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"viewCount": 128400,
"type": "video",
"hashtagCategoryData.categoryInfoText": "2.6M videos • 822K channels",
"exactViewCount": 128437,
"likeCount": 5210,
"tags": ["chatgpt", "openai", "ai tutorial"],
"tagCount": 3,
"hasTags": true,
"category": "Science & Technology",
"isFamilySafe": true,
"lengthSeconds": 612,
"publishDate": "2026-06-14",
"descriptionFull": null,
"statsFetched": true,
"statsError": null,
"viewCountText": "128K views",
"shortViewCountText": "128K views",
"durationText": "10:12",
"publishedTimeText": "3 weeks ago",
"channelId": "UCabc123XYZ",
"channelName": "Tech Explained",
"searchTerm": "#chatgpt",
"searchTermKind": "hashtag",
"hashtagVideoCount": 2600000,
"hashtagChannelCount": 822000,
"rowSource": "videoRenderer",
"accountingRow": false
}

descriptionFull stays null unless includeFullDescription is true, even when the player lookup succeeds. channelId/channelName come from the player lookup (playerChannelId/playerChannelName) when available, falling back to what the search page itself carried.

A Shorts row (rowSource: "shortsLockupViewModel") uses the exact same 31 keys, but channelId and channelName come back null unless fetchExactStats succeeds for that row — the live Shorts shelf carries no channel information of its own.

When a run finds no rows at all, or fails outright, it writes exactly one uncharged accounting row instead of a charged result:

{
"thumbnailUrl": null,
"title": null,
"id": null,
"url": null,
"viewCount": null,
"type": null,
"hashtagCategoryData.categoryInfoText": null,
"accountingRow": true,
"statsFetched": false,
"statsError": "no_rows_returned",
"searchTerm": "#chatgpt",
"runId": "abCdEfGhIjKlMnOp"
}

To read only the videos you were charged for, filter the dataset on accountingRow not being true — every real video row sets accountingRow: false explicitly.

How does YouTube Video Scraper by Hashtag With Exact Engagement Stats compare to other YouTube scrapers?

FeatureThis ActorGeneric YouTube scraper
Output formatTyped JSON, stable field namesOften raw HTML or a scraped DOM tree requiring custom parsing
View/like countsExact numbers from the /player endpoint, or explicitly null and flagged statsFetched: falseUsually the rounded, abbreviated text shown on the search page (128K views)
Creator tagsReturned as an array, with hasTags/tagCount even when emptyNot available from the search page at any price
Shorts coverageParsed from the current shortsLockupViewModel shelf, with a scrapeShortsOnly filterDepends on keeping up with YouTube's shelf shape changes
Proxy handlingProxy attached to every search, continuation and player request; optional residential auto-escalation just for the walled /player callsVaries — many scripts skip the player-endpoint bot wall entirely by not calling it

If you're building an AI agent or a RAG pipeline, the output-format row is the decision-maker — parsing HTML inside an agent loop is a reliability failure mode, not a feature. Exact vs. rounded numbers matters just as much once you're filtering or ranking on engagement rather than just displaying it.

How many results can you scrape with YouTube Video Scraper by Hashtag With Exact Engagement Stats?

maxResults caps each search term at up to 500 videos, applied per term rather than across the whole run. Underneath that, the Actor follows continuation pages up to a hard ceiling of 60 pages per term, and stops a term early after 3 consecutive pages return zero new rows. During development, the deepest hashtag tested exhausted at 301 rows across 34 continuation pages before YouTube stopped serving new pages for that term — a measured example, not a guarantee for every hashtag, since busier or quieter terms exhaust at different depths. Separately, maxStatLookups (default 100, max 1000) caps the exact-engagement player lookups for the entire run, shared across every term — rows beyond that budget are still returned, just with statsFetched: false instead of an invented number.

Integrate YouTube Video Scraper by Hashtag With Exact Engagement Stats and automate your workflow

YouTube Video Scraper by Hashtag With Exact Engagement Stats works with any language or tool that can send an HTTP request, since it runs on the Apify platform like any other Actor.

REST API integration

from apify_client import ApifyClient
client = ApifyClient("<APIFY_API_TOKEN>")
run = client.actor(
"<YOUR_APIFY_USERNAME>/youtube-video-scraper-by-hashtag-with-exact-engagement-stats"
).call(run_input={
"searchTerms": ["#chatgpt"],
"maxResults": 25,
"fetchExactStats": True,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if item.get("accountingRow") is not True:
print(item["title"], item["exactViewCount"], item["likeCount"])

Works in Python, Node.js, Go, Ruby, cURL — any client that can call the Apify API.

MCP for AI agents

Apify's own MCP server exposes any Actor, including this one, as a callable tool for MCP-compatible clients such as Claude Desktop, Claude Code and the VS Code MCP extension (docs.apify.com/platform/integrations/mcp, checked 2026-08-04). Register it with:

APIFY_TOKEN=<your_apify_token> npx -y @apify/actors-mcp-server --actors <your-apify-username>/youtube-video-scraper-by-hashtag-with-exact-engagement-stats

Automation platforms (n8n, Make, LangChain)

n8n — the official @apify/n8n-nodes-apify package adds a Run Actor node and a Get Dataset Items node, so a workflow can start this Actor with your hashtag list and hand the resulting dataset to any other n8n node (docs.apify.com/platform/integrations/n8n, checked 2026-08-04). Make — Apify's app for Make.com provides a Run an Actor module (with a synchronous mode) and a Get Dataset Items module for the same start-then-fetch pattern (docs.apify.com/platform/integrations/make, checked 2026-08-04). LangChainlangchain_community.utilities.apify.ApifyWrapper runs an Apify Actor and loads its dataset straight into Document objects for a RAG pipeline (python.langchain.com/docs/integrations/providers/apify, checked 2026-08-04).

Yes — this Actor reads only what YouTube already serves to any visitor on its public search and video-player pages; it does not access private videos, unlisted links it wasn't given, or anything behind a login. Because each row also carries the uploading channel's public name and ID (channelName, channelId), which can identify an individual creator as well as a brand account, GDPR (EU/UK) and CCPA (California) considerations apply once you store or otherwise process that data — you need a lawful basis for keeping it and should honor deletion or access requests from an identifiable person. Consult legal counsel for commercial use cases involving bulk personal data.

Frequently asked questions

Does YouTube Video Scraper by Hashtag With Exact Engagement Stats work without a YouTube account?

Yes. No YouTube or Google login, API key or OAuth consent is needed — the Actor reads YouTube's public search pages and its public InnerTube endpoints directly.

How often is the scraped data updated?

Every run performs a live fetch against YouTube at the moment it runs; nothing is served from a cache. Re-run the Actor whenever you need fresh numbers.

What happens if a hashtag or search term returns no videos?

The run pushes exactly one uncharged accounting row (accountingRow: true, statsError: "no_rows_returned") instead of a charged result, and logs a warning. You are not charged for a term that YouTube has nothing to show for.

Can I scrape private or age-restricted YouTube content?

No. Only videos and Shorts that YouTube's public search already surfaces are returned — nothing behind a login wall or an age gate that the search page itself hides.

Do I need to sign up for anything before running it?

You need a free Apify account to run any Actor on the platform. This Actor charges per the row_result event under Apify's pay-per-event pricing — check the Actor's page on the Apify Store for current pricing.

Does YouTube Video Scraper by Hashtag With Exact Engagement Stats work for AI agent workflows and LLM pipelines?

Yes. It's callable as an HTTP endpoint by any agent framework via the Apify API, and it's registerable as an MCP tool through Apify's actors-mcp-server. Every response is typed JSON with a stable 31-key shape — no HTML parsing step before passing a row to an LLM.

How does it handle YouTube's anti-bot system?

YouTube's /player endpoint refuses datacenter IPs — including Apify's own container and datacenter proxy group — with a "Sign in to confirm you're not a bot" response. With residentialStatsFallback on (default), only the small /player calls are re-routed through an Apify residential exit, up to 3 escalations per run, while the larger search pages stay on the original, cheaper connection. Turn it off and exact stats simply come back null with statsFetched: false — nothing is fabricated to fill the gap.

Does it return data in a format LLMs can use directly?

Yes. Typed, normalized JSON with stable field names — pass it directly into an LLM context window, index it into a vector store, or route it through an agent tool without a parsing step.

Can I use it without managing proxies?

Yes for the search side — search and continuation requests work on the Apify container IP by default. For exact stats specifically, leave residentialStatsFallback on (the default) and the Actor handles the residential escalation itself; you only need to supply your own proxyConfiguration if you want a different exit than Apify's default.

What happens when YouTube changes its structure or blocks the scraper?

The Actor is maintained, and its output schema is designed to stay stable on your end — field names and types don't change because of an internal fix. No numeric turnaround time is promised for any specific fix.

Your feedback

Found a bug or missing a field? We want to know. Open an issue through the Actor's page on the Apify Store, or reach out via Apify's support channel — reports like these are how the parsing logic stays ahead of YouTube's next layout change.