What is a Resource?
Learn about resources and their various types.
A resource is an individual data entity with a unique identifier. It represents an item that comprises part of the YouTube experience, such as videos, channels, playlists, or captions. The API supports a number of different resources that we can use to retrieve data. We’ll discuss only a few resources in this course.
Types of resources
The table below shows some of the resources that we can interact with using the YouTube Data API.
Resource | Description |
activity | Contains information about an action that a user or a channel has taken on the YouTube site. The actions reported in the activity feeds include sharing a video, rating a video, marking a video as a favorite, and so on. |
channel | Contains information about a YouTube channel, including the number of subscribers, view count, video count, channel name, and description. |
search | Contains information about a YouTube video or channel that matches the search parameters mentioned in the API request. It can be used to get a list of all the videos uploaded on a channel. |
video | Represents a YouTube video. It contains information about a video that matches the search parameters. The information can include the video's title, description, view count, and so forth. |
commentThread | Contains information about a comment thread of a video or channel. The thread consists of a top-level comment and replies to that top-level comment, if any exists. |
i18nRegion | Identifies a geographic area supported by YouTube, which a user can select as their preferred content region. It identifies a region code and a name. |
playlist | Represents a YouTube playlist. A playlist is a collection of videos that we can view successively. |
playlistItem | Identifies another resource, such as a video, included in a YouTube playlist. |
Note: A resource can contain references to other resources. For example, a search result can have either a
videoId
orchannelId
property that identifies a particular video or channel resource, respectively.
Supported methods
The API supports several different methods used to perform functions specific to resources. The following table shows the most common methods that the API supports.
Method | Description |
| Retrieves a list of zero or more resources |
| Creates a new resource |
| Removes a resource |
| Modifies an existing resource |
Using insert
, update
, or delete
methods on a resource always requires user authorization. The list
method supports both authorized ...