Meme API

Entertainment API · Global · Meme templates and top memes

TL;DR

The Meme API provides access to a curated database of internet memes — get top meme templates (Drake Hotline Bling, Distracted Boyfriend, etc.), search memes by name, browse subreddit meme collections, and retrieve meme images with captions. Each entry includes the meme name, template ID, and image URL. Built by the developers behind the popular Meme Generator, this API is the go-to data source for building meme-related applications, from meme search engines to automated caption generators and meme gallery apps.

Quick start: https://meme-api.com/gimme

No API key needed — just make a request!

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

How to Use This API

1. Get a Random Meme

https://meme-api.com/gimme

2. Meme from Specific Subreddit

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

3. Get Meme Templates (List)

https://api.memegenerator.net/v2/templates?page=1&pageSize=10

4. Search Memes

https://api.memegenerator.net/v2/templates/search?q=drake

5. JavaScript — Random Meme Display

async function showMeme() {
  const resp = await fetch('https://meme-api.com/gimme');
  const meme = await resp.json();
  
  console.log(`Title: ${meme.title}`);
  console.log(`Subreddit: r/${meme.subreddit}`);
  console.log(`Author: u/${meme.author}`);
  console.log(`Image: ${meme.url}`);
  console.log(`Post: ${meme.postLink}`);
  console.log(`NSFW: ${meme.nsfw ? 'Yes' : 'No'}`);
}

showMeme();

6. Python — Meme Gallery Collector

import requests

def get_memes_from_subreddit(subreddit='memes', count=5):
    results = []
    for _ in range(count):
        resp = requests.get(f'https://meme-api.com/gimme/{subreddit}')
        meme = resp.json()
        results.append({
            'title': meme['title'],
            'url': meme['url'],
            'ups': meme['ups'],
        })
    
    print(f'Top memes from r/{subreddit}:')
    for i, m in enumerate(results, 1):
        print(f'{i}. {m["title"]}')
        print(f'   {m["url"]}')
        print(f'   Score: {m["ups"]}')
        print()

get_memes_from_subreddit('programmingmemes', 3)

Frequently Asked Questions

Do I need an API key?
No. The meme-api.com endpoint is completely free. The MemeGenerator API (for templates) requires a free API key.
Where does the meme data come from?
Memes are sourced from Reddit, specifically from meme subreddits. The API pulls the latest trending content from these communities.
What data is returned for a random meme?
Post title, image URL, post link, subreddit, author, upvotes, number of comments, and NSFW status.
Can I filter by meme subreddit?
Yes. Use /gimme/{subreddit} to fetch from a specific subreddit like gimme/dankmemes, gimme/me_irl, or gimme/wholesomememes.
Are meme templates available for generation?
Yes, the Meme Generator API (api.memegenerator.net) provides template search and generation endpoints. Free registration required for an API key.
Is NSFW content included?
The response includes an nsfw flag. Some subreddits may contain adult content. Filter nsfw: false in your app for SFW use.

API Details

API URL
https://meme-api.com/gimme
Documentation
meme-api.com
Category
Entertainment
Authentication
Not Required
Geographic Coverage
Global

What You Can Build