GusGold
GusGold

Reputation: 570

Getting a video's publish date - not upload date

Using Youtube's Data API V3, I am trying to get the date at which the video was published i.e. the date you see displayed here on the watch page:


(source: gyazo.com)

Using the API, I have only been able to get the upload date which obviously doesn't get affected by scheduled releases.

At first I tried using playlistItems on the user's upload playlist. I soon found out that the published at date was actually the date this item was added to the playlist (which in this cases is the upload date)

I then turned to using videos with the id fetched from the upload playlist. I assumed since I was no longer using data from within a parent list, the publishedAt would be the actual published at date, but no, still the upload date.

None of the parts including status, snippet, and statistics give the published date.

So... How do I get such a date?

Thank you.

Upvotes: 1

Views: 7086

Answers (1)

Benjamin Gamard
Benjamin Gamard

Reputation: 348

In videos/list, with snippet part, you now have snippet.publishedAt, which is the date on the watch page (and the one used to build the subscriptions feed).

Upvotes: 6

Related Questions