user1906825
user1906825

Reputation: 185

How to make Youtube Data Search API open for public usage?

Currently, I can use Youtube Data API to search for videos. However, I must be logged in onto my google account. Is it possible to conduct searches without logging in into an arbitrary google account? This way any user can just search without logging in.

I am using Youtube api in javascript

Upvotes: 0

Views: 1060

Answers (2)

Ibrahim Ulukaya
Ibrahim Ulukaya

Reputation: 12877

Search is a special case, where users don't have to log in through OAuth2. But you will need to provide your API key to authorize the access uf API usage.

Here's the example. HTML and JS

Upvotes: 1

jlmcdonald
jlmcdonald

Reputation: 13667

You'll need an API key so that any searching done through your app can be properly analyzed, routed, etc. If you're using v3 of the data API (which you should now that it's in production), you can easily request a key as you would get access to any google API:

  1. Visit https://code.google.com/apis/console and register your project (don't forget to give it a project ID)
  2. From that project dashboard, select the Youtube API under the 'Services' tab.
  3. Since you just want to do searching, under the 'API Access' tab you can create a browser app key (part of the 'Simple API Access' section). That generated key should be appended to all REST calls.

If you still need to use v2 of the API for some reason, you can create your key here:

https://code.google.com/apis/youtube/dashboard/gwt/index.html

Upvotes: 0

Related Questions