YouTube Search API avatar

YouTube Search API

Pricing

from $0.35 / 1,000 results

Go to Apify Store
YouTube Search API

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.35 / 1,000 results

Rating

0.0

(0)

Developer

Data Minds

Data Minds

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

11 hours ago

Last modified

Categories

Features

Limited permissions

Share

๐Ÿ“– What is YouTube Search API?

โšก Quick start ยท ๐ŸŽฌ Videos, Shorts, channels and playlists ยท ๐Ÿ“ฆ Export to JSON, CSV or Excel ยท ๐Ÿค– Works with AI agents

YouTube Search API turns any YouTube keyword search into a clean table of videos, Shorts, channels or playlists. Type one or more searches, press Start, and every result comes back as one row with views, likes, comments, hashtags and full channel details. It is made for marketers, creators, analysts and developers who want YouTube search data without a YouTube API key.

  • ๐Ÿ”Ž Find what ranks: search YouTube videos by keyword and see the videos and channels in the order YouTube shows them.
  • ๐Ÿ“ˆ Compare performance: get views, likes, comments and an engagement rate for every video.
  • ๐Ÿ‘ค Discover creators: read subscriber counts, country, social links and the public contact email a channel shows.
  • ๐Ÿท Study titles and tags: see the keywords, hashtags and chapters creators use, plus full descriptions.
  • ๐ŸŒ See another market: search as a visitor from one of 30 countries, in one of 21 languages.
  • ๐Ÿค– Keep it running: schedule searches and send the results to your sheet, your app or your AI agent.

๐Ÿ“ฆ What data can YouTube Search API extract?

Every row is one search result. The fields are grouped below, and the main ones are described in the Output section. Fields stay empty when YouTube does not show them for that result.

DataFields
๐ŸŽฌ Resulttype, id, url, title, description, thumbnailUrl, searchQuery, searchPosition
๐Ÿ•’ Videoduration, durationSeconds, publishedAt, publishedTimeText, videoCategory, isLive, isUpcoming, isShort, wasLive, isMembersOnly, captionsAvailable
๐Ÿ“Š EngagementviewCount, likes, commentsCount, commentsTurnedOff, engagementRate, qualityScore
๐Ÿ“ Contentkeywords, hashtags, chapters, transcriptSnippet
๐Ÿ‘ค ChannelchannelId, channelName, channelUrl, channelUsername, channelAvatarUrl, channelBannerUrl, isVerifiedChannel
๐Ÿ“ˆ Channel statisticsnumberOfSubscribers, hiddenSubscriberCount, channelVideoCount, channelViewCount, channelCreatedAt, channelCountry, channelNiche
๐Ÿ“ง Channel contactchannelContactEmail, channelSocialLinks, channelDescription
๐Ÿ“ƒ PlaylistvideoCount

โ— Note: YouTube rounds large numbers, for example 3.45M subscribers or 23K comments. channelContactEmail is filled only when the channel shows an email in its public description.

โŒ What can't YouTube Search API extract?

  • โŒ The text of individual comments. You get the comment count only.
  • โŒ Full transcripts. You get a short YouTube transcript snippet (transcriptSnippet) with the first part of the captions.
  • โŒ Email addresses that a channel does not show publicly.

For complete transcripts, try YouTube Transcript & Subtitles Scraper API.


๐Ÿš€ How to scrape YouTube search results

Here is how to scrape YouTube videos, Shorts, channels and playlists, even if you have never collected web data before.

  1. ๐Ÿ”‘ Create a free Apify account using your email.
  2. ๐ŸŒ Open YouTube Search API and go to the Input tab.
  3. ๐Ÿ“ฅ Add one or more searches under Search queries, one per line.
  4. ๐ŸŽฏ Choose What to search for, set Max results per search and add any filters you like.
  5. ๐Ÿš€ Click Start and wait for the run to finish.
  6. ๐Ÿ“ค Open the Output tab to view the results as a table, or download them as JSON, CSV, Excel, XML or HTML.

๐Ÿš€ Quick start: the default input runs one search with 10 results, which is a quick way to see the data.

{
"queries": ["python tutorial"],
"maxItems": 10
}

๐Ÿ’ฐ How much does it cost to scrape YouTube search results?

YouTube Search API pricing is pay per event, with prices from $0.0007 per result ($0.70 per 1,000 results) on the Gold plan. You pay for each result saved to the dataset. Apify platform usage is billed in addition.

Apify planPrice per resultPrice per 1,000 results
๐Ÿ†“ Free$0.001$1.00
๐Ÿฅ‰ Bronze$0.0009$0.90
๐Ÿฅˆ Silver$0.0008$0.80
๐Ÿฅ‡ Gold$0.0007$0.70

Each run also has one start event of $0.00005, which covers the default 1 GB of memory.

โœ… Good to know: a result is one row, whether it is a video, a Short, a channel or a playlist.

What a run costs (result price only, start event not included):

ResultsFreeBronzeSilverGold
100100 x $0.001 = $0.10100 x $0.0009 = $0.09100 x $0.0008 = $0.08100 x $0.0007 = $0.07
1,0001,000 x $0.001 = $1.001,000 x $0.0009 = $0.901,000 x $0.0008 = $0.801,000 x $0.0007 = $0.70
10,00010,000 x $0.001 = $10.0010,000 x $0.0009 = $9.0010,000 x $0.0008 = $8.0010,000 x $0.0007 = $7.00

๐Ÿ†“ Is scraping YouTube search results free?

You can start for free. The Apify Free plan includes $5 of monthly credit. At the Free price of $0.001 per result, $5 / $0.001 = about 5,000 results before platform usage. Paid plans lower the price per result, as the table shows.


๐Ÿ”ง Input

Add your searches, then narrow the results with optional filters. Set the input in the Input tab or send it as JSON through the API. Only queries is required.

FieldTypeDefaultWhat it does
queriesarray of stringsnone (required)The searches to run, one per line. Each search is collected on its own up to the limit below.
maxItemsinteger10Maximum results for each search, from 1 to 1000. Three searches with 50 give up to 150 results. YouTube serves about 1,000 results per search at most.
searchTypestringvideosWhat to return: videos, shorts, channels or playlists.
sortBystringrelevancerelevance and viewCount are sorted by YouTube. date sorts the matched videos by publish date, newest first.
uploadDatestringanyKeep results uploaded in the last hour, today, week, month or year.
durationstringanyVideo length: short (under 4 minutes), medium (4 to 20 minutes) or long (over 20 minutes). Videos only.
featuresarray of stringsnoneKeep only videos that have all the selected features: live, hd, four_k, subtitles, creative_commons, hdr, vr180, vr360, three_d, location, purchased.
eventTypestringanyLive stream status: live, upcoming or completed. Videos only.
publishedAfterstringnoneKeep videos published on or after this date. Use YYYY-MM-DD or a value like 30 days.
publishedBeforestringnoneKeep videos published on or before this date. Use YYYY-MM-DD or a value like 6 months.
regionstringUSThe country whose YouTube results you want to see. 30 countries are available, for example GB, IN, DE, BR or JP.
languagestringenLanguage of YouTube's interface and results. 21 languages are available, for example es, fr, de, hi or ja.
safeSearchstringmoderatemoderate or strict. Strict hides content YouTube marks as mature.
enrichbooleantrueAdd description, likes, comments, keywords, hashtags, chapters and channel data to every result. Turn off for basic data only and a shorter run.
enrichChannelbooleantrueAdd the channel's country, join date, totals, description, social links and public contact email. Needs enrich.
enrichTranscriptbooleantrueAdd the first part of the captions when the video has them. Needs enrich.
proxyConfigurationobjectnoneOptional network settings for the run. The default settings work for most runs.

Minimal input:

{
"queries": ["python tutorial"]
}

Advanced input: the 50 most viewed medium-length videos with subtitles from the last year, for two searches, seen from the United States in English:

{
"queries": ["python tutorial", "learn rust"],
"maxItems": 50,
"searchType": "videos",
"sortBy": "viewCount",
"uploadDate": "year",
"duration": "medium",
"features": ["subtitles"],
"region": "US",
"language": "en",
"enrich": true,
"enrichChannel": true,
"enrichTranscript": false
}

The limit counts per search. When a search has fewer matches than your limit, you get all of them. Newest first and the date range keep only matching videos from the results YouTube returns, so combine them with a larger limit. See the input tab for the full schema.

๐Ÿ’ก Tip: start with a small maxItems to check the data, then raise it for the full run.


๐Ÿ“ค Output

Results are stored in a dataset, which you can open in the Output or Storage tab. View them as a table or JSON, pick only the fields you need, and download them as JSON, CSV, Excel, XML or HTML. The table has ready-made views for overview, engagement, channel, details and status, and a YouTube search data export is one click away.

Through the API, read the rows from this URL pattern:

https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json

Add &view=engagement (or overview, channel, details, status) to get one of the views.

The main fields of each result row:

FieldTypeDescription
typestringResult type: video, channel or playlist. Shorts are returned as video with isShort set to true.
idstringYouTube ID of the video, channel or playlist.
urlstringLink to the result.
titlestringTitle of the video or playlist, or the channel name.
descriptionstringFull description.
durationstringLength as shown by YouTube, for example 12:34.
durationSecondsintegerLength in seconds.
publishedAtstringExact publish time (ISO 8601) when full details are on.
publishedTimeTextstringPublish time as shown by YouTube, for example 3 weeks ago.
viewCountintegerViews.
likesintegerLikes.
commentsCountintegerComments. YouTube rounds large counts.
engagementRatenumberLikes and comments as a percentage of views.
qualityScoreintegerScore from 0 to 100 that combines engagement, reach and channel signals.
isShortbooleanTrue for a YouTube Short.
isLivebooleanTrue when the video is live right now.
captionsAvailablebooleanTrue when the video has captions.
videoCategorystringYouTube category of the video.
keywordsarrayKeywords set by the creator.
hashtagsarrayHashtags used in the description.
chaptersarrayChapters with titles and start times.
transcriptSnippetstringFirst part of the captions.
channelIdstringChannel ID.
channelNamestringChannel name.
channelUrlstringChannel link.
channelUsernamestringChannel handle, for example @name.
isVerifiedChannelbooleanTrue for a verified channel.
numberOfSubscribersintegerSubscribers. YouTube rounds this number.
channelCountrystringCountry of the channel.
channelContactEmailstringContact email the channel shows publicly in its description.
channelSocialLinksobjectLinks the channel lists, such as its website and social profiles.
videoCountintegerVideos in the playlist. Only playlist rows have it.
searchPositionintegerPosition in the results of its search, starting at 0.
searchQuerystringThe search that found this result.

An abridged example row for a video:

{
"type": "video",
"id": "ix9cRaBkVe0",
"url": "https://www.youtube.com/watch?v=ix9cRaBkVe0",
"title": "Python Full Course for free",
"duration": "12:00:00",
"durationSeconds": 43200,
"publishedAt": "2024-08-20T06:00:54-07:00",
"publishedTimeText": "2 years ago",
"viewCount": 13598336,
"likes": 379952,
"commentsCount": 23000,
"engagementRate": 2.9632,
"qualityScore": 83,
"isShort": false,
"captionsAvailable": true,
"videoCategory": "Education",
"keywords": ["Python tutorial", "python course", "python programming"],
"hashtags": ["#python", "#tutorial", "#beginners"],
"transcriptSnippet": "What's up everybody? In this video, I'm going to teach you everything you need t...",
"channelId": "UC4SVo0Ue36XCfOyb5Lh1viQ",
"channelName": "Bro Code",
"channelUrl": "https://www.youtube.com/@BroCodez",
"channelUsername": "@BroCodez",
"isVerifiedChannel": true,
"numberOfSubscribers": 3450000,
"channelCountry": "United States",
"channelSocialLinks": {
"TikTok": "https://www.tiktok.com/@truebrocode"
},
"searchPosition": 0,
"searchQuery": "python tutorial"
}

Fields that do not apply to a result type, such as likes on a channel or videoCount on a video or channel, are empty. A run summary with counts and the final status message is also saved in the run storage under the key RUN_SUMMARY.


๐Ÿ’ก Tips and advanced usage

โšก How to get lighter or cheaper runs

  • โšก Turn off Add full video details when you only need titles, links, views and channel names.
  • โšก Turn off Add channel details or Add transcript snippet when you do not need them.
  • โšก Use Uploaded and Video length so only the results you need are returned.
  • โšก Start with a small Max results per search and raise it once the sample looks right.

Up to about 1,000 results per search, which is the most YouTube serves. Use several related searches to cover more ground, and read searchQuery and searchPosition to see which search found each row and where it ranked.

๐Ÿ“ˆ How to track YouTube search results over time

Run the same searches on a schedule and compare the rows. Watching viewCount, likes and searchPosition over days shows which videos and channels are rising for a topic, which helps with YouTube trend analysis and brand monitoring.

๐Ÿ“ฆ Exporting your results

Open the Output tab of the finished run, choose Export, select CSV or Excel and pick the fields you need. The same menu offers JSON, XML and HTML. For regular exports, use the API or an integration instead.

๐ŸŽฏ Why did I get fewer results than my limit?

The search may have fewer matches than your limit, or your date range, length, feature or live-stream filters may remove some. Widen the filters and run a small test again. If the run stopped at your spend limit, the status message says so.

โ— Known issues

  • โ— YouTube rounds large comment and subscriber counts, for example 23K.
  • โ— Some videos have no transcript, hashtags or keywords. Those fields stay empty.
  • โ— Results can differ slightly between countries and over time, exactly like YouTube search.

๐Ÿ”Œ Integrations and API

๐Ÿ”Œ Can I use YouTube Search API as an API?

Yes. Start runs, read results and schedule jobs through the Apify API with your token from Settings > API & Integrations.

ActionMethod and URL
๐Ÿš€ Start a runPOST https://api.apify.com/v2/actors/data_minds~youtube-search-api/runs
โšก Run and get the results in one callPOST https://api.apify.com/v2/actors/data_minds~youtube-search-api/run-sync-get-dataset-items
๐Ÿ“ฅ Read results of a runGET https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json
๐Ÿ”Œ OpenAPI definitionGET https://api.apify.com/v2/actors/data_minds~youtube-search-api/builds/default/openapi.json

curl

curl -X POST "https://api.apify.com/v2/actors/data_minds~youtube-search-api/run-sync-get-dataset-items" \
-H "Authorization: Bearer <YOUR_APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"queries": ["python tutorial"], "maxItems": 20}'

Python

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("data_minds/youtube-search-api").call(
run_input={"queries": ["python tutorial"], "maxItems": 20}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["title"], item["viewCount"], item["channelName"])

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('data_minds/youtube-search-api').call({
queries: ['python tutorial'],
maxItems: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

CLI

$echo '{"queries": ["python tutorial"], "maxItems": 20}' | apify call data_minds/youtube-search-api --silent --output-dataset

The one-call endpoint suits runs that finish in about five minutes. Use the start-a-run endpoint for longer jobs. More code is on the API tab.

๐Ÿงฉ Can I connect YouTube Search API to other apps?

Yes. Connect YouTube search with Make, Zapier, n8n, Slack, Google Sheets, Google Drive, Airbyte, GitHub and more through Apify integrations. Use webhooks to send new results to your team whenever a run finishes, and schedules to run your searches every day or week.

๐Ÿค– Can I use YouTube Search API with AI agents (MCP server)?

Yes. AI agents can call it directly through the hosted Apify MCP server. The Server tab of this Actor shows the same connection settings.

{
"mcpServers": {
"apify": {
"type": "http",
"url": "https://mcp.apify.com?tools=data_minds/youtube-search-api"
}
}
}

The hosted server signs you in with OAuth the first time you connect, so no API token belongs in this configuration. If your client cannot use OAuth, send the header Authorization: Bearer <YOUR_APIFY_TOKEN>.


๐Ÿ”— Other YouTube scrapers

ScraperWhat it does
๐Ÿ”— Google Search Result ScraperSearches Google in bulk and returns every result as a row: title, link, snippet, rank, date and related searches.
๐Ÿ”— Google Trends ScraperCollects Google Trends data: interest over time, regions, cities, related queries, keyword comparison and live Trending Now searches.
๐Ÿ”— YouTube Hashtag Search ScraperCollects videos and Shorts posted under any YouTube hashtag, with titles, views, likes, comments, channels, publish dates, tags and descriptions.
๐Ÿ”— YouTube Transcript & Subtitles Scraper APIGets the transcript of any YouTube video, Short, playlist, channel or search: timestamped captions, SRT, WebVTT and TXT, chapters and channel details.
๐Ÿ”— YouTube Trending Shorts ScraperFinds trending YouTube Shorts for any keyword or hashtag: views, likes, comments, views per day, viral score, engagement rate and channel.

โ“ FAQ

Web scraping is generally legal if you extract publicly available data. However, results can include personal data such as channel names and public contact emails, which laws like GDPR protect. Only collect personal data with a legitimate reason, and take YouTube's Terms of Service into account before you run it.

๐Ÿ”ง How does YouTube Search API work?

You add one or more searches, choose the result type and optional filters, and press Start. The Actor runs each search separately and returns the results as one row per video, Short, channel or playlist. Optional steps add full video details, channel details and a short transcript snippet to every row.

๐ŸŽฏ Why use YouTube Search API instead of the official YouTube API?

It needs no YouTube API key and no Google Cloud project: you type searches and get rows. Each row can combine video statistics, hashtags, engagement, channel subscribers, country, social links and a public contact email, so you do not have to join separate lists yourself.

๐Ÿ”Œ Can I use YouTube Search API as an API?

Yes. Start a run with the Apify API, pass your searches as JSON, and read the dataset items when it finishes. A one-call endpoint returns results directly for short runs, and an OpenAPI definition is available. Ready-made curl, Python, JavaScript and CLI examples are in the Integrations and API section above.

๐Ÿค– Can I use YouTube Search API with AI agents (MCP server)?

Yes. Add the hosted Apify MCP server URL with the tools parameter set to data_minds/youtube-search-api, and your AI assistant can run the Actor and read the results. The first connection signs you in with OAuth. The Server tab of the Actor shows the same connection settings.

๐Ÿงฉ Can I connect YouTube Search API to Google Sheets, Make or Zapier?

Yes. Apify integrations connect the Actor with Google Sheets, Make, Zapier, n8n, Slack and many other tools. Schedule a run, then use a webhook or an integration to send each new batch of results to your sheet, chat or workflow automatically when the run finishes.

๐Ÿ”Ž Why did I get fewer results than my limit?

The search may have fewer matches than your limit, or your filters may remove some. Date range, video length, features and live-stream status all narrow the list. Widen them, run a small test, and compare the counts. If the run reached your spend limit, the status message says so.

๐Ÿ“Š Why do the numbers differ from what YouTube shows?

YouTube rounds large counts, such as 3.45M subscribers or 23K comments, and the Actor returns the same rounded values. Views and likes also change over time as people keep watching. Results can differ slightly between countries and languages, exactly like YouTube search itself.

โ— Why is the Actor not working or returning no results?

The search may have no matches for your filters, or YouTube may be temporarily unreachable. Try a broader search and fewer filters, then run a small test again. If it still fails, report it on the Issues tab with your input.


๐Ÿ’ฌ 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 data_minds. This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by YouTube or Google.