Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing Public data via the YouTube data API without Authentication.

Tags:

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?

like image 565
SoLow Productions Avatar asked May 30 '17 19:05

SoLow Productions


People also ask

Does YouTube API require OAuth?

This API supports two types of credentials. Create whichever credentials are appropriate for your project: OAuth 2.0: Whenever your application requests private user data, it must send an OAuth 2.0 token along with the request. Your application first sends a client ID and, possibly, a client secret to obtain a token.

Can I use YouTube API for free?

YouTube Data API costs are based on quota usage, and all requests will incur at least a 1-point quota cost. For each project, you're allowed 10,000 free quota units per day. You can use the quota calculator to determine your quota costs. If you need more queries, you can apply for higher quotas, but pricing may vary.

Can you extract data from YouTube?

You can export data while looking at either a channel or a specific video. If you're a Content Manager, you can also download reports for several channels. Downloaded reports are limited to 500 rows. Use the YouTube Reporting API to download more than 500 rows of data.


1 Answers

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.

like image 83
DaImTo Avatar answered Oct 12 '22 13:10

DaImTo