memecub

How do I search memes by keyword with an API for my Slack bot?

Use memecub's REST API to search memes by keyword: send a GET request with your query, get back matching memes, and post the image URL to Slack. The API costs 1 credit per search, and you can try it keyless with 20 searches a day. For a Slack bot, wrap the search in a slash command like /meme <keyword> and reply with the top result.

How the memecub API works

The memecub REST API lets you search the meme library by keyword. Each search call costs 1 credit. You can try it without a key: the keyless trial allows 20 searches a day.

A search returns meme results with fields like id, title, description, and image URL. Use the image URL to post the meme in Slack.

For AI agents, there is also a remote MCP server at https://memecub.com/mcp and a CLI you can run with npx memecub. A skill can be installed with npx skills add https://memecub.com into Claude Code, Codex, Cursor, and others.

Example: a Slack slash command that searches memes

Set up a Slack slash command (e.g., /meme) that points to your bot's endpoint. When a user types /meme <keyword>, your bot calls the memecub search API with that keyword.

Here is a minimal Node.js example using fetch (replace YOUR_API_KEY with your key, or omit for keyless trial):

const res = await fetch('https://memecub.com/api/search?q=' + encodeURIComponent(keyword), { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }); const data = await res.json(); const meme = data.results[0];

Then post the meme to Slack using chat.postMessage with the image URL in blocks or attachments. Handle errors like no results or rate limits gracefully.

When to use which meme

Pick memes that match the channel's tone. For developer channels, regex and bug memes work well. For general chat, use workplace or reaction memes.

If the search returns nothing fitting, you can use the AI meme maker at /generate to create a custom meme from a description. It takes about 10 seconds per image and costs 500 credits.

Remember that most memes are collected from the web and are for personal chats only; copyright stays with the original creators. For commercial use, enable the filter for openly licensed images.

Let your AI find the memes

REST API, remote MCP, CLI and a skill. Try 20 searches a day without a key.

More that fit

FAQ

How do I find a fitting meme by keyword through an API?

Call the memecub search endpoint with your keyword as a query parameter. The API returns matching memes with image URLs you can use directly.

How do I query a meme library by text from a bot?

From your bot, send an HTTP GET request to the memecub API with the text as the q parameter. Parse the JSON response and pick the first result or let the user choose.

How do I get a meme for a given phrase with an API?

Use the same search API with the phrase as the keyword. If no results match, consider using the AI meme maker to generate a custom meme from the phrase.

Is there a free trial for the memecub API?

Yes, the keyless trial allows 20 searches a day. Paid plans start with a free tier of 1000 credits a month, and credit packs are available from $5.