Definitive Guide To AMP URL API

Definitive Guide To AMP URL API

Google AMP URL helps fetch all the AMP Urls from a list of URLs that are inputted into the API.


How it Works

First, we need to enable the API in API Explorer in Google Cloud Console as stated below.

Go to the API Section and copy the appropriate API Key to be used to invoke the API.

Head over to the Official API Documentation. This API allows you to fetch all AMP urls from a given list of URLs using batch.Get() Method.

Take some urls from a website using AMP, and paste in the appropriate section in the sample code provided.

Copy the Sample Code as generated here.

Open Curl and insert the copied piece of code. Run it to obtain the result. Don’t forget to put your API Key at the appropriate portion of the code.

The Code returns all URLs along with their amp version.

The Code also mentions all those URLs which do not have an AMP version.