Youtube Scraper By Keywords avatar
Youtube Scraper By Keywords

Pricing

$10.00/month + usage

Go to Apify Store
Youtube Scraper By Keywords

Youtube Scraper By Keywords

Developed by

shareze

shareze

Maintained by Community

Search for videos or shorts on YouTube by keywords.

0.0 (0)

Pricing

$10.00/month + usage

1

1

1

Last modified

5 days ago

This Apify Actor is designed to scrape YouTube videos or shorts based on specific keywords. It retrieves detailed information about the videos or shorts, including metadata such as title, description, view count, and more.

How to Use

1. Input Configuration

The Actor requires an input JSON object to define the scraping parameters. The structure of the input is as follows:

{
"keywords": "beauty candle",
"type": "videos",
"size": 10
}
  • keywords: (Required) The search keywords to find videos or shorts. For example, "beauty candle".
  • type: (Required) The type of content to scrape. Options are:
    • videos: Regular YouTube videos.
    • shorts: YouTube Shorts.
  • size: (Required) The number of videos or shorts to retrieve. Default is 10.

2. Output Data

The Actor returns an array of objects containing information about the YouTube videos or shorts. The structure of each object is as follows:

{
"id": "abc123",
"url": "https://www.youtube.com/watch?v=abc123",
"thumbnail": [
{
"url": "https://example.com/thumbnail.jpg",
"width": 1280,
"height": 720
}
],
"title": "Example Video Title",
"description": "This is an example description.",
"lengthSeconds": 300,
"channelUrl": "https://www.youtube.com/channel/xyz789",
"channelId": "xyz789",
"channelName": "Example Channel",
"viewCount": 10000,
"category": "Education",
"publishDate": "2023-01-01",
"likeCount": 500,
"commentCount": 100
}
  • id: The unique ID of the video or short.
  • url: The URL of the video or short.
  • thumbnail: An array of thumbnail images with their dimensions.
  • title: The title of the video or short.
  • description: The description of the video or short.
  • lengthSeconds: The duration of the video in seconds.
  • channelUrl: The URL of the channel that uploaded the video.
  • channelId: The unique ID of the channel.
  • channelName: The name of the channel.
  • viewCount: The number of views the video has received.
  • category: The category of the video.
  • publishDate: The date the video was published.
  • likeCount: The number of likes the video has received.
  • commentCount: The number of comments on the video.

3. Running the Actor

  1. Deploy the Actor on the Apify platform.
  2. Provide the input JSON in the Actor's input configuration.
  3. Run the Actor to scrape data.
  4. The results will be available in the Actor's dataset.

4. Example Use Case

To scrape 5 YouTube videos related to "beauty candle":

  1. Set the input as:
    {
    "keywords": "beauty candle",
    "type": "videos",
    "size": 5
    }
  2. Run the Actor.
  3. Retrieve the output dataset containing the video details.

Notes

  • This Actor uses YouTube's public interface and may be subject to rate limits or restrictions.
  • Ensure that the input keywords are relevant to your search.
  • The Actor is optimized for performance but may require adjustments based on YouTube's response behavior.