YouTube Hashtag Scraper
Pricing
from $2.99 / 1,000 hashtag videos
YouTube Hashtag Scraper
Collect rich public video cards from one or more current YouTube hashtag pages.
Pricing
from $2.99 / 1,000 hashtag videos
Rating
0.0
(0)
Developer
w3crawler
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Collect public video and Shorts cards from YouTube search results for one or more hashtags. The Actor queries the ordinary public search page with #hashtag, reads the embedded initial data on the first results page, and saves one row per unique video ID per hashtag with title, channel, view count, publish time, duration, thumbnails, and badges. No hashtag landing page, video page, continuation endpoint, or signed-in client is used.
Get started
- Open the Actor Store page and select Try for free or open the Input tab.
- Enter one to 20 hashtags in
hashtags; values may include or omit#. - Set
limitto the number of unique videos you want per hashtag. KeepcountryCodeandlocaleif you need a specific public result context. - Start the Actor, open the dataset, and export the rows as JSON, CSV, or Excel. Open Run summary (
OUTPUT) to check page, item, and failure counts.
Input
hashtags is required; all other fields are optional. Unsupported field names and out-of-range values are rejected before requests start.
| Field | Type | Required? | Default | Meaning |
|---|---|---|---|---|
hashtags | string array | Required | Prefilled with ["music", "travel"] | One to 20 hashtags, with or without #. Values are trimmed, # is removed, and duplicates are removed case-insensitively. |
limit | integer | Optional | 10 | Maximum unique video or Short rows per hashtag, from 1 to 50. |
countryCode | string | Optional | US | Two-letter country code used for public page localization. |
locale | string | Optional | en-US | Language-country locale such as en-US or fr. |
enableProxyFallback | boolean | Optional | true | Try a configured proxy route after direct access fails. The fallback needs a usable proxy configuration. |
requestDelayMs | integer | Optional | 250 | Delay between hashtag requests, from 0 to 5,000 ms. |
requestTimeoutSecs | integer | Optional | 60 | Timeout for one public search page request, from 15 to 180 seconds. |
proxyConfiguration | object | Optional | Prefilled with {"useApifyProxy": false} | Standard Apify Proxy configuration. Proxy URLs must be credential-free. |
Example input using the saved run's settings:
{"hashtags": ["music"],"limit": 5,"countryCode": "US","locale": "en-US","enableProxyFallback": false,"requestDelayMs": 0,"requestTimeoutSecs": 60,"proxyConfiguration": {"useApifyProxy": false}}
The runtime also accepts includeDiagnostics (boolean, default true), which is recorded in OUTPUT but is not exposed in the Console input schema.
Each hashtag is requested once from https://www.youtube.com/results with search_query=#<hashtag>, the video result filter, and the supplied hl/gl values. The constructed hashtagUrl points at the hashtag landing page but that page is not fetched by this Actor.
Output
The dataset contains one row per unique video ID per hashtag, up to limit per hashtag. Missing optional metadata is omitted rather than inferred, and no diagnostic or placeholder rows are written.
| Field | Type | Availability | Meaning |
|---|---|---|---|
recordType | string | Always | Record type; always youtube_hashtag_video. |
hashtag | string | Always | Hashtag as submitted with a leading #, preserving the input letter case. |
hashtagNormalized | string | Always | Lowercase hashtag without #. |
hashtagUrl | string | Always | Constructed YouTube hashtag landing-page URL with hl and gl parameters. |
rank | integer | Always | One-based position among unique saved videos for this hashtag, following the search page order. |
type | string | Always | video or short. |
videoId | string | Always | 11-character YouTube video ID. |
title | string | Always | Video title from the search card. |
videoUrl | string | Always | shorts URL for a Short, otherwise the watch URL. |
url | string | Always | Same value as videoUrl. |
watchUrl | string | Always | Canonical https://www.youtube.com/watch?v=<id> URL for either type. |
shortsUrl | string | When type is short | Shorts URL. |
thumbnailUrl | string | When thumbnails exist | Largest thumbnail URL. |
thumbnails | object array | When thumbnails exist | Up to 16 thumbnail objects with url, width, and height. |
thumbnailCount | integer | Always | Number of thumbnail entries; 0 when none were exposed. |
channelName | string | When the card exposes a channel | Channel display name. |
channelId | string | When the card exposes a channel | Channel ID from the browse endpoint. |
channelUrl | string | When the card exposes a channel | Public channel URL. |
channelProfileUrl | string | When the card exposes a channel | Same value as channelUrl in saved video rows. |
verified | boolean | When badges are exposed | Whether a badge matched verified, official artist, or music. |
isVerified | boolean | When badges are exposed | Same value as verified. |
badges | string array | When badges are exposed | Up to 20 badge labels such as New, 4K, or Official Artist Channel. |
description | string | When the card includes a snippet | Short result description. |
descriptionLength | integer | When the card includes a snippet | Length of description in JavaScript string units (UTF-16 code units). |
accessibilityText | string | When exposed | Accessibility label for the card or title. |
viewCountText | string | When exposed | View count as displayed, such as 86,718 views. |
viewCount | integer | When the displayed count parses | Numeric view count; rounded when the text uses K/M/B. |
publishedText | string | When exposed | Relative publish text, such as 1d ago. |
publishedTimeText | string | When exposed | Same value as publishedText. |
durationText | string | When exposed | Duration as displayed, such as 3:38. |
duration | string | When exposed | Same value as durationText. |
durationSeconds | integer | When duration parses | Duration converted to seconds. |
isShort | boolean | Always | Whether the row is classified as a Short. |
isLive | boolean | Always | Whether the card carries a live label. Shorts and lockup cards default to false. |
isUpcoming | boolean | Always | Whether the card exposes an upcoming-event field. |
metadataLines | string array | When metadata is exposed | Displayed view and publish lines from a video card. |
query | string | Always | Search query; # plus the hashtag. |
page | integer | Always | Search page number; always 1. |
resultSource | string | Always | Embedded data shape that produced the row: ytInitialData.videoRenderer, ytInitialData.lockupViewModel, or ytInitialData.shortsLockupViewModel. |
sourceUrl | string | Always | Exact public search URL requested. |
countryCode | string | Always | Uppercase country code used for the run. |
locale | string | Always | Normalized locale used for the run. |
requestedLimit | integer | Always | The limit value used for this run. |
paginationMethod | string | Always | Always public-search-page-query. |
metadataEnriched | boolean | Always | Always true. |
metadataSource | string | Always | Always youtube-public-search-page. |
extractionMethod | string | Always | Always youtube-public-search-page-embedded-initial-data. |
sourceType | string | Always | Always youtube-hashtag-search. |
source | string | Always | Always youtube-public-hashtag-search. |
scrapedAt | string | Always | Time the row was saved, in ISO UTC. |
rank is assigned after duplicate video IDs are removed for that hashtag, so gaps in the raw page order can appear. viewCount and durationSeconds are derived from the displayed text and may be rounded or absent when the text cannot be parsed.
The example below is a real saved row from the 2026-10-25 run.
{"recordType": "youtube_hashtag_video","hashtag": "#music","hashtagNormalized": "music","rank": 1,"type": "video","videoId": "Q7hN3LompDY","title": "Nel Ngabo - Sondela (Official music video)","accessibilityText": "Nel Ngabo - Sondela (Official music video) 3 minutes, 38 seconds","videoUrl": "https://www.youtube.com/watch?v=Q7hN3LompDY","url": "https://www.youtube.com/watch?v=Q7hN3LompDY","watchUrl": "https://www.youtube.com/watch?v=Q7hN3LompDY","thumbnailUrl": "https://i.ytimg.com/vi/Q7hN3LompDY/hq720.jpg?sqp=-oaymwE2CNAFEJQDSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgBvgeAAtAFigIMCAAQARhlIGUoZTAP&rs=AOn4CLAokxrON1zUjWsSPP5wtGnKAFcOHg","thumbnails": [{"url": "https://i.ytimg.com/vi/Q7hN3LompDY/hq720.jpg?sqp=-oaymwE2COgCEMoBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgBvgeAAtAFigIMCAAQARhlIGUoZTAP&rs=AOn4CLCUN9fqFswSKY-apcE_vRxZC9Iqag","width": 360,"height": 202},{"url": "https://i.ytimg.com/vi/Q7hN3LompDY/hq720.jpg?sqp=-oaymwE2CNAFEJQDSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgBvgeAAtAFigIMCAAQARhlIGUoZTAP&rs=AOn4CLAokxrON1zUjWsSPP5wtGnKAFcOHg","width": 720,"height": 404}],"thumbnailCount": 2,"channelName": "Nel Ngabo","channelId": "UCCIEjbtIdSL7RAmuSqtYAxA","channelUrl": "https://www.youtube.com/channel/UCCIEjbtIdSL7RAmuSqtYAxA","channelProfileUrl": "https://www.youtube.com/channel/UCCIEjbtIdSL7RAmuSqtYAxA","verified": true,"isVerified": true,"badges": ["New","4K","Official Artist Channel"],"viewCountText": "86,718 views","viewCount": 86718,"publishedText": "1d ago","publishedTimeText": "1d ago","durationText": "3:38","duration": "3:38","durationSeconds": 218,"isShort": false,"isLive": false,"isUpcoming": false,"metadataLines": ["86,718 views","1d ago"],"query": "#music","page": 1,"resultSource": "ytInitialData.videoRenderer","hashtagUrl": "https://www.youtube.com/hashtag/music?hl=en-US&gl=US","sourceUrl": "https://www.youtube.com/results?search_query=%23music&hl=en&gl=US&sp=EgIQAQ%3D%3D","countryCode": "US","locale": "en-US","requestedLimit": 5,"paginationMethod": "public-search-page-query","metadataEnriched": true,"metadataSource": "youtube-public-search-page","extractionMethod": "youtube-public-search-page-embedded-initial-data","sourceType": "youtube-hashtag-search","source": "youtube-public-hashtag-search","scrapedAt": "2026-10-25T20:50:37.642Z"}
Run summary
Run summary is stored separately from the dataset in the run's key-value store under OUTPUT.
| Field | Meaning |
|---|---|
runType | Run type; always youtube-public-hashtag-search-run. |
status | Actor process outcome: SUCCEEDED or FAILED. |
dataStatus | Dataset completeness: COMPLETE, PARTIAL, NO_RESULTS, or FAILED. |
dataAvailable | Whether at least one video row was saved. |
hashtags | Cleaned hashtags used for the run, without #. |
locale | Normalized locale used for the run. |
countryCode | Country code used for the run. |
limitPerHashtag | Per-hashtag unique-video limit. |
hashtagsProcessed | Hashtags attempted, including those whose page failed. |
pagesFetched | Search pages fetched successfully. |
pagesWithResults | Search pages that produced at least one saved row. |
itemCount | Video rows saved to the dataset. |
diagnosticCount | Distinct operational issues recorded. |
failedCount | Failed hashtag requests plus a fatal input or runtime failure, if any. |
blockedCount | Failures whose error matched an access-block signal. |
proxyRequested | Whether proxy use was requested explicitly or through fallback. |
proxyConfigured | Whether at least one proxy URL was obtained during the run. |
includeDiagnostics | Whether diagnostics were recorded; default true. |
enableProxyFallback | Whether the proxy fallback flag was enabled. |
requestDelayMs | Delay between hashtags, from 0 to 5,000 ms. |
requestTimeoutSecs | Per-request timeout, from 15 to 180 seconds. |
paginationMethod | Always public-search-page-query. |
durationMs | Elapsed run time in milliseconds. |
finishedAt | Time the summary was written, in ISO UTC. |
runStatus | Canonical run status; matches status. |
| Status | Data status | Meaning |
|---|---|---|
SUCCEEDED | COMPLETE | Rows were saved and no hashtag request failed. |
SUCCEEDED | PARTIAL | Rows were saved, but at least one hashtag request failed. Saved rows remain available. |
SUCCEEDED | NO_RESULTS | No row was saved and no failure was recorded. |
FAILED | FAILED | No row was saved and at least one request or the input failed. |
Example OUTPUT from the 2026-10-25 run:
{"runType": "youtube-public-hashtag-search-run","status": "SUCCEEDED","dataStatus": "COMPLETE","dataAvailable": true,"hashtags": ["music"],"locale": "en-US","countryCode": "US","limitPerHashtag": 5,"hashtagsProcessed": 1,"pagesFetched": 1,"pagesWithResults": 1,"itemCount": 5,"diagnosticCount": 0,"failedCount": 0,"blockedCount": 0,"proxyRequested": false,"proxyConfigured": false,"includeDiagnostics": true,"enableProxyFallback": false,"requestDelayMs": 0,"requestTimeoutSecs": 60,"paginationMethod": "public-search-page-query","durationMs": 4004,"finishedAt": "2026-10-25T20:50:38.158Z","runStatus": "SUCCEEDED"}
Coverage and limitations
The Actor inspects only the first public search results page for each hashtag. It applies YouTube's video result filter and does not follow continuation tokens, change pages, or open the hashtag landing page, individual videos, channels, comments, or transcripts. The dataset therefore describes cards that the first search page exposes, not a complete inventory of videos using the hashtag.
hashtagUrl is constructed from the input tag; it is not evidence that the landing page was reached. A video can appear under more than one requested hashtag, so the same videoId can be saved once per hashtag. limit is applied per hashtag after deduplication, so the total dataset can exceed limit when several hashtags are supplied.
Channel and playlist search results are discarded because they have no video ID. Shorts are retained and marked from the public card type; a Short's videoUrl is its Shorts URL while watchUrl remains available. Counts, badges, publish text, and view counts are display values that YouTube can round, localize, or change. rank follows the page's card order after deduplication and is not a stable ranking claim.
A failed hashtag produces no rows for that hashtag and is counted in OUTPUT. If other rows were saved, the run remains successful with dataStatus: "PARTIAL". Input validation failures occur before requests and produce no rows.
Usage and support
Each hashtag normally costs one public search request, with extra attempts only for the configured proxy fallback. limit changes the number of saved rows, not the number of page requests. Start with one or two hashtags and a small limit, inspect the dataset and OUTPUT, then scale. See the Actor's Pricing tab for current account rates.
Use the Actor Issues page to report a problem. Include the run ID, the input used, and the OUTPUT summary; do not include tokens, cookies, or private data. This Actor is not affiliated with, endorsed by, or sponsored by YouTube or Google. Use it only for public data and in accordance with the source's terms, robots guidance, and applicable law. Public pages can contain personal information; use the output only for lawful purposes.