Home › Meme API
Find the right meme for any moment: search 450,000+ memes by keyword or by the words printed inside the image, filter by images or videos, rating and age, or pull a random meme.
Get a free API key Read the docs See pricing
keywords-in-image=true to match only memes whose picture contains your words.image, video or a format such as gif), minimum rating, maximum age in days, paging with offset.| Endpoint | GET https://api.humorapi.com/memes/search |
|---|---|
| Authentication | API key as api-key query parameter or x-api-key header |
| Response | JSON |
| Cost | 1 point per call |
| Reference | Search Memes in the docs |
GET https://api.humorapi.com/memes/search?number=3&keywords=rocket {
"memes": [
{
"id": 6696,
"url": "https://i.imgur.com/1rmAxUG.jpg",
"type": "image/jpeg"
},
{
"id": 6697,
"url": "https://i.imgur.com/ELT8zMQ.jpg",
"type": "image/jpeg"
},
{
"id": 6698,
"url": "https://i.imgur.com/8JTc5z3.jpg",
"type": "image/jpeg"
}
],
"available": 32
} curl "https://api.humorapi.com/memes/search?number=3&keywords=rocket&api-key=YOUR_API_KEY" const res = await fetch("https://api.humorapi.com/memes/search?number=3&keywords=rocket", {
headers: { "x-api-key": process.env.HUMOR_API_KEY }
});
const data = await res.json();
console.log(data); import os, requests
res = requests.get("https://api.humorapi.com/memes/search?number=3&keywords=rocket",
headers={"x-api-key": os.environ["HUMOR_API_KEY"]})
print(res.json()) GET https://api.humorapi.com/memes/random?keywords=rocket {
"id": 50561,
"url": "https://preview.redd.it/hg0zn2mhjsh01.png?width=640&crop=smart&auto=webp&s=f19b0a87edfc6c71b35ec9aceb64799cd532ff59",
"type": "image/png"
} GET /memes/searchGET /memes/randomPOST /memes/{id}/upvotePOST /memes/{id}/downvoteAnswer /meme rocket in a chat app with the first matching meme:
async function findMeme(query) {
const url = "https://api.humorapi.com/memes/search?number=1&media-type=image&keywords="
+ encodeURIComponent(query);
const res = await fetch(url, { headers: { "x-api-key": process.env.HUMOR_API_KEY } });
const { memes } = await res.json();
return memes.length ? memes[0].url : "No meme found.";
} There is no adult-content filter for memes. Use min-rating to favor well-liked memes, and review results before you show them to young audiences.
The free plan has 10 points per day (most calls cost 1 point) and needs a backlink; paid plans start at $3 per month for 100 points per day and bill extra points instead of stopping. Compare the plans.
Yes. Add keywords-in-image=true to Search Memes or Random Meme, and only memes whose image contains your keywords are returned.
No. Humor API searches and serves existing memes; it does not caption templates. Our meme API comparison lists APIs that do.
Up to 10 per Search Memes call; page through more with offset.