Our YouTube Scraper is a powerful tool designed to extract valuable data from the world's largest video-sharing platform. It provides businesses, content creators, and researchers with comprehensive insights into YouTube's vast ecosystem.
Gather detailed information about YouTube channels, including subscriber counts, video uploads, and engagement metrics.
Collect data on individual videos, such as view counts, likes, comments, and upload dates.
Extract and analyze user comments to gauge audience sentiment and engagement.
Industry | Use Cases |
---|---|
Digital Marketing | Content strategy optimization, influencer identification, competitor analysis |
Media & Entertainment | Audience insights, content trend analysis, creator discovery |
E-commerce | Product review monitoring, brand sentiment analysis |
Market Research | Consumer behavior analysis, trend forecasting |
Education | Educational content analysis, student engagement research |
The YouTube Scraper API allows you to extract various types of information from YouTube, including profiles, comments, and videos. This powerful tool enables developers to integrate YouTube data into their applications for content analysis, trend monitoring, and more.
To use the YouTube Scraper API, you'll need to authenticate your requests using your API key. The API provides several endpoints for retrieving different types of information:
Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY
The request body should be a JSON object with the following structure, depending on the endpoint:
// For URL-based endpoints (profiles, comments, videos)
{
"url": "https://www.youtube.com/channel/channel_id"
}
// For keyword-based endpoints
{
"keyword": "search term"
}
// For videos-by-channel endpoint
{
"url": "https://www.youtube.com/channel/channel_id"
}
// For videos-by-filters endpoint
{
"filters": {
"upload_date": "last_hour",
"type": "video",
"duration": "short",
// Add other filters as needed
}
}
// For videos-by-hashtag endpoint
{
"hashtag": "examplehashtag"
}
Please note that usage is subject to rate limiting. Refer to your plan details for specific limits.
import requests
import json
# Your API Key
api_key = 'YOUR_API_KEY'
# API Endpoint for profiles
url = 'https://taskagi.net/api/social-media/youtube-scraper/profiles'
# Headers
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
# Request Body
data = {
'url': 'https://www.youtube.com/channel/example_channel_id'
}
# Send POST request
response = requests.post(url, headers=headers, json=data)
# Check if the request was successful
if response.status_code == 200:
# Parse the JSON response
profile_data = response.json()
# Print the profile information
print(json.dumps(profile_data, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)
# Example for videos by keyword
url = 'https://taskagi.net/api/social-media/youtube-scraper/videos-by-keyword'
# Request Body for keyword search
data = {
'keyword': 'machine learning tutorial'
}
# Send POST request
response = requests.post(url, headers=headers, json=data)
# Check if the request was successful
if response.status_code == 200:
# Parse the JSON response
video_results = response.json()
# Print the video results
print(json.dumps(video_results, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)