Artboard 1 Artboard location-16px_bookmark-star Artboard 1 objects-16px_sticker Group Artboard 1 Group users-24px-outline_man-glasses chatavatar-pattern chatavatar-sad chatavatar

Makeagif api Basics

GET Categories

Retrieve list of all GIF categories

GET /api/categories

Request:

No any parameter

Example query:

GET /api/categories

Example Response:

{
        "status": "done",
        "categories": [
          {
            "id": 4,
            "name": "cartoon gifs",
            "code": "cartoon-gifs"
          },
          {
            "id": 3,
            "name": "entertainment gifs",
            "code": "entertainment-gifs"
          },
          {
            "id": 1,
            "name": "funny gifs",
            "code": "funny-gifs"
          }
        ]
      }

Response parameters:

Possible KeyPossible Values
status "done" - request is complete, see "categories" content
"error" - request was not completed successfully; see "error" key value
categorieslist of categories of GIFs; where "id" and "code" values may be used in another API requests
errordetailed information about error that occurred

Allows users to search GIFs using various methods

POST /api/find

Request:

KeyExample valueDescription
qAwkwardSearch query
categoryaction-gifsCategory code
start0Skip results count
limit50Maximum results count (default: 25, maximum: 100)

You can define one or more conditions to search - "q" and "category". You must set at least one search criteria.

Response:

{
          "status": "done",
          "total": 234,
          "result": [{
            "category": {
              "code": "action-gifs",
              "name": "action gifs"
            },
            "code": "0B34nF",
            "title": "Awkward David Bowie Dancing: A Tribute",
            "width": "245",
            "height": "310",
            "gif_url": "https://i.makeagif.com/media/1-14-2016/0B34nF.gif",
            "thumb_url": "https://i.makeagif.com/media/1-14-2016/t0B34nF.jpg",
            "mp4_url": "https://i.makeagif.com/media/1-14-2016/0B34nF.mp4"
          },
          {
            "category": {
              "code": "action-gifs",
              "name": "action gifs"
            },
            "code": "L5Ncq2",
            "title": "Awkward David Bowie Dancing: A Tribute",
            "width": "480",
            "height": "270",
            "gif_url": "https://i.makeagif.com/media/1-14-2016/L5Ncq2.gif",
            "thumb_url": "https://i.makeagif.com/media/1-14-2016/tL5Ncq2.jpg",
            "mp4_url": "https://i.makeagif.com/media/1-14-2016/L5Ncq2.mp4"
          }]
        }

GIF information

Allows users to get information about GIFs

GET /api/gif/{code}

Query string parameters:

KeyExample valueDescription
{code}nUzGB9Gif Code to retrieve

Example query:

GET /api/gif/nUzGB9

Response:

{
          "status":"done",
          "result":[{
              "category": {
                  "code": "action-gifs",
                  "name": "action gifs"
              },
              "code":"RfX5XF",
              "title":"Original GIF by Doze",
              "width":"500",
              "height":"459",
              "gif_url":"https://i.makeagif.com/media/1-14-2016/RfX5XF.gif",
              "thumb_url":"https://i.makeagif.com/media/1-14-2016/tRfX5XF.jpg",
              "mp4_url":"https://i.makeagif.com/media/1-14-2016/RfX5XF.mp4"
          }]
      }

Random GIF

Allows users to get information about a random GIF

Query:

GET /api/random-gif

Request:

KeyExample valueDescription
category*1ID of category

* - required query keys

Response:

{
      "status":"done",
      "result":[{
          "code":"RfX5XF",
          "title":"Original GIF by Doze",
          "width":"500",
          "height":"459",
          "gif_url":"https://i.makeagif.com/media/1-14-2016/RfX5XF.gif",
          "thumb_url":"https://i.makeagif.com/media/1-14-2016/tRfX5XF.jpg",
          "mp4_url":"https://i.makeagif.com/media/1-14-2016/RfX5XF.mp4"
      }]
  }

GIF Creation

Allows users to create GIFs using various methods (video URL, video, and images)

If you want to use your Premium account features on GIF creation, please attach the HTTP header `Authorization` to the requests. We support the `Bearer` authentication method and the value is the API token which you can find on settings page.

POST /api/create-gif/source/url

Allow users to create GIFs using a provided URL (YouTube or another video URL)

Request:

KeyExample valueDescription
category*1ID of category
start*0Start time in sec
end*5End time in sec
titleNew VideoTitle of video
url*https://www.youtube.com/watch/?v=UIrEM_9qvZUVideo URL (can be YouTube Link)
private0If video should be private (only for authenticated users)
nsfw0If video is not safe for work (boolean)
tags[]catArray of tags
watermark_type**noneRemove default watermark (none) or use default watermark (default)

* - required query keys

** - available only for Premium users

Response:

{"id":"7836dbef0de534c3fc5ee4693f802934","success":true}

POST /api/create-gif/source/video

Allow users to create GIFs using provided video file

Request:

KeyExample valueDescription
start*0Start time in sec
private0If video should be private (only for authenticated users)
nsfw0If video is not safe for work (boolean)
category*1ID of category
end*5End time in sec
tags[]catArray of tags
title*New VideoTitle of video
video*data:video/mpeg;base64,CiVBORw0KGgoAA...data-url
watermark_type**noneRemove default watermark (none) or use default watermark (default)

* - required query keys

** - available only for Premium users

Response:

{"id":"7836dbef0de534c3fc5ee4693f802934","success":true}

POST /api/create-gif/source/pictures

Allow users to create GIFs using pictures

Request:

KeyExample valueDescription
category*1ID of category
delay500Delay in ms (1000-100) between frames
height*200Height of GIF in pixels
private0If video should be private (only for authenticated users)
nsfw0If video not safe for work (boolean)
pictures[]*data:image/gif;base64,CiVBORw0KGgoAA...data-url for each picture (min: 2)
resize*0Resize each frame of GIF (boolean)
tags[]catArray of tags
title*New VideoTitle of video
width*300Width of GIF in pixels
watermark_type**noneRemove default watermark (none) or use default watermark (default)

* - required query keys

** - available only for Premium users

Response:

{"id":"7836dbef0de534c3fc5ee4693f802934","success":true}

Task Status

Retrieve status of async task

GET /api/status/{task}

Request:

KeyExample valueDescription
{task}7836dbef0de534c3fc5ee4693f802934Retrieval task ID status

Example query:

GET /api/status/7836dbef0de534c3fc5ee4693f802934

Example Response:

{"status":"done","result":{"code":"dyHsY4","url": "/gif/-dyHsY4"}}

Response parameters:

Possible KeyPossible Values
status "done" - task is complete, see "url" if needed
"waiting" - task is in pending state
"processing" - task is currently processing
"error" - task was not completed successfully; see "error" key value
urlgenerated GIF code you can access GIF via https://makeagif.com/{code}
errordetailed information about error that occurred