YouTube Analytics
warning
Analytics endpoints are not available on the Starter plan. Upgrade to Intermediate, Growth or Business plan to access these endpoints.
YouTube analytics endpoints provide insights for your connected YouTube accounts.
1. GET /api/youtube/overview
Returns account-level metrics with current vs. previous period comparison.
Sample Request
curl --location --request GET \
"https://analyze.oneupapp.io/api/youtube/overview?apiKey=YOUR_API_KEY&social_network_id=123&preset=last_30_days"
Sample Response
{
"success": true,
"data": {
"metrics": [
{
"key": "videos",
"name": "Videos",
"value_current_period": 8,
"value_last_period": 6,
"percentage_change": "+33.3%",
"description": "Total number of videos in this period"
},
{
"key": "views",
"name": "Views",
"value_current_period": 85000,
"value_last_period": 70000,
"percentage_change": "+21.4%",
"description": "Total number of views on your videos"
},
{
"key": "watch_time",
"name": "Watch Time",
"value_current_period": 175000,
"value_last_period": 145000,
"percentage_change": "+20.7%",
"description": "Total minutes watched"
},
{
"key": "likes",
"name": "Likes",
"value_current_period": 1200,
"value_last_period": 1000,
"percentage_change": "+20.0%",
"description": "The number of likes on your videos"
},
{
"key": "comments",
"name": "Comments",
"value_current_period": 180,
"value_last_period": 150,
"percentage_change": "+20.0%",
"description": "The number of comments on your videos"
},
{
"key": "shares",
"name": "Shares",
"value_current_period": 95,
"value_last_period": 80,
"percentage_change": "+18.8%",
"description": "The number of times your videos were shared"
}
],
"total_subscribers": 45000,
"video_performance": {
"most_engaging": [],
"least_engaging": [],
"most_views": [],
"least_views": [],
"most_liked": [],
"least_liked": []
}
}
}
Metrics
| Key | Name | Description |
|---|---|---|
videos | Videos | Total videos published |
views | Views | Total number of views on your videos |
watch_time | Watch Time | Total minutes watched |
likes | Likes | The number of likes on your videos |
comments | Comments | The number of comments on your videos |
shares | Shares | The number of times your videos were shared |
2. GET /api/youtube/videos
Returns analytics for individual videos.
Sample Request
curl --location --request GET \
"https://analyze.oneupapp.io/api/youtube/videos?apiKey=YOUR_API_KEY&social_network_id=123&preset=last_30_days"
Sample Response
{
"success": true,
"data": {
"stats": [
{
"key": "videos",
"name": "Videos",
"value_current_period": 8,
"value_last_period": 6,
"percentage_change": "+33.3%",
"description": "Total number of videos in this period"
},
{
"key": "views",
"name": "Views",
"value_current_period": 85000,
"value_last_period": 70000,
"percentage_change": "+21.4%",
"description": "Total number of views on your videos"
},
{
"key": "watch_time",
"name": "Watch Time",
"value_current_period": 175000,
"value_last_period": 145000,
"percentage_change": "+20.7%",
"description": "Total minutes watched"
},
{
"key": "likes",
"name": "Likes",
"value_current_period": 1200,
"value_last_period": 1000,
"percentage_change": "+20.0%",
"description": "The number of likes on your videos"
},
{
"key": "comments",
"name": "Comments",
"value_current_period": 180,
"value_last_period": 150,
"percentage_change": "+20.0%",
"description": "The number of comments on your videos"
},
{
"key": "shares",
"name": "Shares",
"value_current_period": 95,
"value_last_period": 80,
"percentage_change": "+18.8%",
"description": "The number of times your videos were shared"
}
],
"videos": [
{
"id": "vid_123456",
"page_id": "youtube_channel_123",
"format": "video",
"text": "Amazing Tutorial",
"permalink": "https://youtube.com/watch?v=123456",
"media_type": "VIDEO",
"media_url": "https://example.com/video.jpg",
"stats": {
"views": 10625,
"watch_time": 21875,
"likes": 150,
"comments": 23,
"shares": 12
},
"timestamp": "2025-05-01 10:00:00"
}
]
}
}
Video Stats
| Field | Description |
|---|---|
views | Number of views |
watch_time | Total minutes watched |
likes | Number of likes |
comments | Number of comments |
shares | Number of shares |
3. GET /api/youtube/demographics
Returns audience demographic data.
Sample Request
curl --location --request GET \
"https://analyze.oneupapp.io/api/youtube/demographics?apiKey=YOUR_API_KEY&social_network_id=123&preset=last_30_days"
Sample Response
{
"success": true,
"data": [
{
"key": "age_group_demographics",
"name": "Viewers by Age",
"data": [
{
"name": "18-24",
"value": 12500,
"percentage": 27.8,
"share": 27.8
},
{
"name": "25-34",
"value": 18000,
"percentage": 40.0,
"share": 40.0
},
{
"name": "35-44",
"value": 9500,
"percentage": 21.1,
"share": 21.1
},
{
"name": "45-54",
"value": 3500,
"percentage": 7.8,
"share": 7.8
},
{
"name": "55+",
"value": 1500,
"percentage": 3.3,
"share": 3.3
}
]
},
{
"key": "gender_demographics",
"name": "Viewers by Gender",
"data": [
{
"name": "Male",
"value": 28000,
"percentage": 62.2,
"share": 62.2
},
{
"name": "Female",
"value": 17000,
"percentage": 37.8,
"share": 37.8
}
]
}
]
}
Demographics Data
| Field | Description |
|---|---|
name | Demographic segment name |
value | Count or absolute number |
percentage | Percentage value |
share | Share percentage (same as percentage) |
✅ Result: You have successfully retrieved YouTube analytics data!