Youtube Search Scraper avatar

Youtube Search Scraper

Pricing

from $5.00 / 1,000 search results

Go to Apify Store
Youtube Search Scraper

Youtube Search Scraper

Search YouTube with one or more queries via the official YouTube Data API and export structured results with optional video-level statistics and durations.

Pricing

from $5.00 / 1,000 search results

Rating

0.0

(0)

Developer

Akash Kumar Naik

Akash Kumar Naik

Maintained by Community

Actor stats

0

Bookmarked

19

Total users

5

Monthly active users

6 days ago

Last modified

Security

Limited permissions

Share

YouTube Search Scraper is an Apify Actor that searches YouTube with one or more queries via the official YouTube Data API v3 and exports structured results — videos, channels, or playlists — with optional video-level statistics and durations.

What Is YouTube Search Scraper?

This Actor lets you search YouTube programmatically and get structured results including video details, channel information, and statistics. Perfect for content researchers, marketers, and developers building YouTube data pipelines. Results land in the default dataset where they can be exported as JSON, CSV, or Excel.

Key Features

  • Official YouTube Data API v3 for reliable, stable results
  • Videos, channels, and playlists — search any resource type
  • Optional video details — duration, view count, likes, comments via videos.list
  • Rich filters — sort order, video duration, publish date ranges, region, language, and SafeSearch
  • Pagination support for large result sets (up to 500 results per query)
  • Automatic retries with exponential backoff
  • Respects user spending limits automatically
  • Pay-per-event pricing — $0.01 per search result

Use Cases

  • Content research and trend analysis
  • Competitor channel monitoring
  • Video metadata collection for ML/AI pipelines
  • Building searchable video databases
  • YouTube analytics and reporting

Input Parameters

ParameterTypeRequiredDefaultDescription
searchQuerystringYes—YouTube search query (up to 200 characters)
maxResultsintegerNo10Maximum results to fetch (1–500)
typestringNovideoResource type: video, channel, or playlist
orderstringNorelevanceSort order: relevance, date, rating, title, videoCount, viewCount
videoDurationstringNoanyany, short (<4 min), medium (4–20 min), long (>20 min) — video type only
publishedAfterstringNo—Date or relative time (e.g. "7 days", "2 weeks"); absolute dates use YYYY-MM-DD
publishedBeforestringNo—Date or relative time (e.g. "7 days", "2 weeks"); absolute dates use YYYY-MM-DD
regionCodestringNo—ISO 3166-1 alpha-2 country code (e.g. US, IN)
relevanceLanguagestringNo—BCP-47 language tag (e.g. en, hi)
safeSearchstringNomoderatemoderate, none, or strict
includeVideoDetailsbooleanNotrueAlso fetch duration and statistics (video type only)

Example input:

{
"searchQuery": "apify tutorial",
"maxResults": 50,
"type": "video",
"order": "relevance",
"includeVideoDetails": true
}

Sample Output

Each dataset item contains:

{
"searchQuery": "apify tutorial",
"position": 1,
"resultKind": "video",
"resultId": "3rrpfW0bEdc",
"resultUrl": "https://www.youtube.com/watch?v=3rrpfW0bEdc",
"videoId": "3rrpfW0bEdc",
"channelId": "UCqD-h6ucBDUntfoapPyhp0Q",
"title": "Apify Tutorial For Beginners | How To Use Apify",
"description": "Apify review: https://speakaboutdigital.com/apify-review/",
"publishedAt": "2023-07-31T08:11:38Z",
"channelTitle": "Speak About Digital",
"thumbnailUrl": "https://i.ytimg.com/vi/3rrpfW0bEdc/hqdefault.jpg",
"duration": "PT10M41S",
"durationSeconds": 641,
"viewCount": 30007,
"likeCount": 338,
"commentCount": 13,
"embeddable": true,
"license": "youtube",
"privacyStatus": "public"
}

How to Use

  1. Open the Actor page on Apify Store and click Start Actor.
  2. Enter your search query and pick the result type (video, channel, or playlist).
  3. Apply filters — sort order, duration, publish dates, region, language, SafeSearch — as needed.
  4. Run the Actor and download results as JSON, CSV, or Excel from the dataset.

How to Use via API

cURL:

curl -X POST "https://api.apify.com/v2/acts/akash9078/youtube-search-scraper/runs" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchQuery": "apify tutorial", "maxResults": 50}'

Python:

import requests
response = requests.post(
"https://api.apify.com/v2/acts/akash9078/youtube-search-scraper/runs",
headers={"Authorization": "Bearer YOUR_APIFY_TOKEN"},
json={"searchQuery": "apify tutorial", "maxResults": 50},
)
print(response.json())

Node.js with Apify Client:

const { ApifyClient } = require('apify-client');
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('akash9078/youtube-search-scraper').call({
searchQuery: 'apify tutorial',
maxResults: 50,
type: 'video',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Pricing

EventPrice
Search Result (search-result)$0.01 per result

You are charged for each YouTube search result returned (video, channel, or playlist). The Actor respects user-configured spending limits automatically.

Limitations

  • The YouTube Data API has quota limits — keep maxResults reasonable
  • Some videos may not have like/comment counts available
  • Private videos are not accessible
  • Search queries are capped at 200 characters

FAQ

Do I need my own YouTube API key?

No. The Actor runs on the official YouTube Data API v3 with the key managed on the Apify platform — just provide a search query.

How many results can I get per query?

Between 1 and 500, controlled by maxResults (default 10).

Can I filter by publish date?

Yes — publishedAfter and publishedBefore accept absolute dates (YYYY-MM-DD) or relative times like "7 days" or "2 weeks".

Can I search for channels and playlists?

Yes. Set type to video, channel, or playlist. Video-only filters such as duration and includeVideoDetails apply when type is video.

How is billing calculated?

$0.01 per returned search result under the pay-per-event model.

If you need more YouTube data from Apify, check out my other Apify Actors:


Built and maintained by akash9078 on the Apify platform. For issues or questions, visit the Apify Community or report bugs via Apify Console.