SUPERPLAYCOUNTS Api
API documentation.
Documentation for API https://api-superplaycounts.onrender.com/:
GET /api/youtube-channel-counter/user/:id - this request returns data about the number of subscribers, views, number of videos, and information about a YouTube channel using its ID. The response contains two objects: "ytstudio" and "statistics".
"ytstudio" contains an object with keys "count" (number of subscribers) and "verified" (YouTube profile verification).
"statistics" contains an array of objects. Each object contains a key "t" with Unix time of the last data update and an array "counts", which contains various values: "subscribers" (number of subscribers), "goal" (subscription goal), "apisubscribers" (number of subscribers from the API), "views" (number of views), "apiviews" (number of views from the API), and "videos" (number of videos). In addition, the object contains an array "user" which contains information about the YouTube channel: "name" (channel name), "pfp" (channel avatar URL), and "banner" (channel banner URL).
This request allows you to get updated information about a YouTube channel using its ID.
GET /api/youtube-channel-counter/search/:id - This returns a list of channels based on a keyword search for :id.
The response contains an array called "list" consisting of arrays that contain information about each channel. Each array contains the name of the channel, the URL to its profile, and the unique channel ID.
GET /api/youtube-video-counter/user/:id - This is a request to retrieve video data for the YouTube video counter.
Available counter types are:
"views": The number of views for the video.
"apiviews": The number of views for the video obtained through the YouTube API.
"likes": The number of likes for the video.
"dislikes": The number of dislikes for the video.
"comments": The number of comments for the video.
"name": The title of the video.
"pfp": The URL address of the banner image.
"banner": The URL address of the banner image.
GET /api/requests - This request returns the number of API requests made since the server was started. The response is a JSON object with the property "totalapirequests" - the total number of requests made.
Examples of usage:
1. Getting subscriber statistics for a channel with the identifier "UC-lHJZR3Gqxm24_Vd_AJ5Yw":
https://api-superplaycounts.onrender.com/api/youtube-channel-counter/user/UC-lHJZR3Gqxm24_Vd_AJ5Yw
Returned JSON object:
{
"ytstudio": [
{
"count": 111909171,
"verified": false
}
],
"statistics": [
{
"t": 1681500575323,
"counts": [
{
"value": "subscribers",
"count": 111863295
},
{
"value": "goal",
"count": 136705
},
{
"value": "apisubscribers",
"count": 111000000
},
{
"value": "views",
"count": 28981260443
},
{
"value": "apiviews",
"count": 28980864847
},
{
"value": "videos",
"count": 4707
}
],
"user": [
{
"value": "name",
"count": "PewDiePie"
},
{
"value": "pfp",
"count": "https://yt3.ggpht.com/5oUY3tashyxfqsjO5SGhjT4dus8FkN9CsAHwXWISFrdPYii1FudD4ICtLfuCw6-THJsJbgoY=s200-c-k-c0x00ffffff-no-rj"
},
{
"value": "banner",
"count": "https://www.banner.yt/UC-lHJZR3Gqxm24_Vd_AJ5Yw"
}
]
}
]
}
2. Searching for channels that match the query "T-series":
https://api-superplaycounts.onrender.com/api/youtube-channel-counter/search/T-series
Returned JSON object:
{
"t": 1681502039006,
"list": [
[
"The T Series",
"https://yt3.ggpht.com/-Cpm1iNFqhqi-HXw4bDg5VluA_lfS9UHPzA-rIGuikWefbKM_uMGJOSJ0F9495WhF1KiNSBvZA=s240-c-k-c0xffffffff-no-rj-mo",
"UCVGf7mGAwXHg4CBqjG9E9Aw"
],
[
"T-Series",
"https://yt3.ggpht.com/v_PwNTRdcmpaEU6zh9wytm0ERtq2BOAmBQvr1QyZstphlpcPUqjbX3wqIvSRR9bWIgSjmRUJcwE=s240-c-k-c0xffffffff-no-rj-mo",
"UCq-Fj5jknLsUf-MWSy4_brA"
],
[
"T-Series Kids Hut",
"https://yt3.ggpht.com/ytc/AGIKgqO4yrHxyTaCzEhutAfCI2V0-fDcpR9w5EIng9WhSw=s240-c-k-c0xffffffff-no-rj-mo",
"UChz5aEi3dfrDVC8-YJsMUDA"
],
[
"T-Series Apna Punjab",
"https://yt3.ggpht.com/_Pe9G6H-G3iM24nf6f3F72ML-IymtVQ74y2ipl0ln8bssp3_kWEcbpFf4UhvaHqcC8ehdZNnDA=s240-c-k-c0xffffffff-no-rj-mo",
"UCcvNYxWXR_5TjVK7cSCdW-g"
],
[
"T-Series Classical",
"https://yt3.ggpht.com/E6fhYxXuPC2QmaOQKamZnFVKiMQIK-5qOA4_zQ_dOjVnLzTqwuI1hKFelnb_4qw61KYtYBZc=s240-c-k-c0xffffffff-no-rj-mo",
"UCH_dFsLe_I0ftAFP8XzJkTQ"
]
]
}
3. Getting the number of API requests made:
https://api-superplaycounts.onrender.com/api/requests
Returned JSON object:
{
"totalapirequests": 8727
}