Migrate from GIPHY.

Change the host and API key, then check the routes and media renditions used by your integration.

Host and API key

Replace https://api.giphy.com with https://heypster-gif.com/giphy, then use your heypster key in api_key. Keep the paths listed in the following table.

cURL · Before and after
# GIPHY
curl 'https://api.giphy.com/v1/gifs/search?api_key=YOUR_GIPHY_API_KEY&q=party'

# heypster
curl 'https://heypster-gif.com/giphy/v1/gifs/search?api_key=YOUR_HEYPSTER_API_KEY&q=party'

Route mapping

GIPHY route mappings
GIPHY pathheypster pathReference
/v1/gifs/search/giphy/v1/gifs/searchSearch
/v1/gifs/trending/giphy/v1/gifs/trendingTrending
/v1/gifs/translate/giphy/v1/gifs/translateGIF by intent
/v1/gifs/random/giphy/v1/gifs/randomRandom GIF
/v1/gifs/{id}/giphy/v1/gifs/{id}GIF by ID
/v1/gifs?ids=…/giphy/v1/gifs?ids=…List GIFs by ID
/v1/gifs/search/tags/giphy/v1/gifs/search/tagsAutocomplete
/v1/gifs/categories/giphy/v1/gifs/categoriesCategories
/v1/tags/related/{term}/giphy/v1/tags/related/{term}Related tags
/v1/trending/searches/giphy/v1/trending/searchesTrending searches
/v1/randomid/giphy/v1/randomidRandom ID
/v1/emoji/giphy/v1/emojiEmoji collection v1
/v2/emoji/giphy/v2/emojiEmoji collection v2
/v2/emoji/{emoji_id}/variations/giphy/v2/emoji/{emoji_id}/variationsEmoji variations

Parameters to check

GIPHY parameters
ParameterMigration
api_keyUse your heypster key.
q, limit, offset, langKeep the parameters supported by the route you use.
idsKeep the comma-separated list for batch lookup.
term, emoji_idSubstitute your values for the path parameters.
rating, weirdness, bundle, fieldsCheck these options before carrying them over. They fall outside the documented compatibility contract.

Read responses

Keep reading data, meta, and images. Check that pagination is present before calculating the next page. Emoji collections can be empty. On an emoji object, url points to its image.

JavaScript · Normalize a single result or list
const { data, pagination, meta } = await response.json();
const items = Array.isArray(data) ? data : [data].filter(Boolean);
const currentOffset = pagination?.offset ?? null;
const status = meta?.status;

Check original, fixed_width, fixed_height, downsized, and preview_gif, depending on your use case. Review any secondary fields your code reads, such as analytics, user, source_tld, and alt_text.

View media formats and fields

JavaScript example

JavaScript · Migrate a search
export async function searchGifs(query, apiKey, offset = 0) {
  const url = new URL('https://heypster-gif.com/giphy/v1/gifs/search');
  url.search = new URLSearchParams({
    api_key: apiKey,
    q: query,
    limit: '24',
    offset: String(offset),
    lang: 'fr',
  });

  const response = await fetch(url);
  if (!response.ok) throw new Error('HTTP ' + response.status);

  const { data, pagination, meta } = await response.json();
  return { items: data, pagination, meta };
}
cURL · Categories, tags, and emoji
curl 'https://heypster-gif.com/giphy/v1/gifs/categories?api_key=YOUR_HEYPSTER_API_KEY'

curl 'https://heypster-gif.com/giphy/v1/tags/related/party?api_key=YOUR_HEYPSTER_API_KEY'

curl 'https://heypster-gif.com/giphy/v1/randomid?api_key=YOUR_HEYPSTER_API_KEY'

curl 'https://heypster-gif.com/giphy/v2/emoji/1/variations?api_key=YOUR_HEYPSTER_API_KEY'

Verify the migration

  1. Confirm the host and key used by your test app.
  2. Test search, trending, random results, and lookup by ID.
  3. Check any additional routes you use, such as categories, related tags, and emoji.
  4. Compare consecutive pages and the handling of empty results.
  5. Test GIF, WebP, and MP4 rendering in your client. Remove dependencies on WebM.
  6. Check the optional parameters and secondary fields your interface relies on.