GIPHY-compatible API

Move from GIPHY to Heypster without rewriting your integration

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.

/v1

Paths aligned with GIPHY

JSON

Schema designed to minimize regressions

Fetch

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`);

API Quickstart Guide

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`.

Useful shortcut: if your code already uses a variable such as `GIPHY_API_BASE_URL`, replace it with `https://heypster-gif.com/giphy` and keep the same `/v1/...` suffixes.

1. Test a search request

curl "https://heypster-gif.com/giphy/v1/gifs/search?api_key=YOUR_HEYPSTER_API_KEY&q=party&limit=12&lang=en"

2. Do the same in JavaScript

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;
}

3. Use the same renditions as GIPHY

const gif = payload.data[0];

const originalUrl = gif.images.original.url;
const fixedWidthUrl = gif.images.fixed_width.url;
const previewGif = gif.images.preview_gif.url;

4. Other available endpoints

# 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"

GIF Endpoints

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.

Search Endpoint

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.
rating g Content filter.

Trending Endpoint

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.
rating pg-13 Editorial or product filter.

Translate Endpoint

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 thumbs up Intent or short phrase.
weirdness 3 Variation level if enabled on your deployment.

Random Endpoint

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.
rating g Content filter.

Get GIF by ID / IDs

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.

Autocomplete, Categories & Related Tags

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.

Trending Searches & Random ID

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.
none - These endpoints do not require additional route parameters.

Emoji API

Returns the emoji collection and per-id variations for integrations using GIPHY emoji endpoints.

/giphy/v1/emoji /giphy/v2/emoji /giphy/v2/emoji/{emoji_id}/variations
Parameter Example Description
api_key YOUR_HEYPSTER_API_KEY Heypster API key.
emoji_id 1 Identifier for `/v2/emoji/{emoji_id}/variations`.

Response Schema

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`.

meta

Status, message, and response identifier.

images

Ready-to-use renditions such as `original`, `fixed_width`, `fixed_height`, `downsized`, and `preview_gif`.

{
  "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.gif",
          "width": "480",
          "height": "270"
        },
        "fixed_width": {
          "url": "https://cdn.heypster.example/fixed_width.gif",
          "width": "200",
          "height": "113"
        },
        "preview_gif": {
          "url": "https://cdn.heypster.example/preview.gif"
        }
      }
    }
  ],
  "pagination": {
    "total_count": 500,
    "count": 25,
    "offset": 0
  },
  "meta": {
    "status": 200,
    "msg": "OK",
    "response_id": "heypster-response-id"
  }
}

Best Practices

  • Keep your existing GIPHY parser as long as your app mostly reads `data`, `pagination`, `meta`, and `images`.
  • Request only the renditions you actually need to reduce bandwidth on web and mobile.
  • Keep `limit` and `offset` client-side to preserve identical pagination behavior during migration.
  • Cache suggestions and trending feeds server-side if your traffic or quota profile requires it.

Support & onboarding

If you are migrating an existing GIPHY integration, we can help validate endpoint mappings, required renditions, and any product-specific fields.

contact@heypster.com