YouTube Search Scraper avatar

YouTube Search Scraper

Pricing

from $0.20 / 1,000 results

Go to Apify Store
YouTube Search Scraper

YouTube Search Scraper

Export YouTube keyword search results: videos, Shorts, channels or playlists. Apply YouTube's filters, language and country. Optional likes, comments and publish day for videos.

Pricing

from $0.20 / 1,000 results

Rating

0.0

(0)

Developer

Eli J

Eli J

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

YouTube Search Scraper exports YouTube keyword search results as dataset rows: videos, Shorts, channels or playlists. Apply YouTube's filters, set a language and country, and optionally read each video's publication day and engagement counts.

The form prefills this example. API calls with omitted or empty searchQueries collect no rows and finish successfully with guidance.

{"searchQueries": ["home espresso setup"], "proxyConfiguration": {"useApifyProxy": true}}

The example requests up to 20 video results. Change maxResults per query or choose another resultType. Collection follows result pages until that limit or until YouTube returns no more. Results can be partial when YouTube blocks a request, repeats a cursor or the 270-second collection budget ends. Check the run's SUMMARY and ERRORS records.

Output

Each result carries query, rank, page, type and scrapedAt (UTC). Rank is the position among distinct results of the selected type before exact-date filtering; page starts at 1. The result identity comes from the source, and duplicates are removed within each query.

A source-derived excerpt from an espresso search:

{
"type": "video",
"videoId": "wGK5x1K1BIg",
"url": "https://www.youtube.com/watch?v=wGK5x1K1BIg",
"title": "The BEST Espresso Setup Under $500… for YOU",
"duration": 1179,
"lengthText": "19:39"
}

Video rows include videoId, url, title, channelName, channelId, collaborator channelIds, channelHandle, channelUrl, channelAvatar, isVerified, publishedTimeText, viewCount, viewCountText, duration, lengthText, still-image thumbnails, nullable richThumbnail (the source's moving-preview URL), descriptionSnippet, badges and isLive. Duration is seconds. A source-absent duration stays null, including streams without a length. Relative publication text is kept as text; no date is derived from it.

Shorts supply their video identity, title, thumbnails and view label; channel and publication fields absent from the search tile remain null. Channel rows supply channel identity, name, handle, thumbnails, description snippet and the source subscriber label. Playlist rows supply playlist identity, title, owner information, thumbnails and the source video-count label where present.

With details, videos and Shorts add publishedDate, publishedDatePrecision, likes, commentsCount, subscribers, the full description, hashtags and descriptionLinks. Counts are integers, read from the source's labels at their stated precision. Count text and precision fields are viewCountText/viewCountPrecision, likesText/likesPrecision, commentsCountText/commentsCountPrecision and subscribersText/subscribersPrecision: exact or abbreviated. Abbreviated numbers are expanded estimates of the source label, never presented as exact. Unsupported or absent values stay null; isVerified is null when the source tile exposes no owner badge.

Inputs

InputTypeDefaultMeaning
searchQueriesarrayNo API defaultKeyword batch. Form prefill: ["home espresso setup"].
maxResultsinteger20Maximum delivered rows per query; 0 collects none.
resultTypestringvideovideo, short, channel or playlist.
uploadDatestringanyany, today, week, month or year.
durationstringanyany, under3, 3to20 or over20, in minutes.
featuresarray[]Any combination of live, 4k, hd, subtitles, creativeCommons, 360, vr180, 3d, hdr, location, purchased.
sortstringrelevancerelevance or popularity.
hlstringenSearch language code; for example de.
glstringUSTwo-letter search country code; for example DE.
detailsbooleanfalseRead per-video publication and engagement details; adds requests.
proxyConfigurationobjectAutomatic datacenterOptional proxy settings. Form prefill enables Apify Proxy without an account-specific group.
publishedAfterstringUnsetInclusive source calendar-day lower bound, YYYY-MM-DD.
publishedBeforestringUnsetInclusive source calendar-day upper bound, YYYY-MM-DD.

For example, combine resultType: "video", uploadDate: "month", duration: "over20" and features: ["hd"]. Filters use YouTube's semantics. Not every feature has an observable signal on a search row, especially 360, VR180, 3D, HDR, location and purchased. popularity is YouTube's relevance-dependent order; rows are not guaranteed to descend by view count.

Exact calendar-date windows

YouTube sometimes returns rows outside a selected upload or duration bucket. The Actor skips rows only when their source label or duration proves the mismatch, counts them as sourceFilterMismatches per query in SUMMARY, and follows continuations to fill the requested limit. Skipped rows are not charged. Missing, localized or ambiguous publication labels remain unchanged; bucket filters cannot replace an exact source-date window.

Date bounds read publication days from video details, even when details is off, and attach the detail fields that response supplies. Extra comment-header requests are made only when details is on. Bounds are inclusive calendar days, not timestamp-precision bounds. Dates missing from the source cannot match. Set an uploadDate bucket that contains the window to reduce rejected candidates. There is no newest-first source order, so a narrow window can require reading many rejected candidates and may end with partial results. SUMMARY reports candidates, pages, delivered rows and the stop reason per query, including queries not attempted after a run-level stop.

Enrichment requests English date labels while preserving the search locale. A calendar day is emitted with publishedDatePrecision: "day"; no time of day is fabricated. Exact windows and details apply to videos and Shorts.

Billing

Each delivered dataset row triggers one YouTube search result event. Basic and detailed rows have the same price: USD 0.80 per 1,000 results on FREE, USD 0.24 on BRONZE, USD 0.22 on SILVER, and USD 0.20 on GOLD, PLATINUM and DIAMOND. Each run also incurs a USD 0.00005 Actor Start charge, including runs with no result rows. Rows dropped for proven source upload/duration mismatches are not charged as results. If the run's maximum total charge is reached, collection stops before the next source read. Failed queries go to ERRORS and are not charged as results.

Access and limits

The default path reads public, logged-out YouTube responses through automatic datacenter proxies or your proxy configuration. Search is its first source request, and the connection and session are reused for subsequent reads. If a new session's first request has no response after one second, the same request is sent once on a second fresh session and the first answer is used; SUMMARY counts these in hedgedRequests. Empty or zero-result input makes no source call. Blocks and connection failures fall back to a private browser service. In that service, search pages use datacenter egress and watch pages use residential egress (datacenter watch requests hit Google's unusual-traffic page). The service returns the first search page only; later pages of that query are read on the default path when it answers, otherwise the run reports partial coverage. If the service is unavailable, the query is recorded in ERRORS. Browser calls and response bytes are counted in SUMMARY.

Channel creation dates, total channel views, channel video counts and video keywords are not provided; they would require additional channel or player requests. Location, members-only status and paid-promotion flags are also not provided: the search and watch metadata read by this Actor does not identify them. A channel's Join button does not establish that a video is members-only.

YouTube's robots file disallows /results and /youtubei/. Its Terms restrict automated access except public search engines following robots rules or access with written permission. Login-gated data is excluded. The Actor downloads no comments, transcripts or media.

YouTube can remove or change fields, localize labels or return no matches for a filter combination. Source availability determines the row values. Use ERRORS and SUMMARY to distinguish exhausted, capped and unresolved queries. For help, include your run URL and input when opening an Actor issue.