Skip to content

2021 upgrade

Justin Forest edited this page Dec 14, 2021 · 17 revisions

In November 2021 we will remove some parts of the old API. You might need to upgrade your application to use the new API. This page describes all required changes.

Please note that this document is being updated frequently. If you notice something stopped working in your app, please revisit this document.

Table of Contents:

Single gif information

To get detailed information on a gif, you previously used this call:

https://api.redgifs.com/v1/gfycats/wetbareangora

The result would look like:

{
  "gfyItem": {
    "avgColor": "#775b5c",
    "content_urls": {
      "mobile": {
        "width": 672,
        "size": 2948826,
        "url": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-mobile.mp4",
        "height": 480
      },
      "mp4": {
        "width": 1512,
        "size": 20573629,
        "url": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth.mp4",
        "height": 1080
      },
      "mobilePoster": {
        "width": 672,
        "size": 46645,
        "url": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-mobile.jpg",
        "height": 480
      },
      "100pxGif": {
        "width": 350,
        "size": 6269640,
        "url": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-small.gif",
        "height": 250
      },
      "poster": {
        "width": 672,
        "size": 46645,
        "url": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-poster.jpg",
        "height": 480
      }
    },
    "createDate": 1635110358,
    "dislikes": 0,
    "encoding": false,
    "finished": true,
    "gfyId": "opaquecriminalcottonmouth",
    "gfyName": "OpaqueCriminalCottonmouth",
    "height": 1080,
    "likes": 7,
    "published": 1,
    "ratio": 1,
    "source": 1,
    "tags": [
      "Big Tits",
      "Bollywood",
      "Celebrity",
      "Desi",
      "Huge Tits",
      "Lesbian",
      "Lesbians",
      "Nude"
    ],
    "type": 1,
    "userData": {
      "publishedGfycats": 1153,
      "description": "My Redgifs Profile",
      "followers": 3165,
      "following": 5,
      "name": "dvang07",
      "profileImageUrl": "https://userpic.redgifs.com/a/84/a8489ad6e41b3073ef5cd6a31b74972d.png",
      "profileUrl": "https://www.redgifs.com/users/dvang07",
      "subscription": 0,
      "url": "https://www.redgifs.com/users/dvang07",
      "username": "dvang07",
      "verified": false,
      "views": 189415151
    },
    "userName": "dvang07",
    "views": 117,
    "views5": 117,
    "width": 1512,
    "captionsUrl": null,
    "domainWhitelist": [],
    "duration": 28,
    "frameRate": 0,
    "gatekeeper": 12,
    "geoWhitelist": [],
    "gifUrl": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-small.gif",
    "hasAudio": false,
    "hasTransparency": false,
    "languageCategories": [],
    "max2mbGif": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-small.gif",
    "max5mbGif": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-small.gif",
    "miniPosterUrl": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-mobile.jpg",
    "mobileHeight": 480,
    "mobilePosterUrl": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-mobile.jpg",
    "mobileUrl": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-mobile.mp4",
    "mobileWidth": 672,
    "mp4Url": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth.mp4",
    "nsfw": true,
    "numFrames": 0,
    "posterUrl": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-poster.jpg",
    "thumb100PosterUrl": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-mobile.jpg"
  },
  "warning": "This API is going away, please upgrade your app: https://github.com/Redgifs/api/wiki"
}

The new API URL you should use:

https://api.redgifs.com/v2/gifs/opaquecriminalcottonmouth

The new response layout:

{
  "gif": {
    "id": "opaquecriminalcottonmouth",
    "createDate": 1635110358,
    "hasAudio": false,
    "width": 1512,
    "height": 1080,
    "likes": 7,
    "tags": [
      "Big Tits",
      "Bollywood",
      "Celebrity",
      "Desi",
      "Huge Tits",
      "Lesbian",
      "Lesbians",
      "Nude"
    ],
    "verified": false,
    "views": 117,
    "duration": 28,
    "published": true,
    "urls": {
      "sd": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-mobile.mp4",
      "hd": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth.mp4",
      "poster": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-poster.jpg",
      "thumbnail": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-mobile.jpg",
      "vthumbnail": "https://thumbs2.redgifs.com/OpaqueCriminalCottonmouth-mobile.mp4"
    },
    "userName": "dvang07",
    "type": 1,
    "avgColor": "#775b5c",
    "gallery": null
  },
  "user": {
    "creationtime": 1555122653,
    "followers": 3165,
    "following": 5,
    "gifs": 1153,
    "name": "dvang07",
    "profileImageUrl": "https://userpic.redgifs.com/a/84/a8489ad6e41b3073ef5cd6a31b74972d.png",
    "profileUrl": "https://www.redgifs.com/users/dvang07",
    "publishedGifs": 1153,
    "subscription": 0,
    "url": "https://www.redgifs.com/users/dvang07",
    "username": "dvang07",
    "verified": false,
    "views": 189415151
  }
}

This layout has less noise, and the user info (if any) is moved outside the gif.

Searching for gifs

Previously you would call:

https://api.redgifs.com/v1/gfycats/search?search_text=nude&count=100

The results would be:

{
  "cursor": null,
  "gfycats": [],
  "related": [],
  "found": 131
}

The new URL:

https://api.redgifs.com/v2/gifs/search?search_text=nude&count=100

The new output layout:

{
  "page": 1,
  "pages": 2,
  "total": 131,
  "gifs": [],
  "users": [],
  "tags": []
}

The main difference is that, as with single gifs, we return shorter gif info structures, and user info is in a separate block. Also, we now use paging instead of cursors, add &page=1 to access pages.