API documentation.

Integrate heypster GIF search. Find GIPHY-compatible routes, parameters, and example requests and responses.

Overview

Use the REST API to connect the heypster GIF catalog to your app or custom picker. The GIPHY-compatible API is available at https://heypster-gif.com/giphy. The paths below are relative to that address.

Choose an SDK · Migrate from GIPHY · Migrate from Tenor

Getting started

GIPHY-compatible routes use the base URL https://heypster-gif.com/giphy. Append a path such as /v1/gifs/search. For GIPHY-compatible requests, send your key in api_key. Native heypster clients can also use the HEYPSTER-API-KEY header.

cURL · Search for a GIF
curl --get 'https://heypster-gif.com/giphy/v1/gifs/search' \
  --data-urlencode "api_key=$HEYPSTER_API_KEY" \
  --data-urlencode 'q=celebration' \
  --data-urlencode 'limit=12' \
  --data-urlencode 'lang=fr'
JavaScript · Read the results
async function searchGifs(query, apiKey) {
  const request = new URL(
    'https://heypster-gif.com/giphy/v1/gifs/search'
  );
  request.search = new URLSearchParams({
    api_key: apiKey, q: query, limit: '12', lang: 'fr',
  });
  const response = await fetch(request);
  if (!response.ok) throw new Error('HTTP ' + response.status);
  const { data } = await response.json();
  return data;
}

Try a request in the demo or contact heypster for access.

API routes

All routes in this reference use GET. Select a route to see its parameters and copy an example.

All routes
FunctionPath
Search/v1/gifs/search
Trending/v1/gifs/trending
GIF by intent/v1/gifs/translate
Random GIF/v1/gifs/random
GIF by ID/v1/gifs/{id}
List GIFs by ID/v1/gifs ?ids=…
Autocomplete/v1/gifs/search/tags
Categories/v1/gifs/categories
Related tags/v1/tags/related/{term}
Trending searches/v1/trending/searches
Random ID/v1/randomid
Emoji collection v1/v1/emoji
Emoji collection v2/v2/emoji
Emoji variations/v2/emoji/{emoji_id}/variations

Search and GIFs

GIF by intent

GET /v1/gifs/translate

Get a single GIF for a short phrase. The q parameter is the fallback when s is absent.

Parameters · GIF by intent
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
sthumbs upPhrase to translate into a GIF.
qthumbs upFallback parameter.
cURL · GIF by intent
curl 'https://heypster-gif.com/giphy/v1/gifs/translate?api_key=YOUR_HEYPSTER_API_KEY&s=thumbs+up'

Random GIF

GET /v1/gifs/random

Retrieve a random GIF, optionally filtered by tag.

Parameters · Random GIF
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
tagcelebrationOptional tag.
cURL · Random GIF
curl 'https://heypster-gif.com/giphy/v1/gifs/random?api_key=YOUR_HEYPSTER_API_KEY&tag=celebration'

GIF by ID

GET /v1/gifs/{id}

Retrieve a GIF by its heypster ID.

Parameters · GIF by ID
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
idabc123ID in the path.
cURL · GIF by ID
curl 'https://heypster-gif.com/giphy/v1/gifs/abc123?api_key=YOUR_HEYPSTER_API_KEY'

List GIFs by ID

GET /v1/gifs

Retrieve several GIFs in one request using ids.

Parameters · List GIFs by ID
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
idsabc123,def456Comma-separated IDs.
cURL · List GIFs by ID
curl 'https://heypster-gif.com/giphy/v1/gifs?api_key=YOUR_HEYPSTER_API_KEY&ids=abc123%2Cdef456'

Discovery

Autocomplete

GET /v1/gifs/search/tags

Suggest terms as the user types a search.

Parameters · Autocomplete
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
qparSearch prefix.
limit25Maximum number of results.
offset0Number of results to skip.
cURL · Autocomplete
curl 'https://heypster-gif.com/giphy/v1/gifs/search/tags?api_key=YOUR_HEYPSTER_API_KEY&q=par&limit=5'

Categories

GET /v1/gifs/categories

Retrieve categories for browsing the GIF catalog.

Parameters · Categories
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
cURL · Categories
curl 'https://heypster-gif.com/giphy/v1/gifs/categories?api_key=YOUR_HEYPSTER_API_KEY'

Random ID

GET /v1/randomid

Get a random ID for integrations that use this route.

Parameters · Random ID
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
cURL · Random ID
curl 'https://heypster-gif.com/giphy/v1/randomid?api_key=YOUR_HEYPSTER_API_KEY'

Emoji

Emoji collection v1

GET /v1/emoji

Retrieve the emoji collection in the compatible format. The object’s url field points to the image.

Parameters · Emoji collection v1
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
qsmileSearch filter.
limit25Maximum number of results.
offset0Number of results to skip.
cURL · Emoji collection v1
curl 'https://heypster-gif.com/giphy/v1/emoji?api_key=YOUR_HEYPSTER_API_KEY&q=smile&limit=10'

Emoji collection v2

GET /v2/emoji

Retrieve the emoji collection through the v2 route.

Parameters · Emoji collection v2
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
qsmileSearch filter.
limit25Maximum number of results.
offset0Number of results to skip.
cURL · Emoji collection v2
curl 'https://heypster-gif.com/giphy/v2/emoji?api_key=YOUR_HEYPSTER_API_KEY&q=smile&limit=10'

Emoji variations

GET /v2/emoji/{emoji_id}/variations

Retrieve variations of an emoji. The response contains data: [] when none are available.

Parameters · Emoji variations
ParameterExampleUse
api_keyYOUR_HEYPSTER_API_KEYheypster API key.
emoji_id1Emoji ID in the path.
cURL · Emoji variations
curl 'https://heypster-gif.com/giphy/v2/emoji/1/variations?api_key=YOUR_HEYPSTER_API_KEY'

Response schema

Response fields
FieldContents
dataAn object or an array, depending on the route. A collection with no results returns an empty array.
paginationPresent in paginated collections. Includes total_count, count, and offset.
metaResponse information, including status, msg, and response_id.
data[].imagesRenditions of each GIF. In a single-item response, read data.images.
JSON · Paginated response example
{
  "data": [
    {
      "id": "abc123",
      "title": "Celebration",
      "url": "https://example.com/gifs/abc123",
      "slug": "celebration-abc123",
      "rating": "g",
      "images": {
        "original": {
          "url": "https://cdn.heypster.example/celebration-mini.gif",
          "width": "",
          "height": "",
          "mp4": "https://cdn.heypster.example/celebration.mp4",
          "webp": "https://cdn.heypster.example/celebration-mini.gif"
        },
        "fixed_width": {
          "url": "https://cdn.heypster.example/celebration-fixed-width.gif",
          "width": "",
          "height": "",
          "mp4": "https://cdn.heypster.example/celebration-fixed-width.mp4",
          "webp": "https://cdn.heypster.example/celebration-fixed-width.gif"
        },
        "preview_gif": {
          "url": "https://cdn.heypster.example/celebration-preview.gif"
        },
        "preview": {
          "mp4": "https://cdn.heypster.example/celebration-preview.mp4"
        }
      }
    }
  ],
  "pagination": {
    "total_count": 48,
    "count": 1,
    "offset": 0
  },
  "meta": {
    "status": 200,
    "msg": "OK",
    "response_id": "example-response"
  }
}

The URLs in this JSON illustrate the response structure. In an integration, use the URLs returned in images. The webp field can point to the same GIF file as url, as shown here.

Formats and renditions

The catalog offers GIF, GIF Mini, MP4 H.265, and MP4 H.264. The GIPHY-compatible API uses gif_mini for image renditions and H.264 for video renditions. Depending on the rendition, it exposes url, webp, and mp4. WebM is outside this API contract.

Media renditions
UseField to read
Main GIFimages.original.url
Grid or pickerimages.fixed_width.url or images.fixed_height.url
Optimized GIFimages.downsized.url
GIF previewimages.preview_gif.url
MP4 previewimages.preview.mp4
MP4 video (H.264)images.original.mp4

Pagination and errors

Start at offset=0 and set limit to the number of results you want. For the next page, use the number of items actually returned. Single-item responses and some utility responses contain only data and meta.

JavaScript · Calculate the next page
function getNextOffset(pagination) {
  if (!pagination || pagination.count === 0) return null;
  const next = pagination.offset + pagination.count;
  return next < pagination.total_count ? next : null;
}

Check the HTTP status before reading data. Handle request errors, single results, and empty collections separately.

Supported languages.

The official Flutter SDK repository lists 42 languages supported for search. The codes below are published in the Web SDK documentation, where language selects a secondary picker language. Keyword and tag searches in the Web SDK run in English. The REST route /v1/gifs/search documents its own lang parameter, for example fr.

  • German de
  • English en
  • Arabic ar
  • Breton br
  • Bulgarian bg
  • Catalan ca
  • Simplified Chinese zh
  • Traditional Chinese zh-TW
  • Korean ko
  • Croatian hr
  • Danish da
  • Spanish es
  • Estonian et
  • Finnish fi
  • Français fr
  • Greek el
  • Hebrew he
  • Hindi hi
  • Hungarian hu
  • Indonesian id
  • Irish ga
  • Italian it
  • Japanese ja
  • Latvian lv
  • Lithuanian lt
  • Malay ms
  • Maltese mt
  • Dutch nl
  • Norwegian no
  • Polish pl
  • Portuguese pt
  • Romanian ro
  • Russian ru
  • Serbian sr
  • Slovak sk
  • Slovenian sl
  • Swedish sv
  • Czech cs
  • Thai th
  • Turkish tr
  • Ukrainian uk
  • Vietnamese vi

Web SDK reference · Flutter reference

SDKs and integration.

SDK installation methods
PlatformInstallationReference
AppleSwift Package ManagerApple repository
AndroidAAR module and GradleAndroid repository
FlutterGit dependencyFlutter repository
Webnpm install heypster-gifJavaScript SDK

Explore code examples, read the SDK guides, or follow the quickstart.

Best practices.

  • Choose the media rendition your interface needs to reduce bandwidth use.
  • Handle single results separately from paginated collections.
  • Keep numeric pagination with limit and offset on routes that support it.
  • Before going live, check the formats and parameters your client actually uses.

Read the GIPHY and Tenor guides.