Any YouTube Channel Top 10 Videos API

Any YouTube Channel Top 10 Videos API

This API would give you any youtube channel's TOP 10 most viewed videos along with views counts, likes count, comments count, and much more.
                  { "kind": "youtube#searchListResponse", "etag": "Gqk26FI5XQQC6XnzOp5Zmmg7Uxo", "nextPageToken": "CAoQAA", "regionCode": "US", "pageInfo": { "totalResults": 266, "resultsPerPage": 10 }, "items": [ { "kind": "youtube#searchResult", "etag": "bM5hLHZZ2SIkUeG_5ojom7Q5_z8", "id": { "kind": "youtube#video", "videoId": "GqhdGYVKQY0" }, "snippet": { "publishedAt": "2021-11-17T07:57:47Z", "channelId": "UCghwm6uwnvbjyQtZ8Az-Ivg", "title": "CONSISTENCY Ki Takat #motivation #makemoneyonline #consistency", "description": "I am Pavan Agrawal. Top Indian Blogger. My Blog www.deepawali.co.in Ranks among Top 10 Blogs in India. I have graduated ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/GqhdGYVKQY0/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/GqhdGYVKQY0/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/GqhdGYVKQY0/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "Learn and Earn with Pavan Agrawal", "liveBroadcastContent": "none", "publishTime": "2021-11-17T07:57:47Z" } }, { "kind": "youtube#searchResult", "etag": "fi8W0KFtwSyWFEBgNNX5qtOx2Vk", "id": { "kind": "youtube#video", "videoId": "r5WOS7a1XiE" }, "snippet": { "publishedAt": "2022-08-12T08:30:08Z", "channelId": "UCghwm6uwnvbjyQtZ8Az-Ivg", "title": "✅ 50 Lakh Se 1 Cr Sirf 1 YOUTUBE Video Se EARNING #shorts #youtube #makemoneyonline @SatishKVideos", "description": "50 Lakh Se 1 Cr Sirf 1 YOUTUBE VIDEO EARNING #shorts #motivation #youtubeearning ✓ Full Video ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/r5WOS7a1XiE/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/r5WOS7a1XiE/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/r5WOS7a1XiE/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "Learn and Earn with Pavan Agrawal", "liveBroadcastContent": "none", "publishTime": "2022-08-12T08:30:08Z" } } ] }
              

Response example. If you want to see more check the documentation.

Description:

This API is designed to retrieve a list of any Youtube channel's TOP 10 most viewed videos using the provided YouTube video ID, of any video belonging to that channel, and requires an API key for authentication. The API utilizes the YouTube Data API to fetch information about the channel associated with the given video ID.

Parameters:

  • videoId (required): The unique identifier of the YouTube video belngs to the channel you want to fetch the top 10 videos for.
  • apikey (required): An API key for authentication and authorization to use the YouTube Data API.

Response Format:

The API responds with a JSON-encoded list of top 10 videos, ordered by view count in descending order.

Error Handling:

  • If an invalid video ID is provided or a missing API key, the API returns an HTML response with the message: "Video id or apikey is invalid or missing. Please try again."
  • If an error occurs while fetching channel information or related videos, the API may respond with the message: "Error getting videos. Try again."

Example Usage:

    	https://oyehoyeai.com/apis/channel-top-10?videoId=video_id&apikey=your_api_key
    

Example Response:

Note:

  • The API requires both videoId and apikey parameters for a successful request.
  • The API key (apikey) is essential for authentication and authorization to access the YouTube Data API.
  • The error reporting and display are configured to assist users in troubleshooting potential problems related to invalid video IDs or missing API keys.