YouTube Hashtag Scraper avatar

YouTube Hashtag Scraper

Pricing

from $2.99 / 1,000 hashtag videos

Go to Apify Store
YouTube Hashtag Scraper

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

w3crawler

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Features

Limited permissions

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

  1. Open the Actor Store page and select Try for free or open the Input tab.
  2. Enter one to 20 hashtags in hashtags; values may include or omit #.
  3. Set limit to the number of unique videos you want per hashtag. Keep countryCode and locale if you need a specific public result context.
  4. 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.

FieldTypeRequired?DefaultMeaning
hashtagsstring arrayRequiredPrefilled with ["music", "travel"]One to 20 hashtags, with or without #. Values are trimmed, # is removed, and duplicates are removed case-insensitively.
limitintegerOptional10Maximum unique video or Short rows per hashtag, from 1 to 50.
countryCodestringOptionalUSTwo-letter country code used for public page localization.
localestringOptionalen-USLanguage-country locale such as en-US or fr.
enableProxyFallbackbooleanOptionaltrueTry a configured proxy route after direct access fails. The fallback needs a usable proxy configuration.
requestDelayMsintegerOptional250Delay between hashtag requests, from 0 to 5,000 ms.
requestTimeoutSecsintegerOptional60Timeout for one public search page request, from 15 to 180 seconds.
proxyConfigurationobjectOptionalPrefilled 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.

FieldTypeAvailabilityMeaning
recordTypestringAlwaysRecord type; always youtube_hashtag_video.
hashtagstringAlwaysHashtag as submitted with a leading #, preserving the input letter case.
hashtagNormalizedstringAlwaysLowercase hashtag without #.
hashtagUrlstringAlwaysConstructed YouTube hashtag landing-page URL with hl and gl parameters.
rankintegerAlwaysOne-based position among unique saved videos for this hashtag, following the search page order.
typestringAlwaysvideo or short.
videoIdstringAlways11-character YouTube video ID.
titlestringAlwaysVideo title from the search card.
videoUrlstringAlwaysshorts URL for a Short, otherwise the watch URL.
urlstringAlwaysSame value as videoUrl.
watchUrlstringAlwaysCanonical https://www.youtube.com/watch?v=<id> URL for either type.
shortsUrlstringWhen type is shortShorts URL.
thumbnailUrlstringWhen thumbnails existLargest thumbnail URL.
thumbnailsobject arrayWhen thumbnails existUp to 16 thumbnail objects with url, width, and height.
thumbnailCountintegerAlwaysNumber of thumbnail entries; 0 when none were exposed.
channelNamestringWhen the card exposes a channelChannel display name.
channelIdstringWhen the card exposes a channelChannel ID from the browse endpoint.
channelUrlstringWhen the card exposes a channelPublic channel URL.
channelProfileUrlstringWhen the card exposes a channelSame value as channelUrl in saved video rows.
verifiedbooleanWhen badges are exposedWhether a badge matched verified, official artist, or music.
isVerifiedbooleanWhen badges are exposedSame value as verified.
badgesstring arrayWhen badges are exposedUp to 20 badge labels such as New, 4K, or Official Artist Channel.
descriptionstringWhen the card includes a snippetShort result description.
descriptionLengthintegerWhen the card includes a snippetLength of description in JavaScript string units (UTF-16 code units).
accessibilityTextstringWhen exposedAccessibility label for the card or title.
viewCountTextstringWhen exposedView count as displayed, such as 86,718 views.
viewCountintegerWhen the displayed count parsesNumeric view count; rounded when the text uses K/M/B.
publishedTextstringWhen exposedRelative publish text, such as 1d ago.
publishedTimeTextstringWhen exposedSame value as publishedText.
durationTextstringWhen exposedDuration as displayed, such as 3:38.
durationstringWhen exposedSame value as durationText.
durationSecondsintegerWhen duration parsesDuration converted to seconds.
isShortbooleanAlwaysWhether the row is classified as a Short.
isLivebooleanAlwaysWhether the card carries a live label. Shorts and lockup cards default to false.
isUpcomingbooleanAlwaysWhether the card exposes an upcoming-event field.
metadataLinesstring arrayWhen metadata is exposedDisplayed view and publish lines from a video card.
querystringAlwaysSearch query; # plus the hashtag.
pageintegerAlwaysSearch page number; always 1.
resultSourcestringAlwaysEmbedded data shape that produced the row: ytInitialData.videoRenderer, ytInitialData.lockupViewModel, or ytInitialData.shortsLockupViewModel.
sourceUrlstringAlwaysExact public search URL requested.
countryCodestringAlwaysUppercase country code used for the run.
localestringAlwaysNormalized locale used for the run.
requestedLimitintegerAlwaysThe limit value used for this run.
paginationMethodstringAlwaysAlways public-search-page-query.
metadataEnrichedbooleanAlwaysAlways true.
metadataSourcestringAlwaysAlways youtube-public-search-page.
extractionMethodstringAlwaysAlways youtube-public-search-page-embedded-initial-data.
sourceTypestringAlwaysAlways youtube-hashtag-search.
sourcestringAlwaysAlways youtube-public-hashtag-search.
scrapedAtstringAlwaysTime 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.

FieldMeaning
runTypeRun type; always youtube-public-hashtag-search-run.
statusActor process outcome: SUCCEEDED or FAILED.
dataStatusDataset completeness: COMPLETE, PARTIAL, NO_RESULTS, or FAILED.
dataAvailableWhether at least one video row was saved.
hashtagsCleaned hashtags used for the run, without #.
localeNormalized locale used for the run.
countryCodeCountry code used for the run.
limitPerHashtagPer-hashtag unique-video limit.
hashtagsProcessedHashtags attempted, including those whose page failed.
pagesFetchedSearch pages fetched successfully.
pagesWithResultsSearch pages that produced at least one saved row.
itemCountVideo rows saved to the dataset.
diagnosticCountDistinct operational issues recorded.
failedCountFailed hashtag requests plus a fatal input or runtime failure, if any.
blockedCountFailures whose error matched an access-block signal.
proxyRequestedWhether proxy use was requested explicitly or through fallback.
proxyConfiguredWhether at least one proxy URL was obtained during the run.
includeDiagnosticsWhether diagnostics were recorded; default true.
enableProxyFallbackWhether the proxy fallback flag was enabled.
requestDelayMsDelay between hashtags, from 0 to 5,000 ms.
requestTimeoutSecsPer-request timeout, from 15 to 180 seconds.
paginationMethodAlways public-search-page-query.
durationMsElapsed run time in milliseconds.
finishedAtTime the summary was written, in ISO UTC.
runStatusCanonical run status; matches status.
StatusData statusMeaning
SUCCEEDEDCOMPLETERows were saved and no hashtag request failed.
SUCCEEDEDPARTIALRows were saved, but at least one hashtag request failed. Saved rows remain available.
SUCCEEDEDNO_RESULTSNo row was saved and no failure was recorded.
FAILEDFAILEDNo 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.