How fast is AMP really?
I built a simple bash&#x2F;javascript to get the AMP URL for a given URL, did reduce my data usage by tons. Look here:<p><a href="https:&#x2F;&#x2F;developers.google.com&#x2F;apis-explorer&#x2F;?hl=en_US#p&#x2F;acceleratedmobilepageurl&#x2F;v1&#x2F;acceleratedmobilepageurl.ampUrls.batchGet" rel="nofollow">https:&#x2F;&#x2F;developers.google.com&#x2F;apis-explorer&#x2F;?hl=en_US#p&#x2F;acce...</a><p><pre><code>   curl -X POST -H &quot;Content-Type: application&#x2F;json&quot;  -d &quot;{urls: [&#x27;$1&#x27;] }&quot; 
   https:&#x2F;&#x2F;content-acceleratedmobilepageurl.googleapis.com
   &#x2F;v1&#x2F;ampUrls:batchGet?key=YOUR_AMP_API_KEY
</code></pre>
For android app use:<p><pre><code>       public static String GET(String url){
        String result = &quot;&quot;;
        String ampString = &quot;https:&#x2F;&#x2F;content-acceleratedmobilepageurl.googleapis.com&#x2F;v1&#x2F;ampUrls:batchGet?key=YOUR_AMP_API_KEY&quot;;
        HttpURLConnection conn = null;
        try {
            URL ampurl = new URL(ampString);
            conn = (HttpURLConnection) ampurl.openConnection();
            conn.setReadTimeout(10000);
            conn.setConnectTimeout(15000);
            conn.setRequestProperty(&quot;Content-Type&quot;, &quot;application&#x2F;json&quot;);
            conn.setRequestMethod(&quot;POST&quot;);
            conn.setDoInput(true);
            conn.setDoOutput(true);

            JSONObject jsonObject = new JSONObject();
            jsonObject.accumulate(&quot;urls&quot;, url);

            OutputStream os = conn.getOutputStream();
            os.write(jsonObject.toString().getBytes(&quot;UTF-8&quot;));
            os.close();

            InputStream istream = null;
            istream = conn.getInputStream();
            InputStream in = new BufferedInputStream(istream);
            if(in != null){
                result = convertInputStreamToString(in);
            }
        }
        catch (Exception e) {
            Log.d(&quot;News exception&quot;, result);
        }finally {
            &#x2F;&#x2F; Close Stream TODO
            &#x2F;&#x2F; and disconnect HTTPS connection.
            if (conn != null) {
                conn.disconnect();
            }
        }

    private static String convertInputStreamToString(InputStream inputStream) throws IOException {
        BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));
        String line = &quot;&quot;;
        String result = &quot;&quot;;
        String id = &quot;&quot;;
        String ampUrls = &quot;&quot;;

        while((line = bufferedReader.readLine()) != null){
            result += line;
        }
        inputStream.close();
        try {
            JSONObject jsonObj = new JSONObject(result);
            &#x2F;&#x2F; check if jsonObj has ampUrls string - how to do it?

                if (!jsonObj.isNull(&quot;ampUrls&quot;)){
                    JSONArray contacts = jsonObj.getJSONArray(&quot;ampUrls&quot;);
                        for (int i = 0; i &lt; contacts.length(); i++) {
                            JSONObject c = contacts.getJSONObject(i);
                            id = c.getString(&quot;cdnAmpUrl&quot;);
                            }
                    }

            } catch (JSONException e) {
                &#x2F;&#x2F; TODO Auto-generated catch block
                e.printStackTrace();
            }
        return id;

    } &#x2F;&#x2F;end of convertInputStreamToString</code></pre>