Reputation: 79
I want to make requests to the Youtube Data API, but I do not need to access any user information. I just want to browse through the public videos and display videos based on search terms.
Am I able to do this without authorization?
Upvotes: 6
Views: 10140
Reputation: 117146
A lot of the methods in the YouTube API access public data. As you stated public data is data not owned by a user. To access public data you do not need to be authenticated but you must still register your application with Google.
You need to go to Google Developer console create a project make sure to enable the YouTube Data API and request an API Key.
GET https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=25&q=surfing&key={YOUR_API_KEY}
You can then just add key={YOUR_API_KEY}
to any of the public methods.
You can test it here make sure to click the link Execute without OAuth and not the blue button.
Upvotes: 5