How to check if YouTube channel is streaming live

You can do this by using search.list and specifying the channel ID, setting the type to video, and setting eventType to live. For example, when I searched for: https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCXswCcAMb5bvEUIDEzXFGYg&type=video&eventType=live&key=[API_KEY] I got the following: { “kind”: “youtube#searchListResponse”, “etag”: “\”sGDdEsjSJ_SnACpEvVQ6MtTzkrI/gE5P_aKHWIIc6YSpRcOE57lf9oE\””, “pageInfo”: { “totalResults”: 1, “resultsPerPage”: 5 }, “items”: [ { “kind”: “youtube#searchResult”, “etag”: “\”sGDdEsjSJ_SnACpEvVQ6MtTzkrI/H-6Tm7-JewZC0-CW4ALwOiq9wjs\””, “id”: { “kind”: … Read more

YouTube API v3 – List uploaded videos

If you are using the client then Greg’s answer is correct. To do the same thing with basic requests you make the following 2 requests: GET https://www.googleapis.com/youtube/v3/channels with parameters: part=contentDetails mine=true key={YOUR_API_KEY} and header: Authorization: Bearer {Your access token} From this you will get a JSON response like so: { “kind”: “youtube#channelListResponse”, “etag”: “\”some-string\””, “pageInfo”: … Read more

How to only find videos that can be played on mobile?

You can find various search parameter listed in YouTube API v2.0 – API Query Parameters like license, restriction, paid_content that can help filter videos that are restricted for such specific reason. Also, if you can use YouTube API v3.0 there is one more option videoSyndicated that will restrict a search to only videos that can … Read more

How to get the mp4 url for Youtube videos using Youtube v3 API

i made a very simple API : https://gist.github.com/egyjs/9e60f1ae3168c38cc0f0054c15cd6a83 As Example: YouTube Video Link: https://www.youtube.com/watch?v=**YGCLs9Bt_KY** now to get the Direct link you need to call the api , like this (change example.com to your site) : https://example.com/?url=https://www.youtube.com/watch?v=YGCLs9Bt_KY returns: [ { “url”: “https:\/\/r10—sn-aigllnlr.googlevideo.com\/videoplayback?key=yt6&signature=81D86D3BC3D34D8A3B865464BE7BC54F34C1B0BC.7316033C2DD2F65E4D345CFA890257B63D7FE2A2&mt=1522999783&expire=1523021537&sparams=dur%2Cei%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&requiressl=yes&ei=gSLHWvuxDMOUVYaTqYgB&dur=244.204&pl=22&itag=22&ip=185.27.134.50&lmt=1522960451860848&id=o-AAoaDzyDCVXS404wfqZoCIdolGU-NM3-4yDxC0t868iL&ratebypass=yes&ms=au%2Conr&fvip=2&source=youtube&mv=m&ipbits=0&mm=31%2C26&mn=sn-aigllnlr%2Csn-5hne6nsy&mime=video%2Fmp4&c=WEB&initcwndbps=710000”, “quality”: “hd720”, “itag”: “22”, “type”: “video\/mp4; codecs=\”avc1.64001F, mp4a.40.2\”” }, { “url”: “https:\/\/r10—sn-aigllnlr.googlevideo.com\/videoplayback?key=yt6&mt=1522999783&gir=yes&expire=1523021537&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&itag=43&ratebypass=yes&fvip=2&ipbits=0&mime=video%2Fwebm&initcwndbps=710000&signature=71DC48B9BF4B2E3ED46FE0A4CD36FE027DACF31E.4624B7B4BCB947336CEB029E9958B136F79759EB&clen=24203231&requiressl=yes&dur=0.000&pl=22&ip=185.27.134.50&lmt=1522961642553275&ei=gSLHWvuxDMOUVYaTqYgB&ms=au%2Conr&source=youtube&mv=m&id=o-AAoaDzyDCVXS404wfqZoCIdolGU-NM3-4yDxC0t868iL&mm=31%2C26&mn=sn-aigllnlr%2Csn-5hne6nsy&c=WEB”, “quality”: “medium”, … Read more

YouTube maxresdefault thumbnails

You can use YouTube Data API to retrieve video thumbnails, caption, description, rating, statistics and more. With the YouTube Data API, you can add a variety of YouTube features to your application. For the high quality version of the thumbnail use a url similar to this: http://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg There is also a medium quality version of … Read more

How to get all comments on a YouTube video?

Believe me it works https://www.googleapis.com/youtube/v3/commentThreads?key=******************&textFormat=plainText&part=snippet&videoId=kffacxfA7G4&maxResults=50 Key will be provided by the google developer console and 50 denotes 50 comments in form of a json, video id is the id of the video. For any type of queries comment below.

How can I get the actual video URL of a YouTube live stream?

You need to get the HLS m3u8 playlist files from the video’s manifest. There are ways to do this by hand, but for simplicity I’ll be using the youtube-dl tool to get this information. I’ll be using this live stream as an example: https://www.youtube.com/watch?v=_Gtc-GtLlTk First, get the formats of the video: ➜ ~ youtube-dl –list-formats … Read more

cURL error 60: SSL certificate prblm: unable to get local issuer certificate [duplicate]

If you are on Windows using Xampp, I am stealing a better answer from here, would be helpful if Google shows you this question first. Download and extract for cacert.pem here (a clean file format/data) https://curl.haxx.se/docs/caextract.html Put it in : C:\xampp\php\extras\ssl\cacert.pem Add this line to your php.ini curl.cainfo = “C:\xampp\php\extras\ssl\cacert.pem” restart your webserver/Apache