S
S
sergeyviktorovich2021-05-07 12:09:33
YouTube
sergeyviktorovich, 2021-05-07 12:09:33

How to get, in addition to video pictures, statistics for each video on the youtube channel?

https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20


outputs like this, without statistics

"items": [
    {
      "kind": "youtube#searchResult",
      "etag": "-UiX1z2TRjht-U4X8d5mzGdgxG0",
      "id": {
        "kind": "youtube#video",
        "videoId": "K13CV7xPCAw"
      },
      "snippet": {
        "publishedAt": "2019-12-30T15:12:31Z",
        "channelId": "UCXO6Yoj7XltkolRelr6_Bfg",
        "title": "Противогололедные реагенты — Оптима Сервис",
        "description": "http://www.optimaservis.su/reagenty/ - купить противогололедные реагенты с доставкой!",
        "thumbnails": {
          "default": {
            "url": "https://i.ytimg.com/vi/K13CV7xPCAw/default.jpg",
            "width": 120,
            "height": 90
          },
          "medium": {
            "url": "https://i.ytimg.com/vi/K13CV7xPCAw/mqdefault.jpg",
            "width": 320,
            "height": 180
          },
          "high": {
            "url": "https://i.ytimg.com/vi/K13CV7xPCAw/hqdefault.jpg",
            "width": 480,
            "height": 360
          }
        },
        "channelTitle": "Оптима Сервис",
        "liveBroadcastContent": "none",
        "publishTime": "2019-12-30T15:12:31Z"
      }
    },

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nokimaro, 2021-05-07
@nokimaro

&part=snippet,id,statistics
see https://developers.google.com/youtube/v3/docs/vide...
ps if the method /searchdoes not support getting statistics, then the option remains to get statistics for each video by a separate request to the method/v3/videos

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question