GIPHY-compatible API
Heypster API keeps the most common GIPHY REST primitives: same endpoint logic, same response envelope, and the same rendition-oriented object model. On `heypster-gif.com`, this layer is exposed under the `/giphy` prefix.
In most cases, migration is limited to replacing `https://api.giphy.com` with `https://heypster-gif.com/giphy` and swapping the API key, while keeping your `data`, `pagination`, `meta`, and `images` parsers intact.
Paths aligned with GIPHY
Schema designed to minimize regressions
Fast front-end and back-end migration
Migration principle
const GIPHY_URL = 'https://api.giphy.com';
const HEYPSTER_URL = 'https://heypster-gif.com/giphy';
// same path, new host
fetch(`${HEYPSTER_URL}/v1/gifs/search?api_key=YOUR_HEYPSTER_API_KEY&q=celebration`);
The examples below directly target the GIPHY-compatible layer exposed on `https://heypster-gif.com/giphy`. Routes are protected by the `giphy.apikey` middleware; if your implementation mirrors GIPHY, continue to send `api_key`.
curl "https://heypster-gif.com/giphy/v1/gifs/search?api_key=YOUR_HEYPSTER_API_KEY&q=party&limit=12&lang=en"
const HEYPSTER_API_HOST = 'https://heypster-gif.com/giphy';
const HEYPSTER_API_KEY = 'YOUR_HEYPSTER_API_KEY';
async function searchGifs(query) {
const response = await fetch(
`${HEYPSTER_API_HOST}/v1/gifs/search?api_key=${HEYPSTER_API_KEY}&q=${encodeURIComponent(query)}&limit=12&lang=en`
);
const payload = await response.json();
return payload.data;
}
const gif = payload.data[0];
const originalUrl = gif.images.original.url;
const originalMp4 = gif.images.original.mp4;
const originalWebp = gif.images.original.webp;
const fixedWidthUrl = gif.images.fixed_width.url;
const previewGif = gif.images.preview_gif.url;
# Categories
curl "https://heypster-gif.com/giphy/v1/gifs/categories?api_key=YOUR_HEYPSTER_API_KEY"
# Trending searches
curl "https://heypster-gif.com/giphy/v1/trending/searches?api_key=YOUR_HEYPSTER_API_KEY"
# Random ID
curl "https://heypster-gif.com/giphy/v1/randomid?api_key=YOUR_HEYPSTER_API_KEY"
# Emoji variations
curl "https://heypster-gif.com/giphy/v2/emoji/1/variations?api_key=YOUR_HEYPSTER_API_KEY"
The structure below follows the same reading flow as GIPHY docs: each endpoint keeps a familiar REST path and a contract designed to reduce refactoring.
Primary search endpoint for keywords, reactions, and editorial queries. This is usually the closest match for existing GIPHY integrations.
/giphy/v1/gifs/search
| Parameter | Example | Description |
|---|---|---|
api_key |
YOUR_HEYPSTER_API_KEY |
Heypster API key. |
q |
happy birthday |
Search query. |
limit |
25 |
Maximum number of results. |
offset |
0 |
Numeric pagination compatible with GIPHY. |
lang |
fr |
Optional user language. |
Returns currently relevant GIFs. Ideal for home feeds, pickers, and default suggestions.
/giphy/v1/gifs/trending
| Parameter | Example | Description |
|---|---|---|
api_key |
YOUR_HEYPSTER_API_KEY |
Heypster API key. |
limit |
20 |
Maximum number of results. |
offset |
0 |
Trending pagination. |
Returns a single GIF for a user intent. Useful to quickly turn an action into an animated reaction.
/giphy/v1/gifs/translate
| Parameter | Example | Description |
|---|---|---|
api_key |
YOUR_HEYPSTER_API_KEY |
Heypster API key. |
s / q |
thumbs up |
`s` is the primary parameter; `q` is accepted as a fallback. |
Returns a random GIF, optionally filtered by tag. Useful for lightweight experiences or editorial slots.
/giphy/v1/gifs/random
| Parameter | Example | Description |
|---|---|---|
api_key |
YOUR_HEYPSTER_API_KEY |
Heypster API key. |
tag |
celebration |
Optional tag. |
Use this to reload already selected GIFs, restore history, or resolve stored IDs.
/giphy/v1/gifs/{id} and /giphy/v1/gifs?ids=...
| Parameter | Example | Description |
|---|---|---|
api_key |
YOUR_HEYPSTER_API_KEY |
Heypster API key. |
id |
xT9IgDEI1iZyb2wqo8 |
Single asset identifier. |
ids |
abc,def,ghi |
Comma-separated list of asset identifiers. |
Completes user queries, returns categories, and provides related tags to enrich discovery experiences.
/giphy/v1/gifs/search/tags
/giphy/v1/gifs/categories
/giphy/v1/tags/related/{term}
| Parameter | Example | Description |
|---|---|---|
api_key |
YOUR_HEYPSTER_API_KEY |
Heypster API key. |
q |
par |
Search prefix for autocomplete. |
term |
party |
Term used for `/tags/related/{term}`. |
limit |
5 |
Maximum suggestion count. |
offset |
0 |
Numeric offset for GIPHY-style list endpoints. |
Exposes trending searches and a random identifier for flows compatible with common GIPHY usage patterns.
/giphy/v1/trending/searches
/giphy/v1/randomid
| Parameter | Example | Description |
|---|---|---|
api_key |
YOUR_HEYPSTER_API_KEY |
Heypster API key. |
limit / offset |
25 / 0 |
Available for `/trending/searches`. |
none |
- |
No additional parameters for `/randomid`. |
Returns the emoji collection and per-id variations for integrations using GIPHY emoji endpoints. Objects are exposed in a GIPHY-like sticker shape, `url` points directly to the image asset, and `/v2/emoji/{emoji_id}/variations` returns `data: []` when no variation exists.
/giphy/v1/emoji
/giphy/v2/emoji
/giphy/v2/emoji/{emoji_id}/variations
| Parameter | Example | Description |
|---|---|---|
api_key |
YOUR_HEYPSTER_API_KEY |
Heypster API key. |
q |
smile |
Search filter for emoji collections. |
limit / offset |
25 / 0 |
Available on `/v1/emoji` and `/v2/emoji`. |
emoji_id |
1 |
Identifier for `/v2/emoji/{emoji_id}/variations`. |
For a smooth migration, keep your parsing logic focused on these four blocks.
data
Array of GIF objects or a single object depending on the endpoint.
pagination
Pagination block with `total_count`, `count`, and `offset`, present on paginated collection endpoints.
meta
Status, message, and response identifier.
images
GIPHY-like renditions ready to consume. Image URLs are derived from `gif_mini`, video URLs from `h264`, with `webp` and `mp4`, and no `webm`.
{
"data": [
{
"id": "abc123",
"title": "celebration",
"url": "https://your-heypster-app/gifs/abc123",
"slug": "celebration-abc123",
"rating": "g",
"images": {
"original": {
"url": "https://cdn.heypster.example/original-mini.gif",
"width": "",
"height": "",
"mp4": "https://cdn.heypster.example/original.mp4",
"webp": "https://cdn.heypster.example/original-mini.gif"
},
"fixed_width": {
"url": "https://cdn.heypster.example/fixed_width.gif",
"width": "",
"height": "",
"mp4": "https://cdn.heypster.example/fixed_width.mp4",
"webp": "https://cdn.heypster.example/fixed_width.gif"
},
"preview_gif": {
"url": "https://cdn.heypster.example/preview.gif"
},
"preview": {
"mp4": "https://cdn.heypster.example/preview.mp4"
}
}
}
],
"pagination": {
"total_count": 500,
"count": 25,
"offset": 0
},
"meta": {
"status": 200,
"msg": "OK",
"response_id": "heypster-response-id"
}
}