Skip to content

Latest commit

 

History

History

goo.gl

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Googl URL shortener tools

Tool to get information about goo.gl shortened urls through the API. To create a key, check here. Works in python 2 and python 3.

Key should be stored in ~/.goo.gl:

[API]
key: KEYHERE

Help :

$ python api.py -h
usage: api.py [-h] [--hash HASH] [--file FILE]

Check goo.gl infos through the API

optional arguments:
  -h, --help            show this help message and exit
  --hash HASH, -H HASH  HASH of a link
  --file FILE, -f FILE  Get hashes from a file

Check a hash:

$ python api.py -H fbsS
{
    "analytics":{
        "allTime":{
            "browsers":[
                {
                    "count":"6607390",
                    "id":"Chrome"
                },
[SNIP]
    "created":"2009-12-13T07:22:55.000+00:00",
    "id":"http://goo.gl/fbsS",
    "kind":"urlshortener#url",
    "longUrl":"http://www.google.com/",
    "status":"OK"
}