{"id":2380,"date":"2012-10-25T13:19:22","date_gmt":"2012-10-25T13:19:22","guid":{"rendered":"http:\/\/www.mobisoftinfotech.com\/blog\/?p=2380"},"modified":"2018-12-24T16:08:53","modified_gmt":"2018-12-24T10:38:53","slug":"youtube-data-reading","status":"publish","type":"post","link":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading","title":{"rendered":"Youtube Data Reading &#8211; Android\/iphone In Json Format"},"content":{"rendered":"<p>Many a times, we are stuck in a condition where we want to read data from YouTube, i.e, we want to browse YouTube but not upload data. For this, YouTube itself provides gdata library for Java developers to fetch as well as upload videos on YouTube.<\/p>\n<div style=\"display: none;\"><a title=\"buy viagra online\" href=\"http:\/\/buycheapviagraonline.org\/\">buy viagra online<\/a><\/div>\n<p>Gdata integration with Android is available on google developers site, but we want to keep resources size limited. So let\u2019s start with YouTube.<\/p>\n<p>To get the list of categories to browse YouTube, visit www.youtube.com and go to browse. Another way is to visit gdata.youtube.com . There you will find categories and their keywords.<br>\n<a href=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-105017.png\"><noscript><img decoding=\"async\" class=\"aligncenter size-full wp-image-2392\" src=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-105017.png\" alt width=\"888\" height=\"269\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-105017.png 888w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-105017-300x90.png 300w\" sizes=\"(max-width: 888px) 100vw, 888px\"><\/noscript><img decoding=\"async\" class=\"aligncenter size-full wp-image-2392 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20888%20269%22%3E%3C%2Fsvg%3E\" alt width=\"888\" height=\"269\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20888%20269%22%3E%3C%2Fsvg%3E 888w\" sizes=\"(max-width: 888px) 100vw, 888px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-105017.png 888w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-105017-300x90.png 300w\" data-src=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-105017.png\"><\/a><\/p>\n<table>\n<colgroup>\n<col style=\"width: 500px;\">\n<col style=\"width: 500px;\"><\/colgroup>\n<tbody>\n<tr>\n<td><b>Category<\/b><\/td>\n<td><b>Keyword<\/b><\/td>\n<\/tr>\n<tr>\n<td>Autos and Vehicle<\/td>\n<td>Autos<\/td>\n<\/tr>\n<tr>\n<td>Comedy<\/td>\n<td>Comedy<\/td>\n<\/tr>\n<tr>\n<td>Education<\/td>\n<td>Education<\/td>\n<\/tr>\n<tr>\n<td>Entertainment<\/td>\n<td>Entertainment<\/td>\n<\/tr>\n<tr>\n<td>Film and animation<\/td>\n<td>Film<\/td>\n<\/tr>\n<tr>\n<td>Howto and Style<\/td>\n<td>Howto<\/td>\n<\/tr>\n<tr>\n<td>Music<\/td>\n<td>Music<\/td>\n<\/tr>\n<tr>\n<td>News and Politics<\/td>\n<td>News<\/td>\n<\/tr>\n<tr>\n<td>People and Blog<\/td>\n<td>People<\/td>\n<\/tr>\n<tr>\n<td>Pets and Animals<\/td>\n<td>Animals<\/td>\n<\/tr>\n<tr>\n<td>Science and Technology<\/td>\n<td>Tech<\/td>\n<\/tr>\n<tr>\n<td>Sports<\/td>\n<td>Sports<\/td>\n<\/tr>\n<tr>\n<td>Travel and Events<\/td>\n<td>Travel<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>There are some standard feeds also available :<\/b><\/p>\n<table>\n<colgroup>\n<col style=\"width: 500px;\">\n<col style=\"width: 500px;\"><\/colgroup>\n<tbody>\n<tr>\n<td><b>Feed type<\/b><\/td>\n<td><b>Keyword<\/b><\/td>\n<\/tr>\n<tr>\n<td>Most recent<\/td>\n<td>most_recent<\/td>\n<\/tr>\n<tr>\n<td>Most viewed<\/td>\n<td>most_viewed<\/td>\n<\/tr>\n<tr>\n<td>Top rated<\/td>\n<td>top_rated<\/td>\n<\/tr>\n<tr>\n<td>Most discussed<\/td>\n<td>most_discussed<\/td>\n<\/tr>\n<tr>\n<td>Top favorites<\/td>\n<td>top_favorites<\/td>\n<\/tr>\n<tr>\n<td>Recently featured<\/td>\n<td>recently_featured<\/td>\n<\/tr>\n<tr>\n<td>Most Responded<\/td>\n<td>most_responded<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Now, how do we use these keywords and get our data from YouTube?<br>\nWe wil call a GET method using web services from our code which gives some data in response and we utilize it as per our requirement.<br>\nGenerally, we work with JSON and JSON data is very easy to read and parse.<\/p>\n<p>So can we get JSON data from gdata YouTube by calling a url from GET method?<br>\n&gt;<br>\n<b>The answer is yes.<\/b><\/p>\n<h3>URL pattern :<\/h3>\n<p><i>https:\/\/gdata.youtube.com\/feeds\/api\/videos<\/i><\/p>\n<p>+<br>\n\/-\/Category_Keyword<br>\n+<br>\n?alt=jsonc&amp;start-index=<br>\n+<br>\n\u201cWhatever your start number from 1-998\u201d<br>\n+<br>\n&amp;max-results=<br>\n+<br>\n\u201cMax results 1-50\u201d<br>\n+<br>\n&amp;v=2<br>\nNow by merging this, we get a url like this<\/p>\n<p><i>https:\/\/gdata.youtube.com\/feeds\/api\/videos\/-\/Music?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/i><\/p>\n<p>(This is for Music Category)<\/p>\n<p>Once you run this on your browser, you will get JSON data. Use any of the JSON data parsers to view it.<br>\n<a href=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-112206.png\"><noscript><img decoding=\"async\" class=\"aligncenter size-full wp-image-2411\" src=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-112206.png\" alt width=\"338\" height=\"545\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-112206.png 338w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-112206-186x300.png 186w\" sizes=\"(max-width: 338px) 100vw, 338px\"><\/noscript><img decoding=\"async\" class=\"aligncenter size-full wp-image-2411 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20338%20545%22%3E%3C%2Fsvg%3E\" alt width=\"338\" height=\"545\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20338%20545%22%3E%3C%2Fsvg%3E 338w\" sizes=\"(max-width: 338px) 100vw, 338px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-112206.png 338w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-112206-186x300.png 186w\" data-src=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-112206.png\"><\/a><br>\nYou can see items &#8211;&gt; 50 , which is the max-results we put in the query.<br>\nOn expanding the items, you will find the following result.<br>\n<a href=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-111900.png\"><noscript><img decoding=\"async\" class=\"aligncenter size-full wp-image-2412\" src=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-111900.png\" alt width=\"325\" height=\"209\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-111900.png 325w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-111900-300x192.png 300w\" sizes=\"(max-width: 325px) 100vw, 325px\"><\/noscript><img decoding=\"async\" class=\"aligncenter size-full wp-image-2412 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20325%20209%22%3E%3C%2Fsvg%3E\" alt width=\"325\" height=\"209\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20325%20209%22%3E%3C%2Fsvg%3E 325w\" sizes=\"(max-width: 325px) 100vw, 325px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-111900.png 325w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-111900-300x192.png 300w\" data-src=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/Screenshot-from-2012-09-25-111900.png\"><\/a><br>\nYou can use Gson library on any other library to parse this JSON data and make an object from it.&lt;\/<\/p>\n<h3>For standard feeds<\/h3>\n<p><i>http:\/\/gdata.youtube.com\/feeds\/api\/standardfeeds\/<\/i><br>\n+<br>\nmost_responded<br>\n+<br>\n?alt=jsonc&amp;start-index=<br>\n+<br>\n&#8220;Any number 1-999\u201d<br>\n+<br>\n&amp;max-results=<br>\n+<br>\n&#8220;any number 1-50\u201d<br>\n+<br>\n&amp;v=2<\/p>\n<p>Merged URL looks like this<\/p>\n<p><i>http:\/\/gdata.youtube.com\/feeds\/api\/standardfeeds\/most_responded?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/i><\/p>\n<p>And on opening this URL on your browser, you get a similar JSON response which you can parse.<\/p>\n<h3>Now some AND and OR operations :<\/h3>\n<p><b>You cannot perform And and Or operations in standard feeds, but you can in category browsing.<\/b><\/p>\n<h2>For And operations.<\/h2>\n<p><i>https:\/\/gdata.youtube.com\/feeds\/api\/videos<\/i><br>\n+<br>\n\/-\/Category_Keyword_1\/Category_Keyword_2\/Category_Keyword_n<br>\n+<br>\n?alt=jsonc&amp;start-index=<br>\n+<br>\n\u201cWhatever your start number from 1-998\u201d<br>\n+<br>\n&amp;max-results=<br>\n+<br>\n\u201cMax results 1-50\u201d<br>\n+<br>\n&amp;v=2<\/p>\n<p><i>https:\/\/gdata.youtube.com\/feeds\/api\/videos\/-\/Music\/Comdey?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2 <\/i><\/p>\n<h2>For Or operation<\/h2>\n<p><i>https:\/\/gdata.youtube.com\/feeds\/api\/videos<\/i><br>\n+<br>\n\/-\/Category_Keyword_1|Category_Keyword_2|Category_Keyword_n<br>\n+<br>\n?alt=jsonc&amp;start-index=<br>\n+<br>\n\u201cWhatever your start number from 1-998\u201d<br>\n+<br>\n&amp;max-results=<br>\n+<br>\n\u201cMax results 1-50\u201dstandard<br>\n+<br>\n&amp;v=2<\/p>\n<p><i>https:\/\/gdata.youtube.com\/feeds\/api\/videos\/-\/Music|Comdey?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2 <\/i><br>\n<b>(For Music or Comedy)<\/b><\/p>\n<p><b>You can also merge standard feeds with category &amp; category \u201cAND\u201d operation. Category \u201cOR\u201d operation looks something like this :<\/b><br>\n&amp;nbsp<\/p>\n<h3>Standard feeds with category<\/h3>\n<p><i>http:\/\/gdata.youtube.com\/feeds\/api\/standardfeeds\/most_responded\/-\/Music?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/i><\/p>\n<h3>Standard feeds with Category And operation<\/h3>\n<p><i>http:\/\/gdata.youtube.com\/feeds\/api\/standardfeeds\/most_responded\/-\/Music\/Comedy?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/i><\/p>\n<h3>Standard feeds with Category Or operation<\/h3>\n<p><i>http:\/\/gdata.youtube.com\/feeds\/api\/standardfeeds\/most_responded\/-\/Music|Comedy?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/i><\/p>\n<h4>Now last but not the least &#8211; Searching<\/h4>\n<h3>For generic search, simply add some parameter<\/h3>\n<p><i>http:\/\/gdata.youtube.com\/feeds\/api\/videos?q=\u201dSEARCH_STRING\u201d?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/i><\/p>\n<h3>For searching in particular category<\/h3>\n<p><i>http:\/\/gdata.youtube.com\/feeds\/api\/videos\/-\/Comedy?q=\u201dSEARCH_STRING\u201d?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/i><\/p>\n<p><b>You can also merge AND\/OR operations, standard feeds or any possible combination with the search parameter.<\/b><br>\n<i>http:\/\/gdata.youtube.com\/feeds\/api\/standardfeeds\/most_responded\/-\/Music?q=\u201dSEARCH_STRING\u201d?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/i><\/p>\n<p>Remember ?<b>alt=json<\/b> is important for JSON and start-index=\u201dn\u201d&amp;max-results=\u201dm\u201d will be avoided and<b> &amp;v=2<\/b> is the JSON version you must include.<\/p>\n<h3>One more thing, for browse all video or search all videos, simply use :<\/h3>\n<p><i>http:\/\/gdata.youtube.com\/feeds\/api\/videos<\/i><br>\n+<br>\n?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/p>\n<p><i>http:\/\/gdata.youtube.com\/feeds\/api\/videos?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2<\/i><\/p>\n<p><b>YouTube use filters in request URL for browsing and searching YouTube video and thus many times we didn&#8217;t find similar results in by browsing programmatically. for now remember one tag<br>\n<\/b><\/p>\n<h3>&#8220;orderby&#8221;<\/h3>\n<p>add &#8220;orderby=relevance&#8221; in your request your, don&#8217;t forget to follow URL pattern, i.e;<br>\nafter absolute URL<br>\n<b>&#8220;?orderby=relevance&#8221;<\/b><br>\nafter some other request parameter<br>\n<b>&#8220;&amp;orderby=relevance&#8221;<\/b><\/p>\n<p>now your URL look like this &#8212;<\/p>\n<p><i> https:\/\/gdata.youtube.com\/feeds\/api\/videos\/-\/Music?alt=jsonc&amp;start-index=1&amp;max-results=50&amp;v=2&amp;orderby=relevance<\/i><\/p>\n<pre style=\"color: #000000; background: #ffffff;\">public class YouTubeModelForJson {\n\n\tprivate String apiVersion;\n\tprivate YouTubeData data;\n\tprivate YouTubeError error;\n\n\tpublic String getApiVersion() {\n\t\treturn apiVersion;\n\t}\n\n\tpublic void setApiVersion(String apiVersion) {\n\t\tthis.apiVersion = apiVersion;\n\t}\n\n\tpublic YouTubeData getData() {\n\t\treturn data;\n\t}\n\n\tpublic void setData(YouTubeData data) {\n\t\tthis.data = data;\n\t}\n\n\tpublic YouTubeError getError() {\n\t\treturn error;\n\t}\n\n\tpublic void setError(YouTubeError error) {\n\t\tthis.error = error;\n\t}\n}\n<\/pre>\n<pre style=\"color: #000000; background: #ffffff;\">public class YouTubeData {\n\n\tprivate String updated;\n\tprivate String totalItems;\n\tprivate String startIndex;\n\tprivate String itemsPerPage;\n\tprivate ArrayList&lt;YouTubeItems&gt; items;\n\n\tpublic String getUpdated() {\n\t\treturn updated;\n\t}\n\n\tpublic void setUpdated(String updated) {\n\t\tthis.updated = updated;\n\t}\n\n\tpublic String getTotalItems() {\n\t\treturn totalItems;\n\t}\n\n\tpublic void setTotalItems(String totalItems) {\n\t\tthis.totalItems = totalItems;\n\t}\n\n\tpublic String getStartIndex() {\n\t\treturn startIndex;\n\t}\n\n\tpublic void setStartIndex(String startIndex) {\n\t\tthis.startIndex = startIndex;\n\t}\n\n\tpublic String getItemsPerPage() {\n\t\treturn itemsPerPage;\n\t}\n\n\tpublic void setItemsPerPage(String itemsPerPage) {\n\t\tthis.itemsPerPage = itemsPerPage;\n\t}\n\n\tpublic ArrayList&lt;YouTubeItems&gt; getItems() {\n\t\treturn items;\n\t}\n\n\tpublic void setItems(ArrayList&lt;YouTubeItems&gt; items) {\n\t\tthis.items = items;\n\t}\n\n}\n\n<\/pre>\n<pre style=\"color: #000000; background: #ffffff;\">public class YouTubeItems {\n\n\tprivate String id;\n\tprivate String uploaded;\n\tprivate String updated;\n\tprivate String uploader;\n\tprivate String category;\n\tprivate String title;\n\tprivate String description;\n\tprivate YouTubeContent content;\n\tprivate YouTubeThumbnails thumbnail;\n\tprivate String duration;\n\tprivate String aspectRatio;\n\tprivate String rating;\n\tprivate String likeCount;\n\tprivate String ratingCount;\n\tprivate String viewCount;\n\tprivate String favoriteCount;\n\tprivate String commentCount;\n\n\tpublic String getId() {\n\t\treturn id;\n\t}\n\n\tpublic void setId(String id) {\n\t\tthis.id = id;\n\t}\n\n\tpublic String getUploaded() {\n\t\treturn uploaded;\n\t}\n\n\tpublic void setUploaded(String uploaded) {\n\t\tthis.uploaded = uploaded;\n\t}\n\n\tpublic String getUpdated() {\n\t\treturn updated;\n\t}\n\n\tpublic void setUpdated(String updated) {\n\t\tthis.updated = updated;\n\t}\n\n\tpublic String getUploader() {\n\t\treturn uploader;\n\t}\n\n\tpublic void setUploader(String uploader) {\n\t\tthis.uploader = uploader;\n\t}\n\n\tpublic String getCategory() {\n\t\treturn category;\n\t}\n\n\tpublic void setCategory(String category) {\n\t\tthis.category = category;\n\t}\n\n\tpublic String getTitle() {\n\t\treturn title;\n\t}\n\n\tpublic void setTitle(String title) {\n\t\tthis.title = title;\n\t}\n\n\tpublic String getDescription() {\n\t\treturn description;\n\t}\n\n\tpublic void setDescription(String description) {\n\t\tthis.description = description;\n\t}\n\n\tpublic YouTubeContent getContent() {\n\t\treturn content;\n\t}\n\n\tpublic void setContent(YouTubeContent content) {\n\t\tthis.content = content;\n\t}\n\n\tpublic YouTubeThumbnails getThumbnail() {\n\t\treturn thumbnail;\n\t}\n\n\tpublic void setThumbnail(YouTubeThumbnails thumbnail) {\n\t\tthis.thumbnail = thumbnail;\n\t}\n\n\tpublic String getDuration() {\n\t\treturn duration;\n\t}\n\n\tpublic void setDuration(String duration) {\n\t\tthis.duration = duration;\n\t}\n\n\tpublic String getAspectRatio() {\n\t\treturn aspectRatio;\n\t}\n\n\tpublic void setAspectRatio(String aspectRatio) {\n\t\tthis.aspectRatio = aspectRatio;\n\t}\n\n\tpublic String getRating() {\n\t\treturn rating;\n\t}\n\n\tpublic void setRating(String rating) {\n\t\tthis.rating = rating;\n\t}\n\n\tpublic String getLikeCount() {\n\t\treturn likeCount;\n\t}\n\n\tpublic void setLikeCount(String likeCount) {\n\t\tthis.likeCount = likeCount;\n\t}\n\n\tpublic String getRatingCount() {\n\t\treturn ratingCount;\n\t}\n\n\tpublic void setRatingCount(String ratingCount) {\n\t\tthis.ratingCount = ratingCount;\n\t}\n\n\tpublic String getViewCount() {\n\t\treturn viewCount;\n\t}\n\n\tpublic void setViewCount(String viewCount) {\n\t\tthis.viewCount = viewCount;\n\t}\n\n\tpublic String getFavoriteCount() {\n\t\treturn favoriteCount;\n\t}\n\n\tpublic void setFavoriteCount(String favoriteCount) {\n\t\tthis.favoriteCount = favoriteCount;\n\t}\n\n\tpublic String getCommentCount() {\n\t\treturn commentCount;\n\t}\n\n\tpublic void setCommentCount(String commentCount) {\n\t\tthis.commentCount = commentCount;\n\t}\n\n}\n<\/pre>\n<pre style=\"color: #000000; background: #ffffff;\">public class YouTubeContent {\n\t@SerializedName(\"5\")\n\tprivate String link1;\n\t@SerializedName(\"1\")\n\tprivate String link2;\n\t@SerializedName(\"6\")\n\tprivate String link3;\n\n\tpublic String getLink1() {\n\t\treturn link1;\n\t}\n\n\tpublic void setLink1(String link1) {\n\t\tthis.link1 = link1;\n\t}\n\n\tpublic String getLink2() {\n\t\treturn link2;\n\t}\n\n\tpublic void setLink2(String link2) {\n\t\tthis.link2 = link2;\n\t}\n\n\tpublic String getLink3() {\n\t\treturn link3;\n\t}\n\n\tpublic void setLink3(String link3) {\n\t\tthis.link3 = link3;\n\t}\n}\n<\/pre>\n<pre style=\"color: #000000; background: #ffffff;\">public class YouTubeThumbnails {\n\n\tprivate String sqDefault;\n\tprivate String hqDefault;\n\n\tpublic String getSqDefault() {\n\t\treturn sqDefault;\n\t}\n\n\tpublic void setSqDefault(String sqDefault) {\n\t\tthis.sqDefault = sqDefault;\n\t}\n\n\tpublic String getHqDefault() {\n\t\treturn hqDefault;\n\t}\n\n\tpublic void setHqDefault(String hqDefault) {\n\t\tthis.hqDefault = hqDefault;\n\t}\n}\n\n<\/pre>\n<pre style=\"color: #000000; background: #ffffff;\">public class YouTubeError {\n\tprivate String code;\n\tprivate String message;\n\tprivate ArrayList&lt;YouTubeErrors&gt; errors;\n\n\tpublic String getCode400() {\n\t\treturn code;\n\t}\n\n\tpublic void setCode400(String code400) {\n\t\tthis.code = code400;\n\t}\n\n\tpublic String getMessage() {\n\t\treturn message;\n\t}\n\n\tpublic void setMessage(String message) {\n\t\tthis.message = message;\n\t}\n\n\tpublic ArrayList&lt;YouTubeErrors&gt; getErrors() {\n\t\treturn errors;\n\t}\n\n\tpublic void setErrors(ArrayList&lt;YouTubeErrors&gt; errors) {\n\t\tthis.errors = errors;\n\t}\n}\n\n<\/pre>\n<pre style=\"color: #000000; background: #ffffff;\">public class YouTubeErrors {\n\tprivate String domain;\n\tprivate String code;\n\tprivate String internalReason;\n\n\tpublic String getDomain() {\n\t\treturn domain;\n\t}\n\n\tpublic void setDomain(String domain) {\n\t\tthis.domain = domain;\n\t}\n\n\tpublic String getCode() {\n\t\treturn code;\n\t}\n\n\tpublic void setCode(String code) {\n\t\tthis.code = code;\n\t}\n\n\tpublic String getInternalReason() {\n\t\treturn internalReason;\n\t}\n\n\tpublic void setInternalReason(String internalReason) {\n\t\tthis.internalReason = internalReason;\n\t}\n}\n<\/pre>\n<h3>What you can do using this Blog &#8212;<\/h3>\n<p>1. Read YouTube data without YouTube account.<\/p>\n<p>2. You can keep your resource size limited as no need to add gdata library in your project.<\/p>\n<p>3. Data received in JSON format which easy to parse.<\/p>\n<p>4. Http get request allows you to read YouTube data.<\/p>\n<p><a href=\"http:\/\/https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2012\/10\/YouTubeDataReading.zip\">Click here to download YouTube data reading sample<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many a times, we are stuck in a condition where we want to read data from YouTube, i.e, we want to browse YouTube but not upload data. For this, YouTube itself provides gdata library for Java developers to fetch as well as upload videos on YouTube. buy viagra online Gdata integration with Android is available [&hellip;]<\/p>\n","protected":false},"author":39,"featured_media":14065,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"yes","footnotes":""},"categories":[4,3,182],"tags":[],"class_list":["post-2380","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","category-iphone","category-web-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Youtube Data Reading - Android\/iphone In Json Format - Mobisoft Infotech<\/title>\n<meta name=\"description\" content=\"YouTube itself provides gdata library for Java developers to fetch as well as upload videos on YouTube.Youtube Data Reading \u2013 Android\/iphone In Json Format\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Youtube Data Reading - Android\/iphone In Json Format - Mobisoft Infotech\" \/>\n<meta property=\"og:description\" content=\"YouTube itself provides gdata library for Java developers to fetch as well as upload videos on YouTube.Youtube Data Reading \u2013 Android\/iphone In Json Format\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading\" \/>\n<meta property=\"og:site_name\" content=\"Mobisoft Infotech\" \/>\n<meta property=\"article:published_time\" content=\"2012-10-25T13:19:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-24T10:38:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png\" \/>\n\t<meta property=\"og:image:width\" content=\"855\" \/>\n\t<meta property=\"og:image:height\" content=\"392\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"mohd.mufiz\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"mohd.mufiz\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#article\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading\"},\"author\":{\"name\":\"mohd.mufiz\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/79b3d38f1cdff0cdde621c2b9fe894ce\"},\"headline\":\"Youtube Data Reading &#8211; Android\/iphone In Json Format\",\"datePublished\":\"2012-10-25T13:19:22+00:00\",\"dateModified\":\"2018-12-24T10:38:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading\"},\"wordCount\":1008,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png\",\"articleSection\":[\"Android\",\"iPhone - iPad\",\"Web Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading\",\"name\":\"Youtube Data Reading - Android\/iphone In Json Format - Mobisoft Infotech\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png\",\"datePublished\":\"2012-10-25T13:19:22+00:00\",\"dateModified\":\"2018-12-24T10:38:53+00:00\",\"author\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/79b3d38f1cdff0cdde621c2b9fe894ce\"},\"description\":\"YouTube itself provides gdata library for Java developers to fetch as well as upload videos on YouTube.Youtube Data Reading \u2013 Android\/iphone In Json Format\",\"breadcrumb\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#primaryimage\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png\",\"contentUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png\",\"width\":855,\"height\":392,\"caption\":\"Youtube Data Reading\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mobisoftinfotech.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Youtube Data Reading &#8211; Android\/iphone In Json Format\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/\",\"name\":\"Mobisoft Infotech\",\"description\":\"Discover Mobility\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/79b3d38f1cdff0cdde621c2b9fe894ce\",\"name\":\"mohd.mufiz\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/9a49cd7ba73ba00c5a9835ad6d3bbb26601ed3f67e5269859124c2540446f5f3?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9a49cd7ba73ba00c5a9835ad6d3bbb26601ed3f67e5269859124c2540446f5f3?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9a49cd7ba73ba00c5a9835ad6d3bbb26601ed3f67e5269859124c2540446f5f3?s=96&r=g\",\"caption\":\"mohd.mufiz\"},\"sameAs\":[\"http:\/\/www.mobisoftinfotech.com\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Youtube Data Reading - Android\/iphone In Json Format - Mobisoft Infotech","description":"YouTube itself provides gdata library for Java developers to fetch as well as upload videos on YouTube.Youtube Data Reading \u2013 Android\/iphone In Json Format","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading","og_locale":"en_US","og_type":"article","og_title":"Youtube Data Reading - Android\/iphone In Json Format - Mobisoft Infotech","og_description":"YouTube itself provides gdata library for Java developers to fetch as well as upload videos on YouTube.Youtube Data Reading \u2013 Android\/iphone In Json Format","og_url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading","og_site_name":"Mobisoft Infotech","article_published_time":"2012-10-25T13:19:22+00:00","article_modified_time":"2018-12-24T10:38:53+00:00","og_image":[{"width":855,"height":392,"url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png","type":"image\/png"}],"author":"mohd.mufiz","twitter_card":"summary_large_image","twitter_misc":{"Written by":"mohd.mufiz","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#article","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading"},"author":{"name":"mohd.mufiz","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/79b3d38f1cdff0cdde621c2b9fe894ce"},"headline":"Youtube Data Reading &#8211; Android\/iphone In Json Format","datePublished":"2012-10-25T13:19:22+00:00","dateModified":"2018-12-24T10:38:53+00:00","mainEntityOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading"},"wordCount":1008,"commentCount":0,"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png","articleSection":["Android","iPhone - iPad","Web Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading","url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading","name":"Youtube Data Reading - Android\/iphone In Json Format - Mobisoft Infotech","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#primaryimage"},"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png","datePublished":"2012-10-25T13:19:22+00:00","dateModified":"2018-12-24T10:38:53+00:00","author":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/79b3d38f1cdff0cdde621c2b9fe894ce"},"description":"YouTube itself provides gdata library for Java developers to fetch as well as upload videos on YouTube.Youtube Data Reading \u2013 Android\/iphone In Json Format","breadcrumb":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#primaryimage","url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png","contentUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2018\/12\/Youtube-Data-Reading-banner.png","width":855,"height":392,"caption":"Youtube Data Reading"},{"@type":"BreadcrumbList","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/iphone\/youtube-data-reading#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mobisoftinfotech.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Youtube Data Reading &#8211; Android\/iphone In Json Format"}]},{"@type":"WebSite","@id":"https:\/\/mobisoftinfotech.com\/resources\/#website","url":"https:\/\/mobisoftinfotech.com\/resources\/","name":"Mobisoft Infotech","description":"Discover Mobility","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/79b3d38f1cdff0cdde621c2b9fe894ce","name":"mohd.mufiz","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9a49cd7ba73ba00c5a9835ad6d3bbb26601ed3f67e5269859124c2540446f5f3?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9a49cd7ba73ba00c5a9835ad6d3bbb26601ed3f67e5269859124c2540446f5f3?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9a49cd7ba73ba00c5a9835ad6d3bbb26601ed3f67e5269859124c2540446f5f3?s=96&r=g","caption":"mohd.mufiz"},"sameAs":["http:\/\/www.mobisoftinfotech.com\/"]}]}},"_links":{"self":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/2380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/comments?post=2380"}],"version-history":[{"count":58,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/2380\/revisions"}],"predecessor-version":[{"id":14116,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/2380\/revisions\/14116"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media\/14065"}],"wp:attachment":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media?parent=2380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/categories?post=2380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/tags?post=2380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}