The annotated screenshot below shows a YouTube video watch page, which primarily displays information about a single video. The list following the screenshot explains how to use the YouTube API to retrieve the information. Note that you would need to synthesize content from several API responses to reproduce this page using the API.
To display this page, you would first retrieve the feed for the video entry. The XML in a video entry feed is identical to the content that appears for that video in a feed or search result set. As shown above, this page also includes information from the video's comments feed and related videos feed. In addition, the pulldown menu below the video title shows information from the video owner's uploaded videos feed.
The screenshot displays the following information:
This item shows the title of the video. In a video entry, the
<media:title>tag contains the video's title.
The Subscribe button next to the video owner's name (or channel icon) allows a user to subscribe to the video owner's activity feed.
The pulldown menu next to the button shows information from the video owner's uploaded videos feed. The pulldown shows the number of videos that the video owner has uploaded. This value is specified in the
When a user clicks on the pulldown, the pane shown below appears, displaying other videos uploaded by the video owner. Each video corresponds to an entry in the uploaded videos feed. For each video, the pane shows a thumbnail image (
<media:thumbnail>), the video duration (
<yt:duration>), the video title (
<media:title>, the video owner (
<name>), and the video's view count (
This section displays a list of comments for the video. In the video entry, the
<gd:feedLink>tag that has a
relattribute value of
http://gdata.youtube.com/schemas/2007#commentsspecifies the number of comments on the video as well as the URL for the video's comments feed. You would need to retrieve that feed to actually display the comments.
Your application could also display a link for a user to upload a video response or select a previously uploaded video as a video response. If the user then opted to upload a new video, your application would need to support either the browser-based uploading or direct uploading method for adding new videos to YouTube. After the user had uploaded the new video using one of those two methods, your application would retrieve the new video's ID and subsequently add the video as a video response.
This section displays a list of videos that YouTube considers similar to the video featured on the page. The related videos feed allows you to retrieve this list using the API.