The following examples demonstrate how to complete several different types of search requests in the v3 API.
Videos
Playlists
Channels
Results relevant to a specific language
Videos uploaded via the developer's app or website
This example shows how to use the
forDeveloper
parameter to restrict a search to only retrieve videos uploaded via the developer's application or website. This parameter can be used in conjunction with optional search parameters, like the
q
parameter.
Note:
This query does not actually return results in the APIs Explorer because the APIs Explorer doesn't support video uploads. You can run this query for your own application outside of the APIs Explorer, but you can't get results for
your
application using the APIs Explorer.
Each uploaded video is automatically tagged with the project number that is associated with the developer's application in the
Google API Console
.
When a search request subsequently sets the
forDeveloper
parameter to true, the API service uses the request's authorization credentials to identify the developer. Thus, a developer can restrict results to videos uploaded through the developer's own app or website but not to videos uploaded through other apps or sites.
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?
part=snippet
&q=fun
&forDeveloper=true