6

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?

1
  • @DalmTo is correct. Here's just additional working samples that you can run on your localhost immediately: The working demo youtube project doing that. The accompanying youtube tutorial is here. Commented May 31, 2017 at 9:58

1 Answer 1

5

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.