gifbase - 6,500 gifs and counting...
submit a gif!

tag search

api

gifbase offers a RESTful JSON API that you can access easily by appending ?format=json to any regular HTTP page request you'd usually make on the website, including /gif/* /tag/* and /user/* routes.

tag api: /js/tags.json

you can access the complete JSON array of available tags at tags.json

these tags can then be used directly in subsequent tag list API requests in place of the [tag name] variable below.

gif api: /gif/[gif id]?format=json

returns the details of a gif in JSON format.

example output:

{
    "id": "3726",
    "username": "jackson",
    "url": "http://i.imgur.com/gR5V57N.gif",
    "date": "1368257767",
    "tags": "happy,ecstatic,rabbit,yesgood,smiling"
}

tag api: /tag/[tag name]?format=json

returns a list of gifs associated with the specified tag in JSON format, and a count of how many exist. each gif item comes with a unique "id" and "username" which can be used to retrieve further details about the gif or user via the relevant endpoint.

pagination is handled using the regular "p" query parameter, for example: /tag/[tag name]?p=[page number]&format=json. the order of the query parameters does not matter. the returned JSON indicates "page_current" and "page_count" so that you can rig your app up to dynamically page through additional pages of gifs.

example output:

{
    "tag": "smile",
    "gif_count": "253",
    "page_current": "1",
    "page_count": "26",
    "gifs": [
        {
            "id": "5585",
            "username": "christine",
            "url": "http://i.imgur.com/Io3s81m.gif",
            "date": "1401328393",
            "tags": "dog,zoom,smile,hi"
        },
        {
            "id": "5572",
            "username": "christine",
            "url": "http://i.imgur.com/K1NvgHF.gif",
            "date": "1400903827",
            "tags": "thor,smile,ihavenoideawhatsgoingon,idgi,derp"
        },
        {
            "id": "5556",
            "username": "christine",
            "url": "http://i.imgur.com/bzT6xjQ.gif",
            "date": "1399279455",
            "tags": "shaq,cat,wiggle,smile,smug"
        },
        {
            "id": "5548",
            "username": "christine",
            "url": "http://i.imgur.com/NkUEalS.gif",
            "date": "1398571880",
            "tags": "mileycyrus,shrug,idc,oops,smile"
        },
        {
            "id": "5508",
            "username": "christine",
            "url": "http://i.imgur.com/MrGeOzY.gif",
            "date": "1395830216",
            "tags": "laugh,smile,smug,evil"
        },
        {
            "id": "5473",
            "username": "christine",
            "url": "http://i.imgur.com/DFcikXa.gif",
            "date": "1394261719",
            "tags": "britneyspears,humoringyou,smile,awkward,sideeye"
        },
        {
            "id": "5454",
            "username": "christine",
            "url": "http://oi48.tinypic.com/30tlzc4.jpg",
            "date": "1393130651",
            "tags": "ryangosling,awkward,cute,smile,jamming"
        },
        {
            "id": "5427",
            "username": "jackson",
            "url": "http://i.imgur.com/qxHu6lR.gif",
            "date": "1391163454",
            "tags": "smile,creepy,sweating,nervous,grin"
        },
        {
            "id": "5410",
            "username": "christine",
            "url": "http://i.imgur.com/meoQuXK.gif",
            "date": "1390045263",
            "tags": "heroes,sylar,smile,evil,smug"
        },
        {
            "id": "5400",
            "username": "christine",
            "url": "http://i.imgur.com/qgUGU5T.gif",
            "date": "1389881878",
            "tags": "wakaflockaflame,smug,smile,boxing"
        }
    ]
}

user api: /user/[username]?format=json

returns a list of gifs submitted by the specified user in JSON format, plus a count of how many they've submitted in total. each gif item comes with a unique "id" and comma-delimited list of "tags" that allow you to access further details or gifs via the relevant api endpoints.

pagination is handled using the regular "p" query parameter, for example: /user/[username?p=[page number]&format=json. the order of the query parameters does not matter. the returned JSON indicates "page_current" and "page_count" so that you can rig your app up to dynamically page through additional pages of gifs.

example output:

{
    "username": "jackson",
    "gif_count": "857",
    "page_current": "1",
    "page_count": "86",
    "gifs": [
        {
            "id": "5578",
            "username": "jackson",
            "url": "http://i.imgur.com/1L8qvff.gif",
            "date": "1401087316",
            "tags": "dog,wings,fairy,unacceptable,notamused"
        },
        {
            "id": "5577",
            "username": "jackson",
            "url": "http://i.imgur.com/6tudmBb.gif",
            "date": "1401087245",
            "tags": "hat,mlady,doge,dog,goodday"
        },
        {
            "id": "5576",
            "username": "jackson",
            "url": "http://i.imgur.com/DidEhzv.gif",
            "date": "1401087192",
            "tags": "sombrero,multitasking,idgaf"
        },
        {
            "id": "5575",
            "username": "jackson",
            "url": "http://i.imgur.com/D2txK8F.gif",
            "date": "1401087107",
            "tags": "hankschrader,lost,scared,panic,breakingbad"
        },
        {
            "id": "5574",
            "username": "jackson",
            "url": "http://i.imgur.com/KOrhrzq.gif",
            "date": "1401087015",
            "tags": "rabbit,nom,bunny,notamused"
        },
        {
            "id": "5547",
            "username": "jackson",
            "url": "http://i.imgur.com/xAoXTiM.gif",
            "date": "1398340198",
            "tags": "crazypills,zoolander,willferrell,mugatu"
        },
        {
            "id": "5546",
            "username": "jackson",
            "url": "http://i.imgur.com/grvQjbC.gif",
            "date": "1398340031",
            "tags": "omg,wat,whatdidyousay,areyouserious,familyguy"
        },
        {
            "id": "5545",
            "username": "jackson",
            "url": "http://i.imgur.com/Jk3b3zz.gif",
            "date": "1398339922",
            "tags": "dancing,baby,groove,hellyeah"
        },
        {
            "id": "5539",
            "username": "jackson",
            "url": "http://i.imgur.com/5V6leu0.gif",
            "date": "1397984434",
            "tags": "pumping,gas,dance,this"
        },
        {
            "id": "5530",
            "username": "jackson",
            "url": "http://i.imgur.com/JjTg3u6.gif",
            "date": "1397479751",
            "tags": "neildegrassetyson,flinch,smug,science,fail"
        }
    ]
}