0

I'm building a website where users will be able to submit the URL for a YouTube video page. I am then extracting the video ID value and storing that in my database. So all I have is the video ID. Is it possible (and if so, how?) to display something like this on my web page, given only the video ID?

enter image description here

I want the visitors of my website to be able to see the video (thumbnail, title, duration, etc.), but when they click the thumbnail or video title link - it takes them to the YouTube site to watch it. I don't want to embed the player or play the videos in any way on my own web page. The google developer documentation doesn't seem to indicate how to go about doing something like this.

I should also mention that I don't wish to store anything other than the video ID as I want the title and number of views, etc. to be the same as what YouTube has, not what I stored in my database at some point in the past. Also - there could be anywhere from 1 to about a max of 10 videos like this that I want to embed on any given web page of mine. And very likely that there would be more than 1. Probably an average of 2 or 3.

jamauss
  • 1,001
  • 1
  • 15
  • 35

1 Answers1

0

If all you need is thumbnail you can do it via How do I get a YouTube video thumbnail from the YouTube API?

But if you want further metadata, you'll de to do a videos->list call with video ids.

You don't even need user OAuth, you can just OAuth with your dev key.

Community
  • 1
  • 1
Ibrahim Ulukaya
  • 12,767
  • 1
  • 33
  • 36
  • Thanks, I'll get a dev key and give the API explorer towards the bottom of that videos->list page a try. Do you happen to know which video resource properties I should include in the 'part' request parameter to get the metadata contained in that image I included in my question? – jamauss Oct 03 '14 at 19:30