tutorials2 Min Read

Youtube Rest API response details

Gorav Singal

February 27, 2018

TL;DR

YouTube API responses contain parts like snippet (title, description, thumbnails), contentDetails (duration, dimension), and statistics (views, likes) that you request via the part parameter.

Youtube Rest API response details

Here, we give exact response from youtube apis.

Basics

Youtube provides details of video depend upon how much we ask. Youtube provides following types of information types:
  • Snippet
    It includes details like published date, channel Id, title, description, thumbnail images of different sizes, title of channel, tags etc.
  • ContentDetails
    It has information like duration, dimension, definition, caption etc
  • TopicDetails
    Topic information, some links from wiki of the category of video.
  • Statistics
    View count, like count, dislike count, favorite count, comment count

Information example for a Video, Information level: (snippet, contentDetails, topicDetails, statistics)

{
   "kind": "youtube#videoListResponse",
   "etag": "etag of video",
   "pageInfo": {
      "totalResults": 1,
      "resultsPerPage": 1
   },
   "items": [
      {
         "kind": "youtube#video",
         "etag": "etag of video",
         "id": "video id",
         "snippet": {
            "publishedAt": "2017-08-07T10:11:04.000Z",
            "channelId": "channel id",
            "title": "title ",
            "description": "description of video",
            "thumbnails": {
               "default": {
                  "url": "direct image url",
                  "width": 120,
                  "height": 90
               },
               "medium": {
                  "url": "direct image url",
                  "width": 320,
                  "height": 180
               },
               "high": {
                  "url": "direct image url",
                  "width": 480,
                  "height": 360
               },
               "standard": {
                  "url": "direct image url",
                  "width": 640,
                  "height": 480
               }
            },
            "channelTitle": "Channel title",
            "tags": [
               "bunch of tags, if given"
            ],
            "categoryId": "26",
            "liveBroadcastContent": "none",
            "defaultLanguage": "en-GB",
            "localized": {
               "title": "title",
               "description": "description"
            },
            "defaultAudioLanguage": "en-GB"
         },
         "contentDetails": {
            "duration": "PT3M9S",
            "dimension": "2d",
            "definition": "hd",
            "caption": "false",
            "licensedContent": true,
            "projection": "rectangular"
         },
         "statistics": {
            "viewCount": "7808",
            "likeCount": "79",
            "dislikeCount": "4",
            "favoriteCount": "0",
            "commentCount": "2"
         },
         "topicDetails": {
            "relevantTopicIds": [
               "/m/019_rr",
               "/m/03glg",
               "/m/019_rr",
               "/m/03glg"
            ],
            "topicCategories": [
               "https://en.wikipedia.org/wiki/Lifestyle_(sociology)",
               "https://en.wikipedia.org/wiki/Hobby"
            ]
         }
      }
   ]
}

Response for comment

```js [ { "kind": "youtube#commentThread", "etag": "\"_gJQceDMxJ8gP-8T2HLXUoURK8c/PpbEormnuWTQWMoRKEAbm9cLjjU\"", "id": "UgxlmZtbyZ7m6Fk46fR4AaABAg", "snippet": { "videoId": "pV_XHKYhRgw", "topLevelComment": { "kind": "youtube#comment", "etag": "\"_gJQceDMxJ8gP-8T2HLXUoURK8c/yg0P6VX_GhIUPHK_GaiwR-ujZm8\"", "id": "UgxlmZtbyZ7m6Fk46fR4AaABAg", "snippet": { "authorDisplayName": "Afrozkanpur Afrozkanpur", "authorProfileImageUrl": "https://yt3.ggpht.com/-Uw6ZLZNnZL4/AAAAAAAAAAI/AAAAAAAAAAA/ZOcnswHwIPA/s28-c-k-no-mo-rj-c0xffffff/photo.jpg", "authorChannelUrl": "http://www.youtube.com/channel/UCp0MUsTZH1ltLNC9gkW1OKg", "authorChannelId": { "value": "UCp0MUsTZH1ltLNC9gkW1OKg" }, "videoId": "pV_XHKYhRgw", "textDisplay": "sir hme leminets door ka disain cahiye", "textOriginal": "sir hme leminets door ka disain cahiye", "canRate": true, "viewerRating": "none", "likeCount": 0, "publishedAt": "2018-02-17T08:56:20.000Z", "updatedAt": "2018-02-17T08:56:20.000Z" } }, "canReply": true, "totalReplyCount": 0, "isPublic": true } }, { "kind": "youtube#commentThread", "etag": "\"_gJQceDMxJ8gP-8T2HLXUoURK8c/btHcdg53wX3hhxluWaNjmnFvsRQ\"", "id": "Ugz8GM8E0ZAuiezU2ZR4AaABAg", "snippet": { "videoId": "pV_XHKYhRgw", "topLevelComment": { "kind": "youtube#comment", "etag": "\"_gJQceDMxJ8gP-8T2HLXUoURK8c/4WDl1bqg1ZnE49vVwLOuD4sbsC4\"", "id": "Ugz8GM8E0ZAuiezU2ZR4AaABAg", "snippet": { "authorDisplayName": "imran ali", "authorProfileImageUrl": "https://yt3.ggpht.com/-xsrhPbh8lwk/AAAAAAAAAAI/AAAAAAAAAAA/vketWZ-cMQg/s28-c-k-no-mo-rj-c0xffffff/photo.jpg", "authorChannelUrl": "http://www.youtube.com/channel/UC-TLzrg6yuZ4oF2hcljXPxw", "authorChannelId": { "value": "UC-TLzrg6yuZ4oF2hcljXPxw" }, "videoId": "pV_XHKYhRgw", "textDisplay": "nyc", "textOriginal": "nyc", "canRate": true, "viewerRating": "none", "likeCount": 1, "publishedAt": "2018-01-06T13:25:25.000Z", "updatedAt": "2018-01-06T13:25:25.000Z" } }, "canReply": true, "totalReplyCount": 1, "isPublic": true }, "replies": { "comments": [ { "kind": "youtube#comment", "etag": "\"_gJQceDMxJ8gP-8T2HLXUoURK8c/0rBPE5BM07jw_ElUQvzIs9C9aPU\"", "id": "Ugz8GM8E0ZAuiezU2ZR4AaABAg.8b4WpG33XE58cGpxNxZcvG", "snippet": { "authorDisplayName": "Plan n Design", "authorProfileImageUrl": "https://yt3.ggpht.com/-jOyekwseTi0/AAAAAAAAAAI/AAAAAAAAAAA/Kx-yMDRdmcc/s28-c-k-no-mo-rj-c0xffffff/photo.jpg", "authorChannelUrl": "http://www.youtube.com/channel/UCNNxPxH_zIPxvWy5QMFkruA", "authorChannelId": { "value": "UCNNxPxH_zIPxvWy5QMFkruA" }, "videoId": "pV_XHKYhRgw", "textDisplay": "Thank you so much!!", "textOriginal": "Thank you so much!!", "parentId": "Ugz8GM8E0ZAuiezU2ZR4AaABAg", "canRate": true, "viewerRating": "none", "likeCount": 0, "publishedAt": "2018-02-05T04:43:34.000Z", "updatedAt": "2018-02-05T04:43:34.000Z" } } ] } } ] ```
Share

Related Posts

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Most developers use Claude Code like a search engine — ask a question, get an…

Curl - Your friend for Rest APIs/Calls - Basic Commands

Curl - Your friend for Rest APIs/Calls - Basic Commands

Curl is a wonderful tool for initiate REST APIs or calls. Or, you can literally…

php55w-common conflicts with php-common-5.* | Php issues while installing libraries

php55w-common conflicts with php-common-5.* | Php issues while installing libraries

I was trying to install mongo extension with pecl. It gave me error: Then, I…

Drupal Helpful codes for database queries

Drupal Helpful codes for database queries

Being a drupal user from last around 5 years, I used to know small codes for…

Docker image for Drupal 7, and Php extension MongoDB installed.

Docker image for Drupal 7, and Php extension MongoDB installed.

You have drupal 7 image from docker hub, and want to connect tomongo db via php…

Docker Push: How to push your docker image to your organization in hub.docker.com

Docker Push: How to push your docker image to your organization in hub.docker.com

Tag the image, by seeing its image id, from docker images command docker tag 04d…

Latest Posts

AI Video Generation in 2025 — Models, Costs, and How to Build a Cost-Effective Pipeline

AI Video Generation in 2025 — Models, Costs, and How to Build a Cost-Effective Pipeline

AI video generation went from “cool demo” to “usable in production” in 2024-202…

AI Models in 2025 — Cost, Capabilities, and Which One to Use

AI Models in 2025 — Cost, Capabilities, and Which One to Use

Choosing the right AI model is one of the most impactful decisions you’ll make…

AI Image Generation in 2025 — Models, Costs, and How to Optimize Spend

AI Image Generation in 2025 — Models, Costs, and How to Optimize Spend

Generating one image with AI costs between $0.002 and $0.12. That might sound…

AI Coding Assistants in 2025 — Every Tool Compared, and Which One to Actually Use

AI Coding Assistants in 2025 — Every Tool Compared, and Which One to Actually Use

Two years ago, AI coding meant one thing: GitHub Copilot autocompleting your…

AI Agents Demystified — It's Just Automation With a Better Brain

AI Agents Demystified — It's Just Automation With a Better Brain

Let’s cut through the noise. If you read Twitter or LinkedIn, you’d think “AI…

Supply Chain Security — Protecting Your Software Pipeline

Supply Chain Security — Protecting Your Software Pipeline

In 2024, a single malicious contributor nearly compromised every Linux system on…