YouTube Hashtag Video & Shorts Scraper avatar

YouTube Hashtag Video & Shorts Scraper

Pricing

from $2.99 / 1,000 hashtag videos & shorts

Go to Apify Store
YouTube Hashtag Video & Shorts Scraper

YouTube Hashtag Video & Shorts Scraper

Collect current YouTube hashtag videos and Shorts through YouTube browse continuations, with source-provided metadata.

Pricing

from $2.99 / 1,000 hashtag videos & shorts

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 searches the ordinary public results page with #hashtag, reads the embedded initial data on the first page, and saves one row per unique video ID per hashtag with title, channel, views, publish age, duration, thumbnails, and badges. It does not open hashtag landing pages, individual videos, continuation endpoints, or a signed-in client.

Get started

  1. Open the Actor Store page and select Try for free or open the Input tab.
  2. Enter one to 50 hashtags in hashtags; a leading # is optional.
  3. Set maxItems for the per-hashtag row cap and choose a 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 ["travel"]One to 50 hashtags using letters, numbers, underscores, or hyphens. A leading # is stripped; duplicates are removed case-insensitively.
maxItemsintegerOptional20Maximum unique video or Short rows per hashtag, from 1 to 200.
localestringOptionalen-USPublic page language-country locale such as en-US or de-DE. A language-only value uses US as the country.
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": ["travel"],
"maxItems": 5,
"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 hl/gl derived from locale. hashtagUrl is a constructed landing-page URL; that landing page is not fetched.

Output

The dataset contains one row per unique video ID per hashtag, up to maxItems 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_short.
hashtagstringAlwaysHashtag without #, preserving the input letter case.
hashtagNormalizedstringAlwaysLowercase hashtag without #.
rankintegerAlwaysOne-based position among unique saved rows for this hashtag, following search page order.
typestringAlwaysvideo or short.
videoIdstringAlways11-character YouTube video ID.
titlestringAlwaysVideo title from the search card.
descriptionstringWhen the card includes a snippetShort result description.
descriptionLengthintegerWhen a description existsLength of description in JavaScript string units (UTF-16 code units).
accessibilityTextstringWhen exposedAccessibility label for the card or title.
urlstringAlwaysShorts URL for a Short, otherwise the watch URL.
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.
viewCountTextstringWhen exposedView count as displayed, such as 750,050 views.
viewCountintegerWhen the displayed count parsesNumeric view count; rounded when the text uses K/M/B.
durationstringWhen exposedDuration as displayed, such as 21:27.
durationSecondsintegerWhen duration parsesDuration converted to seconds.
channelNamestringWhen the card exposes a channelChannel display name.
channelIdstringWhen the card exposes a channelChannel ID.
channelUrlstringWhen the card exposes a channelPublic channel or handle 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 4K.
publishedTimeTextstringWhen exposedRelative publish text, such as 2mo ago.
metadataLinesstring arrayWhen metadata is exposedDisplayed view and publish lines from a video card.
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.
querystringAlwaysSearch query; # plus the hashtag.
pageintegerAlwaysSearch page number; always 1.
resultSourcestringAlwaysEmbedded data shape that produced the row: ytInitialData.videoRenderer, ytInitialData.lockupViewModel, or ytInitialData.shortsLockupViewModel.
hashtagUrlstringAlwaysConstructed https://www.youtube.com/hashtag/<tag> URL.
sourceUrlstringAlwaysExact public search URL requested.
localestringAlwaysNormalized locale used for the run.
languageCodestringAlwaysLanguage portion of locale.
countryCodestringAlwaysCountry portion of locale; US when no region was supplied.
requestedMaxItemsintegerAlwaysThe maxItems 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 card order can appear. viewCount and durationSeconds are derived from displayed text and may be rounded or absent when parsing fails.

The example below is a real saved row from the 2026-10-25 run.

{
"recordType": "youtube_hashtag_video_short",
"hashtag": "travel",
"hashtagNormalized": "travel",
"rank": 1,
"type": "video",
"videoId": "btYXsKGUhrQ",
"title": "We Travelled Europe for 9 Months | These Are the 7 Places We'd Go Back To",
"accessibilityText": "We Travelled Europe for 9 Months | These Are the 7 Places We'd Go Back To 21 minutes",
"url": "https://www.youtube.com/watch?v=btYXsKGUhrQ",
"watchUrl": "https://www.youtube.com/watch?v=btYXsKGUhrQ",
"thumbnailUrl": "https://i.ytimg.com/vi/btYXsKGUhrQ/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBqLzl_8DDgjj18fTBhjg6gQg4KgB&rs=AOn4CLDWlG1I9L4uG3WfkbeCTFp5Tk33Gg&usqp=CBU",
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/btYXsKGUhrQ/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBqLzl_8DDgjj18fTBhjg6gQg4KgB&rs=AOn4CLDllAg4ZwG90tW1WpWLkGFERGvUtw&usqp=CBU",
"width": 360,
"height": 202
},
{
"url": "https://i.ytimg.com/vi/btYXsKGUhrQ/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBqLzl_8DDgjj18fTBhjg6gQg4KgB&rs=AOn4CLDWlG1I9L4uG3WfkbeCTFp5Tk33Gg&usqp=CBU",
"width": 720,
"height": 404
}
],
"thumbnailCount": 2,
"viewCountText": "750,050 views",
"viewCount": 750050,
"duration": "21:27",
"durationSeconds": 1287,
"channelName": "Fit Nomads",
"channelId": "UC0D8hqVmVCBlftYTr_T6QTQ",
"channelUrl": "https://www.youtube.com/@fitnomads",
"channelProfileUrl": "https://www.youtube.com/@fitnomads",
"verified": false,
"isVerified": false,
"badges": [
"4K"
],
"publishedTimeText": "2mo ago",
"metadataLines": [
"750,050 views",
"2mo ago"
],
"isShort": false,
"isLive": false,
"isUpcoming": false,
"query": "#travel",
"page": 1,
"resultSource": "ytInitialData.videoRenderer",
"hashtagUrl": "https://www.youtube.com/hashtag/travel",
"sourceUrl": "https://www.youtube.com/results?search_query=%23travel&hl=en&gl=US&sp=EgIQAQ%3D%3D",
"locale": "en-US",
"languageCode": "en",
"countryCode": "US",
"requestedMaxItems": 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:58:48.295Z"
}

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.
maxItemsPerHashtagPer-hashtag unique-row cap.
hashtagsProcessedHashtags attempted, including those whose page failed.
pagesFetchedSearch pages fetched successfully.
pagesWithResultsSearch pages that produced at least one saved row.
itemCountVideo and Short 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": [
"travel"
],
"locale": "en-US",
"maxItemsPerHashtag": 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": 2070,
"finishedAt": "2026-10-25T20:58:48.676Z",
"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 describes cards exposed on that first page, not a complete inventory of videos using the hashtag.

hashtagUrl is constructed from the input tag and is not evidence that the landing page was reached. hashtag values omit #, while query includes it. A video can appear under more than one requested hashtag, so the same videoId can be saved once per hashtag. maxItems applies per hashtag after deduplication, so the total dataset can exceed it 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 url is its Shorts URL while watchUrl remains available. Views, badges, publish text, and durations 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. maxItems changes the number of saved rows, not the number of page requests. Start with one or two hashtags and a small cap, 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.