Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YouTube Data API: What are all the parts and their fields?

In YouTube's Data API, data are returned in fields, and fields are grouped in parts. In the YouTube documentation, YouTube Data API Overview, the section, How to use the part parameter, gives a list of the parts available for videos:

  • snippet, contentDetails, fileDetails, player, processingDetails, recordingDetails, statistics, status, suggestions, topicDetails

There are two things I have not found in the documentation:

  • The list of parts available for channels and playlists.
  • The list of fields available in each part for videos, channels, and playlists.

Where can I get that information?

Also, some fields are available to the public, while others are only available to the owner of the subject resource. So in the list of fields, I need to know which I can query and which are restricted.

like image 517
NewSites Avatar asked Oct 19 '25 03:10

NewSites


1 Answers

Found the answer:

  • Channels

    • Parts: docs/channels/list#parameters
    • Fields: docs/channels#properties
    • Restrictions: docs/channels/list#auth
  • Playlists

    • Parts: docs/playlists/list#parameters
    • Fields: docs/playlists#properties
    • Restrictions: If there are any, they don't seem to be documented.
  • Playlist items

    • Parts: docs/playlistItems/list#parameters
    • Fields: docs/playlistItems#properties
    • Restrictions: If there are any, they don't seem to be documented.
  • Videos

    • Parts: docs/videos/list#parameters (The list at that link gives three additional parts that are not in the list at How to use the part parameter: id, liveStreamingDetails, and localizations.)
    • Fields: docs/videos#properties
    • Restrictions: Stated in the descriptions of the fileDetails, processingDetails, and suggestions fields.

===================================

Fields that are missing from my previous answer are

  • contentDetails

    • regionRestriction
    • hasCustomThumbnail
  • status

    • failureReason
    • rejectionReason
    • publishAt (But this should never appear in a public listing because it only applies to videos with privacyStatus = 'private`.)
    • selfDeclaredMadeForKids (But only returned if authorized.)
  • statistics

    • dislikeCount (But only returned if authorized.)
  • player

    • embedHeight
    • embedWidth
  • recordingDetails

    • location
    • recordingDate
  • liveStreamingDetails

    • 6 fields
  • localizations

    • key (language)
like image 93
NewSites Avatar answered Oct 22 '25 05:10

NewSites



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!