Meme Generator API

Meme Generator API

Media

Generate memes with a simple link! The api allows to input text on top and bottom places of the images. The images are selected from the api's website. You can create amazing fun apis through api meme.

Visit API

📚 Documentation & Examples

Everything you need to integrate with Meme Generator API

🚀 Quick Start Examples

Meme Generator API Javascript Examplejavascript
// Meme Generator API API Example
const response = await fetch('http://apimeme.com', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

5 Ways to Use the Apimeme Public API with JavaScript

The Apimeme Public API is an amazing resource for developers who want to add memes to their applications. Here are 5 ways you can use the Apimeme Public API with JavaScript:

1. Display Random Memes

fetch("http://apimeme.com/meme?meme=Advice-Dog")
.then(response => response.json())
.then(json => {
   const image = document.createElement("img");
   image.src = json.data.url;
   document.body.appendChild(image);
});

This code is a basic JavaScript fetch method that fetches a random image with the meme type of "Advice-Dog", converts the response to JSON, and displays the resulting image on the HTML page.

2. Choose a Specific Meme Template

fetch("http://apimeme.com/meme?meme=Grumpy-Cat&top=Top%20Text&bottom=Bottom%20Text")
.then(response => response.json())
.then(json => {
   const image = document.createElement("img");
   image.src = json.data.url;
   document.body.appendChild(image);
});

This code displays a Grumpy Cat meme with custom text on top and bottom of the image.

3. Use a Pre-existing Meme

fetch("http://apimeme.com/meme?url=http://i.imgur.com/1dSbJ.gif&top=Top%20Text&bottom=Bottom%20Text")
.then(response => response.json())
.then(json => {
   const image = document.createElement("img");
   image.src = json.data.url;
   document.body.appendChild(image);
});

If there's a pre-existing meme you'd like to use, it can be added to your site using the apimeme URL.

4. Generate a Meme with Custom Text

fetch("http://apimeme.com/meme?meme=Condescending-Wonka&top=Top%20Text&bottom=Bottom%20Text")
.then(response => response.json())
.then(json => {
   const image = document.createElement("img");
   image.src = json.data.url;
   document.body.appendChild(image);
});

Using this code, you can customize the top and bottom text of the Condescending Wonka template.

5. Mix and Match Meme Templates

fetch("http://apimeme.com/meme?meme=Condescending-Wonka|Y-U-No|Futurama-Fry|Chemistry-Cat&top=Top%20Text&bottom=Bottom%20Text")
.then(response => response.json())
.then(json => {
   const image = document.createElement("img");
   image.src = json.data.url;
   document.body.appendChild(image);
});

This is a fun way to mix and match between multiple meme templates. In this example, the Condescending Wonka, Y-U-No, Futurama-Fry, and Chemistry-Cat templates are chosen and customized with text.

In conclusion, the Apimeme Public API is a fantastic resource for developers who want to integrate memes into their sites and applications. With these five code examples, you can get started using Apimeme in your JavaScript project today.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 15Jun 17Jun 19Jun 21Jun 23Jun 25Jun 27Jun 29Jul 1Jul 3Jul 5Jul 7Jul 9Jul 11Jul 1404008001440Minutes
Online
Offline

Related APIs in Media