FAQ Database Discussion Community

Google/Youtube API Server Key format for pre-validation

Context: I'm updating my WordPress plugin to authenticate against the YouTube v3 API using a server key that has to be requested and entered by the user of the plugin. Problem: I would like to perform validation of some kind on that key before using it, but can't seem to...

Youtube API v3 without the need of End-User Authentication

Im trying to create a Youtube upload script that does not require the end user to login in order to upload a video to my channel. The issue is I can gain the access token but it expires after an hour of being inactive. Also I am unsure where you...

How to get data of a youtube playlist in JSON format using JavaScript API V3

Youtube stopped support to V2 I'm using till now, can anyone tell me how to get data of a youtube playlist in JSON format using JavaScript API V3 V2 URL I used is as given below http://gdata.youtube.com/feeds/api/playlists/{PLAYLIST_ID}?alt=json-in-script&callback=showMyVideos Resolved v3 URL is https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&playlistId={PLAYLIST_ID}&key={KEY}...

Retrivie VideoID

I have two classes (YtAdapter and MainActivity). In YtAdapter I have a method that gets user input (keyword) and search for Youtube videos for that keyword. It is done right and working good. @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder mHolder; if(convertView != null){ mHolder =...

Youtube API v3 - How to get the list of videos on iterative manner

We are planning to show a list of videos from our youtube channel on the website. I have checked the V3 API and it works fine. I followed the solution specified on this question. The problem is how to browse through the list of videos uploaded over the years. The...

Youtube data api v3 - how to ask for only a part of snippet in playlists?

When I fetch a list of videos from a playlist with the youtube data api v3 (with youtube.playlists.list), I can define a list of parts to retrieve with the parameter "parts" in order to minimize the data load. The api states (several places) that asked for a property with child...

How to know uploader of a video using youtube v3 API?

I want to retrieve name of the user who has uploaded a video. I could retrieve information like length of a video, title, description using this link but the uploader of the video. Any help would be appreciated. Thanks in advance....

how to get youtuber video information in youtube api v3..?

i am working on a youtube based api website and want to get the complete information of a video. i am doing this as <?php $JSON_Data = json_decode(file_get_contents("https://gdata.youtube.com/feeds/api/videos/9Xhat18gkLw?v=2&alt=json")); ?> and getting data using this method channel is:<?php echo $JSON_Data->entry->author[0]->name->{'$t'}."<br>"; ?>description is:<?php echo $JSON_Data->entry->{'media$description'}->$t."<br>"; ?>published time:<?php echo...

how to get contentDetails part from youtube video list

i am working on youtube api v3 and want to show each video with duration in list. here is my code but when i run this code it gives me error "Fatal error: Uncaught exception 'Exception' with message 'Error 400 contentDetails : unknownPart' in /home/whatcove/public_html/youtube/youtube_v3/yt/vendor/madcoda/php-youtube-api/lib/Madcoda/Youtube.php:364 Stack trace: #0 /home/whatcove/public_html/youtube/youtube_v3/yt/vendor/madcoda/php-youtube-api/lib/Madcoda/Youtube.php(145): Madcoda\Youtube->decodeList('{\n...

Youtube - How to browse all channels in a given category?

For example, there are 884 channels under beauty and fashion, however, Youtube only shows about 50 of them. How do i get the complete list? Either through API or web. https://www.youtube.com/channels/beauty_fashion Thanks,...

YouTube API v3 not retrieving videos for a channel

Ok, so I've used the following php code to try to get youtube to return a users list of videos, however, their "items" is coming up as empty. $apiKey = "MY-API-KEY"; $channel_name = "UCSzDPMGFGxDgM4YtNM4arTA"; $count = 1; $apiv3 = json_decode(file_get_contents("https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=".$channel_name."&key=".$apiKey)); foreach($apiv3->items as $item): $uploads = $item->contentDetails->relatedPlaylists->uploads; endforeach; $youtube =...

youtube api v3 - get videos from a public playlist. with out using api key

Youtube V2 where this code use to list top 50 videos from the play list var ytURL = "http://gdata.youtube.com/feeds/api/playlists/PLgtnUFn0ROBBPO2nC-bduEDDlxikKwZ6R?v=2&alt=json&callback=?&max-results=50"; var thumbBase = "http://img.youtube.com/vi/"; $.getJSON(ytURL, function (data) { $.each(data.feed.entry, function (i, item) { var itemTitle = item.title.$t; // Title of the video var itemdescription = item.media$group.media$description.$t; //Description of the Video itemdescription...

Setting Ingestion Settings Using the YouTube Live Streaming API

I am creating a live event using the YouTube Live Streaming API in JavaScript. When I create my liveStream resource I set the following settings: "cdn": { "format":"1080p", "ingestionType":"rtmp" } However, whenever I then view my event on my YouTube account, the ingestion settings do not have the bitrate selected-...

Can I get page token from youtube api using xml?

I am working on youtube api and developing a youtube api website and I want to get next page token for videos list, but I am getting data from xml feed. How can I get next page token from xml feed? Here is my code: <?php // set feed URL...

Youtube API error v3 - 'No Filter Selected'

I'm using the Youtube V3 Api and here's the code snippet to pull the top ten videos from my youtube channel. (This same query works perfectly in the google API explorer @ https://developers.google.com/apis-explorer/) url_start = "https://www.googleapis.com/youtube/v3/videos?" + \ "order=viewCount&part=snippet&forMine=true" + \ "&type=video&maxResults=10&key=MY_API_KEY" data = requests.get(url_start).json() But I get this error:...

java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonFactory

I am working on YouTube broadcast sample examples. I have created a sample Java Project & added required jars. But, when I try to run the project it throws exception. Exception : Throwable: com/fasterxml/jackson/core/JsonFactory java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonFactory at com.google.api.client.json.jackson2.JacksonFactory.<init>(JacksonFactory.java:44) at com.google.api.services.samples.youtube.cmdline.live.Auth.<clinit>(Auth.java:35) at...

How can I make an RSS feed from Youtube search using Google App Script?

Since Youtube shut down its RSS feeds for searches with it's newest version of the API, I've been trying to recreate them using Google App Script. Here's what I have so far (based off of this tutorial for converting a twitter widget to RSS): function getSearches(a){ try{ var rss,title,link; title="Youtube...

Errors in the Youtube API v3 python examples

Because Youtube Engineers monitor stack overflow with tags related to Youtube API v3 When executing: #!/usr/bin/python from apiclient.discovery import build from apiclient.errors import HttpError from oauth2client.tools import argparser I am receiving the following error: from apiclient.discovery import build ImportError: No module named apiclient.discovery Please Google Engineers correct the samples so...

YouTube API UnicodeEncodeError in Python 3.4

I was exploring the YouTube Data API and finding that improperly encoded results were holding me back. I got good results until I retrieve a set that includes unmapped characters in the titles. My code is NOW (cleaned up a little for you fine folks): import urllib.request import urllib.parse import...

jQuery 2.1 | Defering function until external scripts are manually loaded

Here's my dilemma: A browser hard refresh empties the browser cache, and when that happens while internet connection is lost, I cannot use my app when the internet connection resumes. I therefore want to manually (seamlessly) reload Google's client.js script and related Youtube APIv3 via a button. Is there a...

Get youtube trends v3 country wise in Json?

How to get youtube trends of most popular or most viewed by country wise in Json. Previously using youtube feeds v2. It seems deprecated, https://gdata.youtube.com/feeds/api/standardfeeds/IN/most_popular?v=2 Can I get youtube api v3 or any other result like the trends dashboard, https://www.youtube.com/trendsdashboard...

I am trying to use GoogleAPI YouTube to get details about YouTube Videos

Using GoogleAPI v3 url using this url: https://www.googleapis.com/youtube/v3/videos?part=snippet&id=D-wxnID2q4A&key={MyKey} I get this json: { "kind": "youtube#videoListResponse", "etag": "\"dhbhlDw5j8dK10GxeV_UG6RSReM/uzqDS1yLcX0DglL60bHeS56kZ7c\"", "pageInfo": { "totalResults": 1, "resultsPerPage": 1 }, "items": [ { "kind": "youtube#video", "etag": "\"dhbhlDw5j8dK10GxeV_UG6RSReM/l7OMkGqgmC10NvbO5PzI_nonZzA\"", "id": "D-wxnID2q4A", "snippet": { "publishedAt": "2014-01-08T05:34:04.000Z", "channelId":...

Youtube video list without account (with the new API v3)

I saw the change of youtube api from v2 to v3 and my app broke. I only need to get the last video from a channel and before, with the v2 it was easy and straight forward, you did not need any account login, but now things changed. My old...

YouTube data api - find purchased content

On the YouTube web site, there is a way of listing all the content the user has purchased. Is there an equivalent in the YouTube data api, preferably v3?

Get video duration with YouTube Data API?

Basically, I'm trying to get the video duration of each video that shows up in the results when they search. I have a neat little demo set up for you to mess with! ALSO - When I say duration I mean the length of the video in M/S format (0:00).....

YouTube API Playlists list does not give all videos in the playlist

I am a content owner of YouTube channels. When I generate a video report from YouTube web page, I am getting a result of 304k total videos. But when I query using YouTube Data API using the method discussed here How to list all uploaded videos (URL) of a YouTube...

Get youtube title from videoid in PHP using API v3

Here is the url to to get the video info where you have to put VIDEO-ID and API-KEY: https://www.googleapis.com/youtube/v3/videos?part=snippet&id=VIDEO-ID-HERE&key=YOUR-API-KEY-HERE How to get the title from it and save it as a variable in PHP?...

Using Youtube's Data API

I cannot figure out how to use Youtube's API V3, with Chrome's identity extension API. Is there a tutorial somewhere? I would like to start by rating a video.

How to play video using Youtube Data API v3 and video id in Windows Universal App

I am receiving Youtube Video Id (i.e "par2cUNk8OE") from server, by using that id i want to play video in Windows phone universal application, i have searched a lot but not found any sample which will guide me. So can anyone tell me how to do that or any sample...

How would I delete a playlist using YouTube API V3? Or would I have to use an AJAX DELETE method?

a lot of people complain they have too many YouTube playlists and it sucks to delete them one at a time. Using the YouTube V3 API, would it be possible for me to programmatically delete their playlists for them? If not, could I do a DELETE call to YouTube using...

how to decode youtube api v3 json response

here is my youtube json response query results:Array ( [kind] => youtube#searchListResponse [etag] => "tbWC5XrSXxe1WOAx6MK9z4hHSU8/_RyGfO1dwDRqY9aMf412I8xvZgw" [nextPageToken] => CAoQAA [pageInfo] => Array ( [totalResults] => 1000000 [resultsPerPage] => 10 ) [items] => Array ( [0] => Array ( [kind] => youtube#searchResult [etag] => "tbWC5XrSXxe1WOAx6MK9z4hHSU8/vJBGevzCpIbHOcHu7AAc4WsQ92E" [id] => Array ( [kind] => youtube#video...

Unable to delete a youtube playlist using youtube api v3

I am trying to delete a playlist that I have created but keep receiving a 404 error. I have a global var playlistId to remember the playlistId that I have created. var playlistId I create the playlist like so : function createPlaylist() { var request = gapi.client.youtube.playlists.insert({ part: 'snippet,status', resource:...

youtube data api v3 : adding a complaint

I'm migrating from YouTube-data-v3-api to YouTube-data-v2-api for an iOS app. How do I add a complaint about a uploaded YouTube video? I want to add this(link below) functionality in YouTube-data-v3-api, https://developers.google.com/youtube/2.0/developers_guide_protocol_complaints. Please do suggest how do I do that ?

Listing large amount of subscriptions of a youtube channel

I am trying to fetch all the subscriptions ids of a youtube channel that has 100k+ subscribers. When fetching the first page of results, youtube returns properly the total amount of subscriptions and the next page token. After a few hundred calls (because you can only fetch 50 results per...

How to get subscription list of you-tube subscribers of a YouTube channel?

I've tried looking in the following API i got response from Total, but could only get the total count of subscribers. https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?part=subscriberSnippet&maxResults=10&mySubscribers=true&_h=10&...

youtube restapi (v3) integration in titanium for video upload

In language part i am using javascript . Code sample provided by youtube v3 is for web view (contains html + js) and in titanium i am not using alloy my current code is a titanium classic app . For using rest api i have first integrated google oauth then...

Thumbnail height & width not being returned

When performing a search request to the API, the height & width fields of the thumbnails are not included in the response, even when specified in the fields parameter. Here's an example for a JS object that provides the API parameters: { part: 'snippet', type: 'video', order: 'relevance', q: 'test',...

Youtube API - Some videos stuck on unstarted (-1) state

I've been using Youtube Javascript API to play videos in a chromeless player, and recently some of the videos I am usually playing are not loaded in the player, and the player state stays on "unstarted" (-1). This is only for some of the videos (maybe a third of them,...

Get comments thread for a YouTube video using api v3.0

I'm trying to use the .net YouTube API v.3.0 to retrieve the comments thread. I'm basically trying to reuse the sample for Java, but when I try to authorize with my client secrets I do not get any scope with my token (it is set to null when I inspect...

GTLServiceYouTube executeQuery callback not called

GTLServiceYouTube executeQuery callback not called when I execute it in background thread.Video wont get uploaded. It works fine when I execute it in main thread.I get callbacks and video is also uploaded. I can solve this by forcing executeQuery to run in main thread but that affects the UI performance....

Youtube v3 API video language

When uploading videos on youtube, there is a Video language field that can be set. Is there a way to use the v3 api to query this field for a specific video?

How to get public video based on username

I am using url http://gdata.youtube.com/feeds/api/users/ford/uploads?alt=json&max-results=50 its giving me the video lists,but today I'm trying to get the list of videos, I received only https://youtube.com/devicesupport. Please suggest,how i get public video feeds based on username from youtube? Sameek...

Youtube API V3 and PHP: How to update syndicate option through API

I am using YouTube API V3 and Google API PHP client to upload video. I am not able to find any parameter to update syndicate option which is in advanced settings. In V2 the option is available with the parameter "syndicate" in access controls. But in V3 I am not...