YTstream API - What is it?

YTstream API is a web service which empowers its users to play or stream Youtube videos wherever they want.

It is open for Freemium use. It can used to embed your favourite Youtube videos anywhere and also if you want to deal with more deeper details of the video and want to play it yourself then you can use the video info JSON object provided by the API and do whatever you want.

How to use it?

YTstream API can be used in two ways:

  1. Using the video info JSON object which contains all the required information about the video like title, author, view count, streaming URLs, etc. JSON object has the following structure:

    {	
    	"title":"Icona Pop - I Love It (feat. Charli XCX) [OFFICIAL VIDEO]",
    	"thumb":"https:\/\/i.ytimg.com\/vi\/UxxajLWwzqY\/default.jpg",
    	"length":"03:03",
    	"keywords":"Icona Pop i love it,sweden,pop music,big beat records,big beat,charli,xcx,charli xcx,girls,hbo,i love it,i don't care,icona,pop,iconic ep,iconic,love,it",
    	"avg_rating":"4.86842696323",
    	"author":"Icona Pop",
    	"view_count":"82708127",
    	"link":{
    		"22":[
    			"http:\/\/r5---sn-aigllnzk.c.docs.google.com\/videoplayback?mt=1415691270&signature=ADC372A6EE1F8B82672C4AF8E097C01B3098B182.A0EE69A0513F942342C7FE67F8FA31C0897344F4&fexp=907259%2C930666%2C932404%2C943909%2C947209%2C947215%2C948124%2C952302%2C952605%2C952901%2C953912%2C957103%2C957105%2C957201&id=o-APjurAiBtJUGLZxfzCK4focpKRXHj8M5IErzKI_yCOP7&upn=IW1i4U08kBo&mv=m&sparams=gcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cnh%2Cratebypass%2Csource%2Cupn%2Cexpire&source=youtube&ms=au&key=yt5&nh=IgpwcjAzLmxocjE0KgkxMjcuMC4wLjE&initcwndbps=12600000&mm=31&ip=178.62.106.210&itag=22&ipbits=0&sver=3&gcr=ir&ratebypass=yes&expire=1415712965",
    			"56.49MB",
    			"hd720"],
    		"43":[
    			"http:\/\/r5---sn-aigllnzk.c.docs.google.com\/videoplayback?mt=1415691270&signature=876D645F192A692A54FE0A7B1E66B8F4B4AD99BE.F1AA912579D2F892AB4BA32BB0564D12F6B2F82A&fexp=907259%2C930666%2C932404%2C943909%2C947209%2C947215%2C948124%2C952302%2C952605%2C952901%2C953912%2C957103%2C957105%2C957201&id=o-APjurAiBtJUGLZxfzCK4focpKRXHj8M5IErzKI_yCOP7&upn=IW1i4U08kBo&mv=m&sparams=gcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cnh%2Cratebypass%2Csource%2Cupn%2Cexpire&source=youtube&ms=au&key=yt5&nh=IgpwcjAzLmxocjE0KgkxMjcuMC4wLjE&initcwndbps=12600000&mm=31&ip=178.62.106.210&itag=43&ipbits=0&sver=3&gcr=ir&ratebypass=yes&expire=1415712965",
    			"16.42MB",
    			"medium"],
    		"18":[
    			"http:\/\/r5---sn-aigllnzk.c.docs.google.com\/videoplayback?mt=1415691270&signature=CCFCEB5603A7DDAE4D4279064667BF13978D9830.F3277388FEF369E667C58C7C08D5540CF1E29B6A&fexp=907259%2C930666%2C932404%2C943909%2C947209%2C947215%2C948124%2C952302%2C952605%2C952901%2C953912%2C957103%2C957105%2C957201&id=o-APjurAiBtJUGLZxfzCK4focpKRXHj8M5IErzKI_yCOP7&upn=IW1i4U08kBo&mv=m&sparams=gcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cnh%2Cratebypass%2Csource%2Cupn%2Cexpire&source=youtube&ms=au&key=yt5&nh=IgpwcjAzLmxocjE0KgkxMjcuMC4wLjE&initcwndbps=12600000&mm=31&ip=178.62.106.210&itag=18&ipbits=0&sver=3&gcr=ir&ratebypass=yes&expire=1415712965",
    			"14.88MB",
    			"medium"],
    		"5":[
    			"http:\/\/r5---sn-aigllnzk.c.docs.google.com\/videoplayback?signature=BC277C0DB035B7BCFC7AD7B1A90EF80C3A54B103.CFDE2BC6DEFC191DDCC270122FF4D8E95F63A6A4&fexp=907259%2C930666%2C932404%2C943909%2C947209%2C947215%2C948124%2C952302%2C952605%2C952901%2C953912%2C957103%2C957105%2C957201&id=o-APjurAiBtJUGLZxfzCK4focpKRXHj8M5IErzKI_yCOP7&upn=IW1i4U08kBo&mv=m&sparams=gcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cnh%2Csource%2Cupn%2Cexpire&source=youtube&ms=au&key=yt5&nh=IgpwcjAzLmxocjE0KgkxMjcuMC4wLjE&initcwndbps=12600000&mm=31&ip=178.62.106.210&itag=5&ipbits=0&sver=3&gcr=ir&mt=1415691270&expire=1415712965&ratebypass=yes",
    			"8.41MB",
    			"small"],
    		"36":[
    			"http:\/\/r5---sn-aigllnzk.c.docs.google.com\/videoplayback?signature=3A091966A46760939EC167EB08CA6BC9B6229418.FA1F499DCAE73BA825A7BF2F7530D088E1E4F929&fexp=907259%2C930666%2C932404%2C943909%2C947209%2C947215%2C948124%2C952302%2C952605%2C952901%2C953912%2C957103%2C957105%2C957201&id=o-APjurAiBtJUGLZxfzCK4focpKRXHj8M5IErzKI_yCOP7&upn=IW1i4U08kBo&mv=m&sparams=gcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cnh%2Csource%2Cupn%2Cexpire&source=youtube&ms=au&key=yt5&nh=IgpwcjAzLmxocjE0KgkxMjcuMC4wLjE&initcwndbps=12600000&mm=31&ip=178.62.106.210&itag=36&ipbits=0&sver=3&gcr=ir&mt=1415691270&expire=1415712965&ratebypass=yes",
    			"4.99MB",
    			"small"],
    		"17":[
    			"http:\/\/r5---sn-aigllnzk.c.docs.google.com\/videoplayback?signature=4EF86B4C5B7BF85D6F0FEBC6F4BB6D5CD8C3D7E2.7F954AD2A3D8DF875DCA3B35BDE8DBD9EADCF303&fexp=907259%2C930666%2C932404%2C943909%2C947209%2C947215%2C948124%2C952302%2C952605%2C952901%2C953912%2C957103%2C957105%2C957201&id=o-APjurAiBtJUGLZxfzCK4focpKRXHj8M5IErzKI_yCOP7&upn=IW1i4U08kBo&mv=m&sparams=gcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cnh%2Csource%2Cupn%2Cexpire&source=youtube&ms=au&key=yt5&nh=IgpwcjAzLmxocjE0KgkxMjcuMC4wLjE&initcwndbps=12600000&mm=31&ip=178.62.106.210&itag=17&ipbits=0&sver=3&gcr=ir&mt=1415691270&expire=1415712965&ratebypass=yes",
    			"1.78MB",
    			"small"]
    	},
    	"related":[
    		["0FWRT9C9XMQ","Icona Pop","Icona Pop - All Night (Official Video Edit)","184"],
    		["Up2MftHQlEY","Icona Pop","Icona Pop - Get Lost (Official Lyric Video)","186"],
    		["NgVp0UmIf68","Icona Pop","Icona Pop - I Love It (Live at Amp Radio in LA)","169"],
    		["BB6duA5F8Iw","Icona Pop","Icona Pop - My Party (feat. Ty Dolla $ign)","230"],
    		["JF8BRvqGCNs","RihannaVEVO","Rihanna - Stay ft. Mikky Ekko","248"],
    		["QK8mJJJvaes","Ryan Lewis","MACKLEMORE & RYAN LEWIS - THRIFT SHOP FEAT. WANZ (OFFICIAL VIDEO)","233"],
    		["IcrbM1l_BoI","AviciiOfficialVEVO","Avicii, Aloe Blacc - Wake Me Up (Official Video)","273"],
    		["yyDUC1LUXSU","RobinThickeVEVO","Robin Thicke - Blurred Lines ft. T.I., Pharrell","272"],
    		["IxxstCcJlsc","ZEDDVEVO","Zedd - Clarity (Official Video) ft. Foxes","276"],
    		["47dtFZ8CFo8","CapitalCitiesVEVO","Capital Cities - Safe And Sound (Official Video)","227"],
    		["5NV6Rdv1a3I","DaftPunkVEVO","Get Lucky (Official Audio)","249"],
    		["n-D1EB74Ckg","SelenaGomezVEVO","Selena Gomez - Come & Get It","290"],
    		["CevxZvSJLk8","KatyPerryVEVO","Katy Perry - Roar (Official)","270"],
    		["1y6smkh6c-0","SHMVEVO","Swedish House Mafia - Don't You Worry Child ft. John Martin","335"],
    		["LrUvu1mlWco","MileyCyrusVEVO","Miley Cyrus - We Can't Stop","214"],
    		["nlcIKh6sBtc","LordeVEVO","Lorde - Royals (US Version)","201"]
    	],
    	"msg":"",
    	"status":"ok"
    }

    Usage:

    URL: http://ytapi.gitnol.com/get.php
    Required params: video_id

    Example:
    http://ytapi.gitnol.com/get.php?id=UxxajLWwzqY

  2. Using the YTstream API Embed:

    <iframe 
    	src="http://ytapi.gitnol.com/embed/r8rhSkV9zeQ" 
    	frameborder="0" 
    	style="border:none; overflow:hidden;" 
    	width="640" 
    	height="360" 
    	webkitallowfullscreen 
    	mozallowfullscreen 
    	allowfullscreen
    ></iframe>

    Usage:

    Embed URL: http://ytapi.gitnol.com/embed/video_id
    Required URL element: video_id

    Example:
    http://ytapi.gitnol.com/embed/r8rhSkV9zeQ

    Live Example: Vevo Video with Cipher Signature
    http://www.youtube.com/watch?v=UxxajLWwzqY