How do I search GIFs by keyword with an API?
To search GIFs by keyword with an API, send an HTTP GET request to the search endpoint with your query as a parameter, for example: GET https://api.example.com/v1/gifs/search?q=cat&limit=10. The API returns a JSON list of GIFs with URLs, dimensions, and IDs. With memecub, you can use the REST API (1 credit per search) or try the keyless trial with 20 searches a day.
Send when your API query returns an unexpected error or takes forever.
For when your search query is so complex it queries itself.
A classic programmer joke to share when discussing SQL or API queries.
Use when your search filters are too specific and return nothing.
For nostalgia about jQuery and simple API calls.
When your query goes straight to production without testing.
When your food delivery API query returns NULL.
When users find a way to break your search interface.
How a GIF search API request works
A GIF search API typically exposes a REST endpoint like /search or /gifs/search. You send a GET request with query parameters: q for the keyword, limit for the number of results, and optionally offset for pagination. The API responds with JSON containing an array of GIF objects, each with a URL, width, height, and ID.
For example, a request to memecub's API might look like: GET https://api.memecub.com/v1/search?q=cat&limit=5. The response includes meme URLs and metadata. Authentication is via an API key in the header, but memecub offers a keyless trial of 20 searches per day.
When to use which GIF API
Choose a GIF API based on your needs: GIPHY and Tenor offer large libraries and SDKs; KLIPY focuses on GIFs, stickers, and memes; memecub specializes in memes and provides a REST API, MCP server, CLI, and skill for AI agents.
If you need memes for personal chats, memecub's API is a good fit. For commercial use, use the filter for openly licensed images. Always check the terms of service for each API.
How to send a request and handle the response
1. Get an API key (or use a keyless trial).
2. Construct the URL with your keyword and parameters.
3. Send the GET request using fetch or curl.
4. Parse the JSON response and extract the GIF URLs.
Example with fetch: const res = await fetch('https://api.memecub.com/v1/search?q=cat&limit=5', { headers: { 'Authorization': 'Bearer YOUR_KEY' } }); const data = await res.json(); console.log(data.results);
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 does a GIF search API work?
It accepts a keyword query and returns a list of matching GIFs in JSON format, often with pagination and filtering options.
What does a GIF search API request look like?
A typical request is a GET to an endpoint like /search?q=keyword&limit=10, with an API key in the header.
Is there a free GIF API?
Some APIs offer free tiers or trials. memecub provides a keyless trial with 20 searches a day and a free plan with 1000 credits a month.
Can I use memecub's API for commercial purposes?
Most memes are for personal use only. Use the filter for openly licensed images if you need commercial use.