inf3cti0n95 / Meme_Api

Summon a random meme at will

Home Page:https://meme-api.herokuapp.com/gimme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meme API

CodeFactor Codacy Badge

JSON API for a random meme scraped from reddit.

API Link : https://meme-api.herokuapp.com/gimme

Example Response:

{
  "postLink": "https://redd.it/9vqgv2",
  "subreddit": "memes",
  "title": "Good mor-ning Reddit!...",
  "url": "https://i.redd.it/yykt3r9zsex11.png",
  "nsfw": false,
  "spoiler": false
}

Custom Endpoints

Specify count (MAX 50)

In order to get multiple memes in a single request specify the count with the following endpoint.

Endpoint: /gimme/{count}

Example: https://meme-api.herokuapp.com/gimme/2

Response:

{
  "count": 2,
  "memes": [
    {
      "postLink": "https://redd.it/d5bn24",
      "subreddit": "me_irl",
      "title": "me_irl",
      "url": "https://i.redd.it/6wjb8gibu2n31.jpg",
      "nsfw": false,
      "spoiler": false
    },
    {
      "postLink": "https://redd.it/d4zipy",
      "subreddit": "me_irl",
      "title": "Me🚐_irl",
      "url": "https://i.redd.it/hyl6fgweswm31.jpg",
      "nsfw": false,
      "spoiler": false
    }
  ]
}

Specify Subreddit

By default the API grabs a random meme from 'memes', 'dankmemes', 'me_irl' subreddits. To provide your own custom subreddit use the following endpoint.

Endpoint: /gimme/{subreddit}

Example: https://meme-api.herokuapp.com/gimme/dankmemes

Specify Subreddit Count (MAX 50)

In order to get a custom number of memes from a specific subreddit provide the name of the subreddit and the count in the following endpoint.

Endpoint: /gimme/{subreddit}/{count}

Example: https://meme-api.herokuapp.com/gimme/dankmemes/2

Response:

{
  "count": 2,
  "memes": [
    {
      "postLink": "https://redd.it/d5e119",
      "title": "Mph and km/h so everyone can understand",
      "url": "https://i.redd.it/imb4r0se74n31.jpg",
      "nsfw": false,
      "spoiler": false
    },
    {
      "postLink": "https://redd.it/d5e5ns",
      "title": "Funnier as a team.",
      "url": "https://i.redd.it/ixb7absfa4n31.jpg",
      "nsfw": false,
      "spoiler": false
    }
  ],
  "subreddit": "dankmemes"
}

About

Summon a random meme at will

https://meme-api.herokuapp.com/gimme

License:MIT License


Languages

Language:Go 98.9%Language:Dockerfile 0.8%Language:Shell 0.3%