YouTube Search API
Pricing
from $0.70 / 1,000 results
YouTube Search API
Search YouTube for videos, channels and playlists. Get views, likes, comments, engagement rate, subscribers, contact email and a transcript snippet for each result. No login. Bulk queries, date filter, auto proxy fallback. Export JSON, CSV or Excel.
Pricing
from $0.70 / 1,000 results
Rating
0.0
(0)
Developer
Data Minds
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
16 hours ago
Last modified
Categories
Security
Limited permissionsShare
What is YouTube Search API?
YouTube Search API turns any YouTube keyword search into structured data for YouTube influencer research, YouTube competitor analysis and YouTube content research. Enter one or more search terms, choose videos, channels or playlists, and get titles, links, views, likes, comments, engagement rate, channel details and a transcript snippet as clean JSON, with no coding needed. Pay-per-result pricing starts at $0.70 per 1,000 results on the Gold plan. 🚀 Try it free
Use it for:
- 🎯 YouTube influencer research: find creators in a niche and compare their subscriber counts and engagement.
- 📊 YouTube competitor analysis: see which videos and channels rank for the keywords you care about.
- 📝 YouTube content research: collect titles, tags, hashtags and chapters from videos that already perform.
- 📈 YouTube trend monitoring: run the same search on a schedule and compare results over time.
- 🧠 Build a YouTube video dataset: feed search results with transcript snippets into your analytics or AI workflow.
You can run it from the Apify Console, schedule it, call it through the Apify API and connect it to other tools.
What can YouTube Search API do?
- 🔍 Search YouTube videos, channels or playlists with the
searchTypeinput, one run per type. - 📚 Run a bulk YouTube search: add several search terms and set the maximum number of results for each one.
- 📅 Filter by upload date (last hour, today, this week, this month, this year) and sort by relevance, upload date, view count or rating.
- 📈 Add engagement data such as likes, comments, engagement rate and a 0 to 100 quality score for videos.
- 👤 Add YouTube channel data such as subscriber count, country, contact email and social links when the channel lists them.
- 📦 Export YouTube search results to JSON, CSV, Excel, XML or HTML, or read them through the Apify API.
Why use YouTube Search API instead of the official YouTube API?
The Actor does not need a Google Cloud project, API key setup or quota planning from you. You enter search terms and pay per result. Each result already bundles search position, engagement fields, channel details and a transcript snippet in one row, so you do not combine several separate lookups yourself.
What data can YouTube Search API extract?
Every row has the same set of fields. Fields that do not apply to a result type are null or empty.
| Group | Fields |
|---|---|
| 🆔 Identity | type (video, channel or playlist), id, url, searchPosition |
| 📝 Text | title, description, thumbnailUrl |
| 🕒 Video timing | duration, durationSeconds, publishedAt, publishedTimeText |
| 👀 Video stats | viewCount, likes, commentsCount, engagementRate, qualityScore |
| 🎬 Video flags | isLive, isShort, wasLive, captionsAvailable |
| 🔖 Video details | videoCategory, keywords, hashtags, chapters, transcriptSnippet |
| 📺 Channel identity | channelId, channelName, channelUrl, channelUsername, channelAvatarUrl, channelBannerUrl, isVerifiedChannel |
| 👥 Channel stats | numberOfSubscribers, channelVideoCount, channelViewCount, channelCreatedAt |
| 🌍 Channel profile | channelCountry, channelNiche, channelContactEmail, channelSocialLinks |
| 📚 Playlist | videoCount |
Note:
likes,commentsCount,engagementRate,qualityScore,videoCategory,publishedAt,keywords,hashtags,chaptersand the channel profile fields are filled only when Enrich results (enrich) is on.transcriptSnippetalso needs Enrich transcript (enrichTranscript) and a video that offers captions. Channel profile fields need Enrich channel data (enrichChannel) and appear only when the channel publishes them.chapterscome from timestamps in the video description.keywordsholds up to 30 entries andhashtagsup to 10.
What data can't YouTube Search API extract?
- Full video transcripts:
transcriptSnippetholds only the first 350 characters. For complete transcripts with timestamps, use YouTube Transcript & Subtitles Scraper API. - Videos found under a hashtag: use YouTube Hashtag Search Scraper.
- Comment text, downloaded video files or private data.
How to scrape YouTube search results
YouTube Search API is designed for an easy start, even if you have never extracted data from the web before.
- Create a free Apify account with your email.
- Open YouTube Search API.
- Add one or more search terms in Search query (
query). - Choose Search type (
searchType), Max results per query (maxResults) and, if you want, a date filter or sort order. - Click Start and wait for the run to finish.
- Download your data in JSON, CSV, Excel, XML or HTML from the Output tab.
How much does it cost to scrape YouTube?
YouTube Search API uses a pay-per-event model. You pay for each result saved to the dataset, plus a small start event. Apify platform usage is billed in addition. The price per result depends on your Apify plan.
| Plan | Price per result | Price per 1,000 results |
|---|---|---|
| Free | $0.001 | $1.00 |
| Bronze | $0.0009 | $0.90 |
| Silver | $0.0008 | $0.80 |
| Gold | $0.0007 | $0.70 |
The start event costs $0.00005 per GB of memory, with a minimum of one event. The default memory is 1024 MB, so each run is charged one start event of $0.00005.
Worked example: 100 video results on the Free plan cost 100 x $0.001 = $0.10, plus one $0.00005 start event, plus platform usage.
See the pricing tab for the current prices.
Is scraping YouTube free?
You can start for free. The Apify Free plan includes $5 of monthly credit. At the Free price of $0.001 per result, that credit covers about 5,000 results before platform usage. If a run reaches your spend limit, it stops and keeps the results already saved.
Input
The only required input is Search query (query), a list of one or more search terms. Everything else has a default. You can set the input in the Actor form or send it as JSON through the API.
This example searches two terms with the form's default settings:
{"query": ["python tutorial", "javascript basics"],"proxyConfiguration": { "useApifyProxy": false }}
See the input tab for the full description of every field.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
query | array of strings | Yes | none | Search keywords, one term per entry. Avoid commas inside a term. |
maxResults | integer | No | 10 in the form | Maximum results per query, from 1 to 50000. If the field is left out of an API call, the Actor uses 50. |
searchType | string | No | video | video, channel or playlist. |
uploadDate | string | No | any | any, hour, today, week, month or year. |
sortBy | string | No | relevance | relevance, date, viewCount or rating. |
enrich | boolean | No | true | Adds extended data such as category, keywords, hashtags, chapters and engagement metrics. |
enrichChannel | boolean | No | true | Adds channel profile data. Used only when enrich is on. |
enrichTranscript | boolean | No | true | Adds a short transcript snippet to each video. Used only when enrich is on. |
proxyConfiguration | object | No | {"useApifyProxy": false} | Optional proxy settings. Leave the default to run without a proxy. |
maxResults
maxResults applies to each query separately. Two queries with maxResults set to 10 can return up to 20 results in total. A result that appears under more than one query is saved once.
- ✅ Good:
10for a quick test, then raise it once the output looks right. - ❌ Bad:
0or a negative number. The minimum is 1.
Warning: Every saved result is a billed event. A high
maxResultswith many queries can add up, so start small and set a spend limit on the run.
query
Add one search term per list entry, written the way you would type it into YouTube. The list is read as text and split on commas, so entries can pick up stray brackets or quotes and a comma inside a term splits it into two searches.
- ✅ Good:
"python tutorial" - ❌ Bad:
"python, basics"as one entry, because the comma splits it. An empty list is also bad. The run stops with an error when no search term is given.
Warning: The Actor returns the results YouTube shows for each term. A term with few matches can return fewer results than
maxResults.
enrich, enrichChannel and enrichTranscript
enrich adds the engagement and detail fields. enrichChannel and enrichTranscript refine it. Turning enrich off makes the run faster but returns less data.
- ✅ Good: keep all three on when you need likes, comments and channel details.
- ❌ Bad: turning on
enrichTranscriptwhileenrichis off. It has no effect.
Output
Results appear in the run's Output and Storage tabs. You can view them as a table or JSON, choose the fields you need and download them in JSON, CSV, Excel, XML or HTML. The Output tab links to separate Videos, Channels and Playlists tables, the full data, and a run summary.
JSON example
Results for the first search term, python tutorial, with searchType set to video:
{"type": "video","id": "abc123XYZ00","url": "https://example.com/watch?v=abc123XYZ00","title": "Python Tutorial for Beginners","description": "Learn Python step by step...","thumbnailUrl": "https://example.com/thumbnails/abc123XYZ00.jpg","duration": "12:34","durationSeconds": 754,"publishedAt": "2025-01-15","publishedTimeText": "1 year ago","viewCount": 1250000,"likes": 45000,"commentsCount": 1800,"engagementRate": 3.74,"qualityScore": 78,"isLive": false,"isShort": false,"wasLive": false,"captionsAvailable": true,"videoCategory": "Education","keywords": ["python", "tutorial"],"hashtags": ["#python"],"chapters": [{ "timestamp": "0:00", "title": "Introduction" }],"transcriptSnippet": "Welcome to this Python course...","channelId": "UCexample0000000000000000","channelName": "Example Coding Channel","channelUrl": "https://example.com/@examplecoding","channelUsername": "@examplecoding","channelAvatarUrl": "https://example.com/avatars/examplecoding.jpg","channelBannerUrl": "https://example.com/banners/examplecoding.jpg","isVerifiedChannel": true,"numberOfSubscribers": 980000,"channelVideoCount": 320,"channelViewCount": 150000000,"channelCreatedAt": "Mar 3, 2015","channelCountry": "United States","channelNiche": ["Education"],"channelContactEmail": "contact@example.com","channelSocialLinks": { "Website": "https://example.com" },"searchPosition": 0}
With searchType set to channel or playlist, rows use the same field names. Here they are shown without the empty fields:
{"type": "channel","id": "UCexample0000000000000000","url": "https://example.com/@examplecoding","title": "Example Coding Channel","thumbnailUrl": "https://example.com/avatars/examplecoding.jpg","channelName": "Example Coding Channel","isVerifiedChannel": true,"numberOfSubscribers": 980000,"channelVideoCount": 320,"searchPosition": 0}
{"type": "playlist","id": "PLexample000000000000","url": "https://example.com/playlist?list=PLexample000000000000","title": "Python Basics Playlist","thumbnailUrl": "https://example.com/thumbnails/playlist.jpg","videoCount": 24,"channelName": "Example Coding Channel","searchPosition": 0}
Run summary
At the end of every run a RUN_SUMMARY record is saved to the key-value store:
{"totalResults": 20,"searchType": "videos","query": ["python tutorial", "javascript basics"],"durationSecs": 42.5,"status": "ok","spendLimitReached": false}
Notes and limitations
searchPositioncounts the position of a result within its query, starting at 0.- The number of results can be lower than
maxResultswhen YouTube shows fewer matches for a term. viewCount,likes,commentsCountand subscriber counts are read from the abbreviated numbers YouTube displays, so large values can be rounded.isShortistruefor videos of 60 seconds or less.- The Actor reads publicly visible search results. It does not log in to a YouTube account.
Tips and advanced usage
How many results can you scrape with YouTube Search API?
The number depends on how many results YouTube shows for your search terms and on your maxResults setting. The best way to know for your use case is a quick test run with a small maxResults.
How to get faster or cheaper results
- Lower
maxResultsto cap the number of billed results per query. - Turn off
enrichwhen you only need titles, links and basic view counts. - Turn off
enrichTranscriptorenrichChannelif you do not need those fields. - Use
uploadDateandsortByto narrow results to the videos you actually want.
What can you do with the extracted YouTube data?
- 📊 YouTube data extraction: collect search results at scale instead of copying them by hand.
- 🔖 YouTube video metadata: use
videoCategory,keywordsandhashtagsto see how top videos are labelled. - 🏆 YouTube video stats: compare views, likes and comments across a niche.
- ⭐ YouTube quality score: sort videos by
qualityScore, a 0 to 100 score built from engagement, channel size and data richness. - 🔎 YouTube search position: use
searchPositionto see where a video ranks for a term. - ✅ YouTube verified channel: filter on
isVerifiedChannelto separate established creators. - 🌟 YouTube creator discovery: combine subscriber counts and country to build a shortlist.
- 🎬 YouTube video ranking: sort by view count or rating to see which videos lead a topic.
- 📋 YouTube search results table: open the Videos, Channels and Playlists tables in the Output tab.
- 🪝 YouTube search webhook: trigger a webhook when a run finishes to send the data onward.
- 🔌 YouTube data API alternative: call the Actor through the Apify API to get search data without managing your own quota.
- 📅 YouTube upload date filter: narrow results to the last hour, day, week, month or year.
- 🔢 YouTube search sorted by view count: set
sortBytoviewCountto put the most watched videos first.
Monitor a keyword over time
Schedule the Actor in the Apify Console to run daily or weekly with the same query and sortBy set to date. Compare each run's viewCount and searchPosition to track a topic.
Integrations and API
Can I use YouTube Search API as an API?
Yes. The Apify API lets you start runs, schedule them and fetch results programmatically. Use the apify-client package for Node.js or Python. The API tab has ready-to-use code for your input.
How to scrape YouTube search results with Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("data_minds/youtube-search-api").call(run_input={"query": ["python tutorial", "javascript basics"],"proxyConfiguration": {"useApifyProxy": False},})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
Can I integrate YouTube Search API with other apps?
Yes. Connect the Actor with Make, Zapier, Google Sheets, Slack and other tools through Apify integrations. Use webhooks to trigger an action when a run finishes, and schedules to repeat a search automatically.
Can I use YouTube Search API with AI agents (MCP)?
Yes. Connect the Actor to Claude and other MCP clients through the Apify MCP server. Open the MCP tab for the setup steps.
Other search and YouTube scrapers
| Actor | What it does |
|---|---|
| 🔎 Google Search Results Scraper | Scrape Google Search: organic results, AI Overview, People Also Ask, related searches, ads, videos and knowledge panel. Bulk keywords or Google URLs, no login. |
| 📈 Google Trends Scraper | Scrape Google Trends: interest over time, regions, cities, related queries and Trending Now for keywords or Trends links. |
| 📌 YouTube Hashtag Search Scraper | Collect videos and Shorts posted under any YouTube hashtag, with titles, views, channels, publish dates and descriptions. |
| 📝 YouTube Transcript & Subtitles Scraper API | Get full YouTube transcripts with timestamps, chapters and SRT/VTT/TXT subtitle files for videos, Shorts, playlists, channels and searches. |
| 🔥 YouTube Trending Shorts Scraper | Collect trending YouTube Shorts for any search, hashtag or topic, with views, likes, comments, channel, publish date and keywords. |
FAQ
Is it legal to scrape YouTube?
Scraping publicly available data is generally legal, but you must respect personal data rules such as GDPR, intellectual property and YouTube's terms. Collect personal data, like channel contact emails, only with a legitimate reason. This is not legal advice, so read Is web scraping legal? and consult a lawyer.
How does YouTube Search API work?
You enter one or more search terms and pick videos, channels or playlists, plus an optional date filter, sort order and maximum number of results. The Actor returns one row for each search result, with engagement, channel and transcript snippet fields when enrichment is on. Every row is saved to a dataset you can export.
Why scrape YouTube search results?
Search results show what YouTube surfaces for a topic. Teams use them for influencer research, competitor analysis, content ideas, trend monitoring and market research. Because each row includes views, likes, comments and channel size, you can rank videos and creators in a niche without opening every page by hand.
Why am I getting fewer results than expected?
A run returns fewer results than maxResults when YouTube shows fewer matches for a term, when a result repeats across queries and is saved only once, or when your spend limit is reached. Try broader search terms, remove the date filter, or check the run log for a spend limit message.
Is there a free YouTube search API?
You can try YouTube Search API for free. The Apify Free plan includes $5 of monthly credit, which covers about 5,000 results at $0.001 each, before platform usage. You only pay for saved results, so a small test run with a low maxResults costs very little.
How do I search YouTube channels or playlists instead of videos?
Set the searchType input to channel or playlist and keep the same search terms. The Actor then returns channel rows, with subscriber count and video count, or playlist rows, with video count and the owning channel name. Run one search type at a time, then combine the datasets if you need both.
Is YouTube Search API not working?
If a run fails or returns nothing unexpected, first check the run log and test with a single common search term and a low maxResults. If the problem continues, open a report on the Issues tab with your input and the run link, and the data_minds team will look into it.
Support and feedback
Found a bug or have a feature request? Please create an issue on the Issues tab.
Need a custom solution or more data? Contact us at hello.dataminds@gmail.com.
Built and maintained by the data_minds team on Apify. This Actor is independent and is not affiliated with or endorsed by YouTube or Google. Use it only on publicly available data and follow the applicable laws and platform terms.