Shahar Ilany Shahar Ilany - 1 month ago 11
Android Question

Search video with youtube api on android studio

I'm trying to make a new application that will help people hear music together.
One problem i noticed to is that the people need to get the Youtube Code of each song or video they want to hear.
I kind of fixed this problem by using MySQL database with names and codes of songs, then all what the user need to do is to find the youtube video and click on share with my application, it sends the link and the name of the video to the database and then users can search there for the song they want to play. however I want to get rid from that too.

There is some way to search for a video on youtube with the API?

I found this link to open source code on Google Developers https://developers.google.com/youtube/v3/docs/search/list#examples
But it just doesn't works...

If somone could help me with the Apache lisence (I think that this is what i need to do) it will be great!

Thank you,
Shahar

Answer Source

You can use this
https://www.googleapis.com/youtube/v3/search?part=snippet&q=eminem&type=video&key=

Change the parameters to get what you actually need. But you need an API key from https://console.developers.google.com/ to make this work.

Let me know if this helps you.