YouTube

This extractor uses the YouTube Data API to extract data about your YouTube channels or your YouTube activity.

For analytics and reporting, use the Google Analytics extractor or the YouTube Reporting extractor.

Configuration

Create a new configuration of the YouTube extractor. Then click Authorize Account to authorize the configuration.

To configure the extractor, choose one of the two predefined templates:

  • Channels – returning info about your own channels
  • Videos – returning info about your playlists and all their videos

Screenshot - Create configuration

You can also switch to the JSON editor.

Advanced Configuration

To give a simple example, the configuration to get info about your own channel looks like this:

{
  "jobs": [
    {
      "endpoint": "channels?mine=true&part=snippet,contentDetails,statistics",
      "dataType": "channels",
      "dataField": "items"
    }
  ]
}

If you do not know how to find out the correct endpoint, look to YouTube’s API documentation and browse for, e.g., Channels: list. Choose one of the predefined use cases, for instance, list (my channel), and switch the example to CURL. The endpoint is under # HTTP URL:, where you omit the base url https://www.googleapis.com/youtube/v3/.

Screenshot - YouTube API

You can use other Generic Extractor’s functionality too, including nesting. This example downloads your channel, iterates through its playlists and gets all their videos:

{
  "jobs": [
    {
      "endpoint": "channels?mine=true&part=id,snippet",
      "dataType": "channels",
      "dataField": "items",
      "children": [
        {
          "endpoint": "playlists?channelId={channelId}&part=id,snippet",
          "dataType": "playlists",
          "dataField": "items",
          "placeholders": {
            "channelId": "id"
          },
          "children": [
            {
              "endpoint": "playlistItems?playlistId={playlistId}&part=id,snippet",
              "dataType": "videos",
              "dataField": "items",
              "placeholders": {
                "playlistId": "id"
              }
            }
          ]
        }
      ]
    }
  ]
}