{"id":43866,"date":"2019-04-22T11:15:09","date_gmt":"2019-04-22T18:15:09","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/xamarin\/?p=43866"},"modified":"2019-08-30T08:31:16","modified_gmt":"2019-08-30T15:31:16","slug":"shrinking-android-app-size","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/shrinking-android-app-size\/","title":{"rendered":"Shrinking Your Android App Size"},"content":{"rendered":"<p>Mobile devices are limited in many ways. Whether it&#8217;s how much of a charge your battery can hold, the amount of storage you have left, or the speed of your internet connection to view more cat gifs. We need to keep this into consideration for our users to give them the absolute best mobile experience.<\/p>\n<h2>Bigger is not better<\/h2>\n<p>When it comes to application size, bigger is not better. In fact, it&#8217;s one of the key factors a user takes into mind when considering installing or uninstalling your application.<\/p>\n<p>Imagine if a user ran out of space on their device and your app was one of the biggest offenders for used space. It would be quite a shame for your application to be one of the first to be uninstalled, purely for how large it is.<\/p>\n<p>By shrinking our APK size, we can also improve how:<\/p>\n<ul>\n<li>Fast our app loads.<\/li>\n<li>Much memory our app uses.<\/li>\n<li>Much power our app consumes.<\/li>\n<li>And much more.<\/li>\n<\/ul>\n<h2>Analyzing the APK<\/h2>\n<p>The first step to understanding what we can shrink within our Android applications is analyzing the APK. There are a few great disk usage tools that will allow you to do this.<\/p>\n<h3>APK Analyzer<\/h3>\n<p>Integrated inside <a href=\"https:\/\/developer.android.com\/studio\/command-line\/apkanalyzer.html\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" data-token-index=\"1\" data-reactroot=\"\">Android Studio or usable from the command line<\/a>, you can use <span class=\"lang:default decode:true crayon-inline \">apkanalyzer<\/span>\u00a0\u00a0as a way to provide immediate insight into the composition of your APK. You can even compare differences between two APKs. Using APK Analyzer will help you reduce the size of your APK by inspecting your DEX files and Android Resources.<\/p>\n<h3>Viewing the APK from the top-down<\/h3>\n<p>For our example, we will be using the <a href=\"https:\/\/github.com\/Microsoft\/SmartHotel360-Mobile\">Smart Hotel 360 Mobile Application on GitHub<\/a>. Feel free to grab a copy of this application to follow along. Let&#8217;s take a look now.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43868\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerbefore.png\" alt=\"\" width=\"1255\" height=\"444\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerbefore.png 1255w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerbefore-300x106.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerbefore-768x272.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerbefore-1024x362.png 1024w\" sizes=\"(max-width: 1255px) 100vw, 1255px\" \/><\/p>\n<p>Looking at our APK from the top-down, we can see that the raw APK size is 34.6 MB and the download size is 23.4 MB.<\/p>\n<p>There are four main areas that contribute to our large APK size:<\/p>\n<ul>\n<li><strong>res &#8211;<\/strong> This folder includes all the files under your Resources folder.<\/li>\n<li><strong>assemblies &#8211;<\/strong> This folder includes all of the assemblies required for your application.<\/li>\n<li><strong>lib &#8211;<\/strong> This folder includes native libraries for the respective ABIs that your application supports.<\/li>\n<li><strong>classes.dex &#8211;<\/strong> This file holds all of your application&#8217;s byte code that is executed by DVM or ART.<\/li>\n<\/ul>\n<p><strong>Distribution of APK Size:<\/strong><\/p>\n<ul>\n<li><strong>res &#8211;<\/strong> 11.5MB<\/li>\n<li><strong>assemblies &#8211;<\/strong> 14.8MB<\/li>\n<li><strong>lib &#8211;<\/strong> 3.9MB<\/li>\n<li><strong>classes.dex &#8211;<\/strong> 2MB<\/li>\n<li><strong>Total &#8211;<\/strong> 32.2MB, accounting for 93% of total APK size (34.6MB)<\/li>\n<\/ul>\n<h3>Inspecting the res folder<\/h3>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43878\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resbefore.png\" alt=\"\" width=\"1258\" height=\"533\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resbefore.png 1258w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resbefore-300x127.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resbefore-768x325.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resbefore-1024x434.png 1024w\" sizes=\"(max-width: 1258px) 100vw, 1258px\" \/><\/p>\n<p>Typically the most impactful area contributing to our APK size coming in at <strong>11.5MB<\/strong>, the resources in our project tend to be an afterthought of creating our application. We can optimize our resources by removing unused resources, resizing individual resources to mobile sizes, converting drawables to webp\/vectors, and much more.<\/p>\n<p><strong>Note:<\/strong> If you&#8217;re using Xamarin.Forms, you&#8217;re most likely setting your images to <code>EmbeddedResource<\/code>. Since this embeds the resource into the assembly uncompressed, this can add quite a bit to your assemblies size. It might be a better decision to set these items as Android resources as you can optimize these further.<\/p>\n<h3>Removing Unused Resources<\/h3>\n<p>When developing a project and getting to the point of release, it&#8217;s very likely we&#8217;ll have left over resources that aren&#8217;t used within the application. Remove any unused resources as a first go-through.<\/p>\n<p><a href=\"https:\/\/blog.xamarin.com\/androids-d8-dexer-and-r8-shrinker\/\">Google&#8217;s R8 tooling<\/a> will also remove unused resources it finds within your application at build time.<\/p>\n<h3>Resizing and Optimizing Resources<\/h3>\n<p>Chances are, you have larger resources than you can actually display on a mobile phone in your project. These resources should be resized to a size closer to the largest device you plan to support while keeping in mind <a href=\"https:\/\/developer.android.com\/training\/multiscreen\/screendensities\">Android Screen Densities<\/a>.<\/p>\n<p>Alongside this, it&#8217;s very common that images are not using the proper file type for compression. For example, if you have a background or image that doesn&#8217;t require transparency, it&#8217;s typically a better idea to use JPG or WebP.<\/p>\n<h3>Convert images to WebP<\/h3>\n<p>Similar to the optimization tip above, we can <a href=\"https:\/\/developer.android.com\/studio\/write\/convert-webp\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" data-token-index=\"1\" data-reactroot=\"\">convert our images to WebP<\/a>, a file format similar to JPG that provides lossy compression alongside the transparency PNG offers. It&#8217;s the best of both worlds. Let&#8217;s now convert all of our resources to webp.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43872\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resafter.png\" alt=\"\" width=\"1255\" height=\"533\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resafter.png 1255w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resafter-300x127.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resafter-768x326.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/resafter-1024x435.png 1024w\" sizes=\"(max-width: 1255px) 100vw, 1255px\" \/><\/p>\n<p><strong>Before: res &#8211;<\/strong> 11.5MB<\/p>\n<p><strong>After: res &#8211;<\/strong> 2.1MB<\/p>\n<p><strong>Total Saved:<\/strong> 9.4MB<\/p>\n<h3>Use VectorDrawable when you can<\/h3>\n<p>Instead of creating multiple density-specific versions of an image, you can create one vector graphic. Vector graphics create an image using the XML which defines paths and colors. <a href=\"https:\/\/developer.android.com\/training\/multiscreen\/screendensities#vector-graphics\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" data-token-index=\"1\" data-reactroot=\"\">Learn more about Vector Graphics.<\/a><\/p>\n<h3>Inspecting the assemblies folder<\/h3>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43869\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assemblies.png\" alt=\"\" width=\"1253\" height=\"532\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assemblies.png 1253w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assemblies-300x127.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assemblies-768x326.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assemblies-1024x435.png 1024w\" sizes=\"(max-width: 1253px) 100vw, 1253px\" \/><\/p>\n<p>Second, the assemblies folder contributes towards a nice chunk of our APK size with <strong>14.8MB<\/strong>. The next step for us is fine-tuning the Mono Linker to shrink each assemblies&#8217; size.<\/p>\n<h3>Running the Mono Linker<\/h3>\n<p>The Mono Linker will remove any unused types and members within your assemblies based on a static analysis of your application.<\/p>\n<p>By using the <a href=\"https:\/\/docs.microsoft.com\/en-us\/xamarin\/android\/deploy-test\/linker#linker-behavior\">Mono Linker on it&#8217;s most aggressive linking setting: <strong>Sdk and User Assemblies<\/strong><\/a>, we can apply linking to not only Sdk Assemblies, but also on User Assemblies.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43873\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assembliesafter.png\" alt=\"\" width=\"1255\" height=\"531\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assembliesafter.png 1255w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assembliesafter-300x127.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assembliesafter-768x325.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/assembliesafter-1024x433.png 1024w\" sizes=\"(max-width: 1255px) 100vw, 1255px\" \/><\/p>\n<p>Keep in mind that using this setting is very prone to running into Linker errors. You can learn more about <a href=\"https:\/\/docs.microsoft.com\/en-us\/xamarin\/cross-platform\/deploy-test\/linker\">controlling the linker here<\/a>.<\/p>\n<p><strong>Before: assemblies &#8211;<\/strong> 14.8MB<\/p>\n<p><strong>After: assemblies &#8211;<\/strong> 12.6MB<\/p>\n<p><strong>Total Saved:<\/strong> 2.2MB<\/p>\n<h3>Inspecting the lib folder<\/h3>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43870\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/lib.png\" alt=\"\" width=\"1258\" height=\"534\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/lib.png 1258w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/lib-300x127.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/lib-768x326.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/lib-1024x435.png 1024w\" sizes=\"(max-width: 1258px) 100vw, 1258px\" \/><\/p>\n<p>The lib folder comes in at <span data-token-index=\"1\" data-reactroot=\"\">3.9MB. <\/span>We can&#8217;t do too much around the lib folder other than be mindful that for every additional ABI we support in our .APK, the additional multiplier of APK size. For example, if we added a 64-bit compatible ABI, we would double our size that the lib folder contributes to our application. To avoid this, we can create <a href=\"https:\/\/docs.microsoft.com\/en-us\/xamarin\/android\/deploy-test\/building-apps\/abi-specific-apks\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" data-token-index=\"3\" data-reactroot=\"\">ABI-Specific APKs<\/a> or use <a href=\"https:\/\/developer.android.com\/platform\/technology\/app-bundle\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" data-token-index=\"5\" data-reactroot=\"\">Android AppBundle<\/a> in the future.<\/p>\n<h3>Android App Bundles Coming Soon<\/h3>\n<p>If you haven&#8217;t heard about <a href=\"https:\/\/developer.android.com\/platform\/technology\/app-bundle\">Android App Bundles<\/a>, <a href=\"http:\/\/xamarin.Android\">Xamarin.Android<\/a> will soon support App Bundles to provide users with optimized APKs per their device specifications when downloading an app from the Google Play Store or various Android App Stores. This will allow you to not have to worry about certain types of resource qualifiers like locale, screen orientation, and pixel density being included in the APK resulting in a typical &#8220;fat package&#8221;.<\/p>\n<p>Alongside that, it would only include ABIs the device supports. The final APK delivered to the user&#8217;s device would contain the minimal APK required for the application to run on device.<\/p>\n<h3>Inspecting the DEX file<\/h3>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43871\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdex.png\" alt=\"\" width=\"1255\" height=\"332\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdex.png 1255w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdex-300x79.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdex-768x203.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdex-1024x271.png 1024w\" sizes=\"(max-width: 1255px) 100vw, 1255px\" \/><\/p>\n<p>Other than being <strong>2.0MB<\/strong> towards our APK size, the classes.dex file does not have much insight other than seeing a distribution of where methods are defined inside your application and third-party libraries. There will be many methods that will be stripped in a result of applying ProGuard or R8.<\/p>\n<p>Enough inspecting, let&#8217;s start applying some techniques to improve our APK size.<\/p>\n<h3>Using ProGuard \/ R8<\/h3>\n<p>Enabling ProGuard or R8 will remove any unused code from your APK.<\/p>\n<p>Before using ProGuard, we can see our <strong>classes.dex<\/strong> file at 2MB.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43874\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexbefore.png\" alt=\"\" width=\"1259\" height=\"20\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexbefore.png 1259w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexbefore-300x5.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexbefore-768x12.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexbefore-1024x16.png 1024w\" sizes=\"(max-width: 1259px) 100vw, 1259px\" \/><\/p>\n<p>Let&#8217;s <a href=\"https:\/\/docs.microsoft.com\/en-us\/xamarin\/android\/deploy-test\/release-prep\/proguard\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" data-token-index=\"1\" data-reactroot=\"\">enable ProGuard within our application<\/a>:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43875\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexafter.png\" alt=\"\" width=\"1264\" height=\"22\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexafter.png 1264w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexafter-300x5.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexafter-768x13.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/classesdexafter-1024x18.png 1024w\" sizes=\"(max-width: 1264px) 100vw, 1264px\" \/><\/p>\n<p>As you can see, we&#8217;ve removed 0.8 MB from ProGuard alone!<\/p>\n<p>In the future ProGuard will be replaced with Google&#8217;s R8 tooling by default which is backwards-compatible with existing ProGuard rules. For information on using R8 instead of ProGuard, see our article on <a href=\"https:\/\/blog.xamarin.com\/androids-d8-dexer-and-r8-shrinker\/\">d8 dexer and r8 shrinker<\/a>.<\/p>\n<p><strong>Before: classes.dex &#8211;<\/strong> 2.0MB<\/p>\n<p><strong>After: classes.dex &#8211;<\/strong> 1.2MB<\/p>\n<p><strong>Total Saved:<\/strong> 0.8MB<\/p>\n<h3>Summary<\/h3>\n<p>Through various techniques of shrinking our Android APK, we were able to take our package from 34.6MB to 21.9MB in just a few minutes. That&#8217;s a <strong>36% decrease in APK size!<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-43876\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerafter.png\" alt=\"\" width=\"1255\" height=\"433\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerafter.png 1255w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerafter-300x104.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerafter-768x265.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/04\/apkanalyzerafter-1024x353.png 1024w\" sizes=\"(max-width: 1255px) 100vw, 1255px\" \/><\/p>\n<p>Now it&#8217;s your turn to shrink your Android APK!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When it comes to application size, bigger is not better. In fact, it\u2019s one of the key factors a user takes into mind when considering installing or uninstalling your application. Imagine if a user ran out of space on their device and your app was one of the biggest offenders for used space. It would be quite a shame for your application to be one of the first to be uninstalled, purely for how large it is&#8230;<\/p>\n","protected":false},"author":551,"featured_media":39167,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[313,2],"tags":[5],"class_list":["post-43866","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","category-developers","tag-android"],"acf":[],"blog_post_summary":"<p>When it comes to application size, bigger is not better. In fact, it\u2019s one of the key factors a user takes into mind when considering installing or uninstalling your application. Imagine if a user ran out of space on their device and your app was one of the biggest offenders for used space. It would be quite a shame for your application to be one of the first to be uninstalled, purely for how large it is&#8230;<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/43866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/551"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=43866"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/43866\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/39167"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=43866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=43866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=43866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}