YouTube Search Scraper (Official API) — Videos by Keyword avatar

YouTube Search Scraper (Official API) — Videos by Keyword

Pricing

from $0.30 / 1,000 video results

Go to Apify Store
YouTube Search Scraper (Official API) — Videos by Keyword

YouTube Search Scraper (Official API) — Videos by Keyword

Bring your own free YouTube API key. YouTube search by keyword with sort, date, region, language and length filters — every result enriched with views, likes, comments, duration and tags via the official YouTube Data API v3. No scraping, no blocks. $0.30 per 1,000 results.

Pricing

from $0.30 / 1,000 video results

Rating

0.0

(0)

Developer

ActorForge

ActorForge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 hours ago

Last modified

Share

Bring your own free YouTube API key. YouTube search by keyword with sort, date, region, language and length filters — every result enriched with views, likes, comments, duration and tags via the official YouTube Data API v3. No scraping, no blocks. $0.30 per 1,000 results.

Bring your own free YouTube API key and run YouTube search by keyword through the official YouTube Data API v3, with no scraping, no proxies and no blocks. Type one or more search queries and get one row per result, in YouTube's own search order.

  • Every result is a full video row: search query, rank, title, description, channel, published date, duration in seconds, views, likes and comment count, tags, category, default language, thumbnails, live status, made-for-kids flag and a Shorts flag. Many no-key YouTube search scrapers return only what the results page shows; here every row is enriched from videos.list.
  • The exact YouTube search filters: sort by relevance, upload date, view count or rating; publishedAfter / publishedBefore dates; regionCode (country); relevanceLanguage; and video length (short under 4 min, medium 4–20 min, long over 20 min). Set searchType to channel to get channel rows with subscriber, video and view counts instead.
  • Up to about 500 results per query (YouTube's own cap for search), 50 per page. Duplicates across queries are removed.

Use it for YouTube keyword research, trend and competitor tracking, influencer discovery, content gap analysis and feeding search results into Sheets, Make, n8n or Zapier. $0.30 per 1,000 results plus $0.002 per page of 50 (about $0.34 per 1,000 all-in), roughly a third of the leading YouTube search scrapers. A free key covers about 5,000 search results a day. The same code also does video lookups, channels and comments through the mode field.

Get your free API key (about 60 seconds, no billing account)

  1. Open the Google Cloud Console and sign in with any Google account. Create a project (top bar → New project).
  2. Go to APIs & Services → Library, search for YouTube Data API v3 and click Enable.
  3. Go to APIs & Services → Credentials → Create credentials → API key and copy the key (it starts with AIza).
  4. Paste it into the YouTube API key field of this actor and run. The field is a secret input: Apify stores it encrypted, and the actor never logs it or writes it to the output.

You do not need to add a billing account. Each Google Cloud project gets 10,000 free quota units per day, which reset at midnight Pacific Time. If you restrict the key, allow YouTube Data API v3 and leave out HTTP-referrer or IP restrictions, because Apify runs on changing server IPs.

How far your free quota goes

ModeAPI callsQuota unitsRows per day on 10,000 units
videosvideos.list (50 IDs per call)1 per 50 videosabout 500,000 videos
channelchannels.list + playlistItems.list + videos.list1 per channel + about 2 per 50 videosabout 250,000 videos
commentscommentThreads.list (100 per call), comments.list for long reply threads1 per 100 commentsabout 1,000,000 comments
searchsearch.list (50 per page) + videos.list101 per page of 50about 100 pages (5,000 results)

Search is the expensive call: YouTube charges 100 units per page. The run log shows an estimate before any call is made. If your key runs out (a 403 quotaExceeded error), the actor stops cleanly with a clear message, keeps the rows already delivered, and does not charge for the failed call. It never retries against an exhausted quota.

Official API only, and your data stays yours

  • All data comes from the official YouTube Data API v3 (https://www.googleapis.com/youtube/v3/) using your own key and quota. Nothing is scraped from youtube.com, and there are no proxies, cookies or logins.
  • We never hold, share or pool API keys, and no default key is built in. ActorForge sells the API client; the data is fetched under your key.
  • ActorForge keeps no copy of API data after the run. Rows go only to your run's dataset, which belongs to you. YouTube's Developer Policies require stored API data to be refreshed or deleted at least every 30 days, so set a retention period on your datasets or re-run to refresh them. Statistics such as view counts change constantly anyway.
  • By using this actor you also agree to the YouTube Terms of Service. Google's handling of API requests is covered by the Google Privacy Policy. You can review or revoke your key at any time in the Google Cloud Console, and revoke API access for your Google account at Google security settings.

This actor uses YouTube API Services. It is not affiliated with or endorsed by YouTube or Google.

📘 Step-by-step guide: How to Get YouTube Data With the Official API (Free Key, No Code)

What data does it return?

Every run outputs clean, schema-validated rows like these:

searchQuerysearchRanktitlechannelTitlepublishedAtdurationSecviewCountlikeCountcommentCountcategoryIdisShort
web scraping tutorial1Beginners Guide To Web Scraping with Python - All You Need To KnowTinkernut2021-11-27T13:00:24Z4564873541328723227false
web scraping tutorial2Learn Web Scraping in 5 Minutes (NO PRIOR KNOWLEDGE)CodeHead2026-03-05T15:01:30Z29317810067499627false
web scraping tutorial3Python Tutorial: Web Scraping with BeautifulSoup and RequestsCorey Schafer2017-11-08T17:30:00Z2748119564725130114027false

How much does it cost?

Transparent pay-per-event pricing — you only pay for what you get, and the actor always respects your run budget: set a maximum total charge and it stops cleanly at the cap instead of overrunning.

EventPriceChargedWorked example
video-result$0.0003per search result (video row with full details and stats) delivered1,000 results = $0.30 (grow_media: $1.00; api-ninja: $5.00 + start fee)
search-page$0.002per search page of up to 50 results that returned rows (it costs 100 of your quota units)50 results = $0.002 + 50 × $0.0003 = $0.017
channel-result$0.0005per channel row delivered (searchType channel, or channel mode)100 channels = $0.05
comment-result$0.0005per comment or reply row delivered (comments mode; author fields stripped)10,000 comments = $5.00
apify-actor-start$0.00005per run per GB of memory (platform start fee)One run at 256 MB = $0.0000125

Input options

FieldTypeRequiredDefaultDescription
apiKeystringno—Required. Your own free YouTube Data API v3 key (starts with AIza). Get one in about a minute: console.cloud.google.com → create a project → APIs & Services → Library → enable "YouTube Data API v3" → Credentials → Create credentials → API key. No billing account is needed, and the free quota is 10,000 units per day. The key is stored encrypted by Apify, used only for this run's calls to googleapis.com, and never logged or written to the output.
modestringno"search"videos: details and stats for video URLs/IDs (1 quota unit per 50 videos). search: YouTube search results, enriched with full video details (100 units per page of 50). channel: channel stats plus every upload (about 2 units per 50 videos). comments: comments on videos, author names stripped (1 unit per 100 comments).
searchQueriesarrayno[]One or more search terms. Each page of up to 50 results costs 100 of your 10,000 daily quota units (about 5,000 results per free key per day). YouTube returns at most about 500 results per query.
maxResultsPerQueryintegerno50Search results per query. YouTube returns at most about 500 per query. Each 50 = one search page (100 quota units + 1 for video details).
orderstringno"relevance"search.list order (search mode).
searchTypestringno"video"video: video rows with full details. channel: channel rows with subscriber, video and view counts (search mode).
publishedAfterstringno""Optional date (YYYY-MM-DD). In search mode, filters results; in channel mode, only uploads on or after it (and paging stops at older videos, saving quota).
publishedBeforestringno""Optional date (YYYY-MM-DD) for search mode.
regionCodestringno""Optional 2-letter country code (US, GB, DE …): search results available in that country (search mode).
relevanceLanguagestringno""Optional ISO 639-1 language code (en, es, de …): results most relevant to that language (search mode).
videoDurationstringno"any"Filter search results by duration (search mode, videos only). short < 4 min, medium 4–20 min, long > 20 min.
videoUrlsarrayno—Videos for the videos and comments modes: watch URLs, youtu.be links, Shorts, embed or live URLs, or bare 11-character IDs. Duplicates are removed. videos.list takes 50 IDs per call.
channelsarrayno[]Channel URLs (youtube.com/@handle, /channel/UC…, /user/name), @handles or channel IDs (UC…), for channel mode. Each gives one channel row plus its uploads.
maxVideosPerChannelintegerno100Newest uploads per channel (channel mode). 0 = channel row only. Every 50 videos cost about 2 quota units.
includeShortsbooleannotrueChannel mode. The API does not flag Shorts, so this uses a heuristic (3 minutes or less, not live): turning it off also drops regular videos that short.
maxCommentsPerVideointegerno100Top-level comments per video (comments mode). Replies are not counted here; they are capped separately by Max replies per comment. 100 top-level comments per quota unit.
includeRepliesbooleannofalseAlso return replies (comments mode), up to Max replies per comment per thread. Each reply is its own comment-result row, linked by parentId.
maxRepliesPerCommentintegerno20With Include replies on: at most this many replies per top-level comment (comments mode), so one huge thread cannot eat the run. 0 = no replies. Up to 5 replies come free with the thread call; more cost 1 quota unit per 100.
commentOrderstringno"time"time: newest first. relevance: YouTube's top comments.
searchTermsstringno""Optional keyword filter applied by YouTube to the comments (comments mode).

Limits & honest notes

  • You need your own free YouTube Data API v3 key (see the 4-step guide above). Without one the run stops at once with instructions, and nothing is charged.
  • Search is quota-hungry: each search.list page of up to 50 results costs 100 of your 10,000 free daily units (plus 1 unit for the video details), so one free key gives about 5,000 search results a day (about 100 pages). Quota resets at midnight Pacific Time. A quotaExceeded error stops the run cleanly; rows already delivered are kept, and the failed call is free.
  • About 500 results per query at most. That is YouTube's own cap on search depth, so maxResultsPerQuery goes up to 500. For more coverage, split a topic into several narrower queries or date ranges.
  • Results and their order are YouTube's own search ranking for an API request (no personalisation, no ads). Results may differ slightly from what a logged-in user sees on youtube.com.
  • Like counts that the creator hides come back as null. There are no dislike counts (removed by YouTube), no revenue and no watch time.
  • isShort is a heuristic (3 minutes or less and not live), because the API does not flag Shorts. Use the video length filter short to get only videos under 4 minutes.
  • Free rows (type error) cover failed queries and invalid inputs. Search pages that return no rows are not charged.
  • You must refresh or delete stored API data within 30 days (YouTube Developer Policies III.E.4). We keep nothing after the run.
  • The run's spend limit is respected: each page of rows is charged before it is delivered, and the run stops cleanly at the cap.

Changelog

  • 2026-10-20 — Initial release: YouTube search by keyword via the official YouTube Data API v3 with your own key. Sort, date, region, language and length filters, every result enriched with full stats, rank per query, clean quota-exceeded stop, and pay-per-event billing.

Built and maintained by ActorForge. Reliability first: every actor in the portfolio is monitored by an automated nightly self-test, and breakages are typically fixed the same day.