YouTube Search Scraper API avatar

YouTube Search Scraper API

Pricing

from $0.99 / 1,000 results

Go to Apify Store
YouTube Search Scraper API

YouTube Search Scraper API

Extract YouTube search results at scale with this fast, reliable scraper API. Collect video titles, URLs, channel details, descriptions, views, publish dates, thumbnails, and more from any keyword search. Ideal for SEO research, trends, analytics, and data workflows.

Pricing

from $0.99 / 1,000 results

Rating

0.0

(0)

Developer

Shahid Irfan

Shahid Irfan

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

3 days ago

Last modified

Categories

Share

What does YouTube search Scraper API do?

YouTube search Scraper API searches YouTube for a keyword or phrase and returns structured results for videos, Shorts, channels, playlists, movies, or all supported result types. Enter a query such as web scraping, choose the result type and filters, set the result limit, and receive one clean dataset item per result.

Use the data for content research, creator discovery, competitor monitoring, keyword analysis, trend tracking, media catalogs, publishing research, and AI or RAG workflows. Each item keeps the search query and result position together with the public title, URL, channel information, engagement text, duration, thumbnails, and other available metadata.

Why use YouTube search Scraper API?

  • Search-based collection - Find public YouTube content without preparing channel URLs first.
  • Flexible result types - Collect videos, Shorts, channels, playlists, movies, or a mixed result set.
  • Useful search filters - Narrow results by relevance or popularity, upload date, duration, and YouTube features.
  • Creator context - Keep channel name, handle, ID, URL, and thumbnail with video results when available.
  • Video research fields - Capture titles, descriptions, publication text, view text, durations, thumbnails, live status, premiere status, and caption availability.
  • Optional enrichment - Request public numeric views, likes, comments, tags, category, canonical URL, and additional video status fields.
  • Clean datasets - Empty values and empty arrays are omitted instead of being saved as repeated null fields.
  • Duplicate protection - Repeated results across continuation pages are saved only once.
  • Automation-ready - Schedule repeat runs, connect webhooks, export datasets, or retrieve results through the Apify API.
FieldTypeDescription
result_typeStringResult category such as video, channel, or playlist.
search_queryStringQuery used for the search.
result_rankNumberPosition of the result in the collected search response.
titleStringVideo, playlist, or other result title.
urlStringDirect result URL.
video_idStringYouTube video identifier for video results.
playlist_idStringYouTube playlist identifier for playlist results.
channel_idStringChannel identifier when available.
channel_titleStringPublic channel name.
channel_handleStringPublic channel handle when available.
channel_urlStringDirect channel URL.
channel_descriptionStringChannel description or search snippet when available.
channel_subscriber_countStringSubscriber count text when available.
channel_video_countStringChannel video count text when available.
channel_thumbnail_urlStringChannel thumbnail URL.
descriptionStringVideo description snippet or enriched description.
published_textStringRelative or localized publication text.
view_count_textStringLocalized view count text.
view_countNumberNumeric view count when video details are requested and available.
duration_textStringLocalized video duration.
duration_secondsNumberVideo duration in seconds when available.
playlist_video_countStringPlaylist video count text when available.
thumbnail_urlStringBest available video, channel, or playlist thumbnail.
like_countNumberPublic like count when video details are requested.
comment_countNumberPublic comment count when available.
tagsArrayPublic video tags when video details are requested.
categoryStringVideo category when video details are requested.
canonical_urlStringCanonical video URL when available.
is_liveBooleanWhether the result is marked as live.
is_upcomingBooleanWhether the result is scheduled for the future.
is_premiereBooleanWhether the result is marked as a premiere.
has_captionsBooleanWhether captions are available.
video_details_fetchedBooleanWhether video detail enrichment completed.

Fields that are not published for a result are left out of that dataset item.

How to use YouTube search Scraper API

  1. Enter a search phrase in search_query.
  2. Select the result type, sort order, and optional YouTube filters.
  3. Set results_wanted and max_pages.
  4. Enable fetch_video_details if you need additional public video metadata.
  5. Run the Actor and inspect the dataset preview.
  6. Export the data or connect it to your workflow.

Input Parameters

ParameterTypeRequiredDefaultDescription
search_queryStringYesweb scrapingWords or phrase to search for on YouTube.
result_typeStringNovideovideo, shorts, channel, playlist, movie, or all.
sort_byStringNorelevanceReturn results by relevance or popularity.
upload_dateStringNoallFilter by today, week, month, year, or all.
durationStringNoallFilter videos by under_three_mins, three_to_twenty_mins, over_twenty_mins, or all.
featuresArrayNo[]Feature filters such as hd, subtitles, live, 4k, hdr, 360, or creative_commons.
results_wantedIntegerNo20Maximum number of unique results to save.
max_pagesIntegerNo5Maximum number of search result batches to request.
fetch_video_detailsBooleanNofalseAdd public detail fields to video results.

Usage Examples

Search for recent videos

Collect the first 20 video results for a topic:

{
"search_query": "web scraping",
"result_type": "video",
"sort_by": "relevance",
"results_wanted": 20
}

Use popularity and a duration filter for competitive content research:

{
"search_query": "Python automation",
"result_type": "video",
"sort_by": "popularity",
"duration": "over_twenty_mins",
"results_wanted": 50,
"max_pages": 5
}

Search for fresh videos with selected features

Limit the search to recently uploaded HD videos with captions and request enrichment:

{
"search_query": "AI tools for marketers",
"result_type": "video",
"upload_date": "month",
"features": ["hd", "subtitles"],
"fetch_video_details": true,
"results_wanted": 20,
"max_pages": 3
}

Collect channels or mixed results

Use channel to discover creators or all to collect supported result categories together:

{
"search_query": "web scraping tutorials",
"result_type": "channel",
"sort_by": "popularity",
"results_wanted": 20
}

Sample Output

{
"result_type": "video",
"search_query": "web scraping",
"result_rank": 1,
"channel_id": "UCeVMnSShP_Iviwkknt83cww",
"channel_title": "CodeWithHarry",
"channel_url": "https://www.youtube.com/@CodeWithHarry",
"channel_handle": "@CodeWithHarry",
"video_id": "1227R6KY8Ts",
"title": "Ultimate Web Scraping tutorial",
"url": "https://www.youtube.com/watch?v=1227R6KY8Ts",
"description": "A practical introduction to web scraping and browser automation.",
"published_text": "1 year ago",
"view_count_text": "250,951 views",
"duration_text": "41:31",
"duration_seconds": 2491,
"thumbnail_url": "https://i.ytimg.com/vi/1227R6KY8Ts/maxresdefault.jpg",
"is_live": false,
"is_upcoming": false,
"is_premiere": false,
"has_captions": false
}

Tips for Best Results

  • Start with result_type: "video" when you want a predictable video catalog.
  • Use upload_date with a specific time range for current trend and news research.
  • Use popularity for high-engagement discovery and relevance for closer keyword matching.
  • Combine features filters carefully because each additional filter can reduce the number of matching results.
  • Start with results_wanted: 20 and max_pages: 3 while testing a new query.
  • Enable fetch_video_details only when numeric engagement or extended metadata is needed.
  • Use video_id, channel_id, and playlist_id as stable identifiers when comparing scheduled runs.
  • YouTube may omit fields for individual results. The Actor leaves those fields out rather than inserting empty values.

Integrations and Export Formats

  • Google Sheets - Review titles, channels, publication timing, and engagement metrics.
  • Airtable - Build searchable video, creator, or playlist catalogs.
  • Webhooks - Notify downstream systems when a search run finishes.
  • Make or Zapier - Send new results to alerts, reports, enrichment, or content workflows.
  • Apify API - Start runs and retrieve dataset items programmatically.
  • Export formats - Download JSON, CSV, Excel, XML, and other formats supported by Apify.

Frequently Asked Questions

What can I search for?

You can search for any public YouTube keyword, phrase, topic, creator name, or content idea that YouTube accepts.

Can I search for channels and playlists?

Yes. Set result_type to channel, playlist, or all. The dataset uses the result-specific ID and fields when they are available.

What is the difference between video and shorts?

video searches regular video results, while shorts asks YouTube to limit the search to Shorts. Shorts may still use the standard video fields because they are video records.

Does detail enrichment collect full comments?

No. Detail enrichment collects public video metadata and counts when available. It does not download full comment threads or private information.

Why are some fields missing?

YouTube does not publish every field for every result, and some information is available only for video detail requests. Unavailable values are omitted to keep each item compact.

Can I collect more than 20 results?

Yes. Increase results_wanted and raise max_pages when the query has more matching results. The actual count depends on the results available for the selected filters.

Can I run this Actor on a schedule?

Yes. Create an Apify schedule to repeat a keyword search hourly, daily, weekly, or at a custom interval.

You are responsible for complying with YouTube's terms, applicable laws, copyright rules, and privacy requirements. Collect public information responsibly and only for legitimate purposes.

  • Reddit Community Scraper - Collect public community posts and comments for audience, topic, and trend research.
  • Apify Store Scraper - Build structured marketplace datasets for tool discovery and competitive research.

Support

For issues, feature requests, or questions about the output, use the Issues tab on the Actor page or contact the developer through Apify.

This Actor is intended for legitimate collection of publicly available YouTube information. Users are responsible for complying with YouTube's terms of service, applicable laws, copyright obligations, and privacy rules.