About this Cloud Hub Solution:
This API is designed to retrieve a list of the top 10 most viewed videos for any YouTube channel. To use the API, you need to provide a YouTube video ID from the channel you're interested in, as well as an API key for authentication.
Parameters
- videoId (required): The unique identifier of a YouTube video from 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 the top 10 videos, ordered by view count in descending order.
Error Handling
- If an invalid video ID is provided or the API key is missing, 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
To make a successful request, the API requires both the videoId and apikey parameters.
The apikey is a crucial element for authentication and authorization, as it grants access to the YouTube Data API.
Additionally, the API's error reporting and display are designed to help users troubleshoot potential issues related to invalid video IDs or missing API keys, providing clear and concise error messages to facilitate resolution.