Reputation: 931
I am able to create a short URL using goo.gl API using following two lines of python code:
longurl = 'http:/www.example.com/url'
r = requests.post('https://www.googleapis.com/urlshortener/v1/url?key=API_KEY), json={"longUrl": longurl})
I was hoping to find collective stats of all URLs created using same API_KEY. I know appending .info to individual short URL shows great stats for that one URL. Is there any cumulative stats view for all URLs created using same API_KEY?
Thank you!
Upvotes: 0
Views: 100
Reputation: 2784
There is the :list
-function which can give you a list of URLs shortened by a certain authenticated user. What is required is your API key and an authoriztation (read more about authentication and authorization).
With the projection
parameter you can receive additional information. There are two values accepted: FULL
and ANALYTICS_CLICKS
, which will give you click counts for the short URL.
Other analytics are not returned by url.list.
This is the only option provided. But based on this you could script something that receives you the additional analytics for the list of URLs (please check if this is allowed before).
Upvotes: 1