Imgflip API
Imgflip's get_memes endpoint returns the 100 most popular meme templates with image URLs, dimensions and text box counts. No API key for reading. Tested example included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Imgflip API?
The Imgflip API's `get_memes` endpoint is a free, key-free GET that returns the 100 most popular meme templates currently on Imgflip, each with an image URL, pixel dimensions, the number of caption boxes it takes and how many memes have been made from it.
Imgflip is where most meme templates on the internet are actually hosted, which makes `get_memes` more useful than its one-line description suggests. It is the canonical, continuously reranked list of what people are making memes from right now — several other meme APIs are, on inspection, thin wrappers that serve Imgflip's own `i.imgflip.com` URLs back to you.
The important detail for anyone building on it is `box_count`. Templates are not uniform: Drake takes two captions, Distracted Boyfriend takes three, and some take five. If you are building a picker UI, you must read `box_count` per template and render that many text inputs, otherwise your captions will silently land in the wrong panels. The read endpoint needs no credentials; only the separate caption endpoint, which creates an image, requires an Imgflip account, and that one is not documented here because verification stays read-only.
Quick facts
- Base URL
https://api.imgflip.com- Authentication
- `get_memes` needs no key or account. The image-generating endpoints do require Imgflip account credentials, which is a separate matter entirely.
- Rate limit
- No published limit on the read endpoint. The list changes slowly — cache it for an hour at least.
- Pricing
- Free to read. Imgflip sells premium accounts for the generation side.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Imgflip API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. List the most popular meme templates
GET https://api.imgflip.com/get_memes
curl 'https://api.imgflip.com/get_memes'const res = await fetch("https://api.imgflip.com/get_memes");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.imgflip.com/get_memes", timeout=20)
res.raise_for_status()
print(res.json()){
"success": true,
"data": {
"memes": [
{
"id": "181913649",
"name": "Drake Hotline Bling",
"url": "https://i.imgflip.com/30b1gx.jpg",
"width": 1200,
"height": 1200,
"box_count": 2,
"captions": 1552500
},
{
"id": "87743020",
"name": "Two Buttons",
"url": "https://i.imgflip.com/1g8my4.jpg",
"width": 600,
"height": 908,
"box_count": 3,
"captions": 1206500
},
{
"id": "112126428",
"name": "Distracted Boyfriend",
"url": "https://i.imgflip.com/1ur9b0.jpg",
"width": 1200,
"height": 800,
"box_count": 3,
"captions": 1185000
},
{
"id": "222403160",
"name": "Bernie I Am Once Again Asking For Your Support",
"url": "https://i.imgflip.com/3oevdk.jpg",
"width": 750,
"height": 750,
"box_count": 2,
"captions": 348500
},
{
"id": "217743513",
"name": "UNO Draw 25 Cards",
"url": "https://i.imgflip.com/3lmzyx.jpg",
"width": 500,
"height": 494,
"box_count": 2,
"captions": 656750
},
{
"id": "124822590",
"name": "Left Exit 12 Off Ramp",
"url": "https://i.imgflip.com/22bdq6.jpg",
"width": 804,
"height": 767,
"box_count": 3,
"captions": 739250
},
{
"id": "252600902",
"name": "Always Has Been",
"url": "https://i.imgflip.com/46e43q.png",
"width": 960,Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
(none) | - | Optional | `get_memes` takes no parameters. It always returns the current top 100 templates by usage. - |
Response fields
successboolean- Always check this first — Imgflip returns HTTP 200 with `success: false` and an `error_message` rather than an error status code.
data.memes[].idstring- Template id, as a string. This is what the caption endpoint expects.
data.memes[].namestring- Human-readable template name, e.g. "Distracted Boyfriend".
data.memes[].urlstring- Direct image URL on i.imgflip.com. Hotlinkable.
data.memes[].width / heightinteger- Pixel dimensions, so you can size a preview without loading the image first.
data.memes[].box_countinteger- How many caption boxes this template takes. Render exactly this many inputs.
data.memes[].captionsinteger- Roughly how many memes have been made from the template — a usable popularity signal.
What you can build with the Imgflip API
- Populate a meme template picker in a web or mobile app
- Rank templates by current popularity using the `captions` count
- Build a Discord or Slack bot that offers templates by name
- Cache a template catalogue for an offline-first meme editor
- Study what makes a format spread, using caption counts as a proxy
Common errors and how to fix them
200 with `success: false`
Imgflip signals failure in the body, not the status code.
Fix: Check the top-level `success` flag before reading `data.memes`. When it is false the reason is in `error_message`.
Captions land in the wrong boxes
The template takes a different number of captions than you assumed.
Fix: Read `box_count` per template and build your form from it rather than hard-coding two text fields.
403 or a login prompt
You have called a generation endpoint, not `get_memes`.
Fix: Only `get_memes` is open. Anything that creates an image needs Imgflip account credentials.
Imgflip API — frequently asked questions
Is the Imgflip API free and does it need an API key?
Reading the template list with `get_memes` is free and needs no key. Generating a captioned image is a different endpoint that requires an Imgflip username and password, so plan for that split early.
How many templates does get_memes return?
The 100 most popular templates at the time of the call, ordered by how many memes have been created from each. It is a live ranking, so the order shifts week to week.
Can I hotlink the returned image URLs?
The `url` values point at i.imgflip.com and load directly in an `img` tag. For a production app it is still worth caching or proxying them so your UI does not break if a template is removed.
Why do some templates have three or five caption boxes?
Because the format needs them — Distracted Boyfriend labels three people, and some multi-panel formats need five. The `box_count` field tells you exactly how many, and ignoring it is the most common bug when building a meme editor.
Tools that pair with this API
Meme Generator
Make a meme online free: add classic top and bottom captions in Impact style with automatic line wrapping and sizing, then download as PNG or JPG.
Add Text to Image
Add text to any image online: pick a font, size, color and outline, drag the caption into place and download the result. Free and private.
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Imgflip is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.