GIPHY Alt Text for GIFs is now available! Email us to learn more at bd.team@giphy.com.
GIPHY Clips (GIFs with Sound)have arrived! Learn about adding Clips to your app in our documentation!
logo

What are Clips?

GIFs with Sound.

GIPHY Clips are GIFs with Sound. They combine the expression and entertainment of GIFs, with the added creative layer of audio. Millions of people use GIPHY to communicate and express themselves - GIPHY Clips brings new levels to that expression

Why Sound? Why Now?

People are already using short form video content to react, express and communicate. Fans are finding and sharing their favorite quotes, moments and characters.

With GIPHY Clips, we can scale this new form of expression to every conversation. We give users Clips directly from official partners, already cut to the most shareable moments, all organized and curated into a searchable library.


GIPHY Clips Search Endpoint

Returns list of video content from GIPHY's network content based on given query phase.

  • Access to Clips endpoints is only available upon approval. Please reach out to clips@giphy.com to request permission.
  • Optionally, use the &rating param to tailor the response per your preferences. Read more here about content ratings.
  • Optionally, you can use rendition on demand bundles to limit which renditions the API sends.

Request

GET /v1/clips/search
Request Parameters:Required:Description:
api_keyYesYour issued API key
qYesSearch phrase; Should be the exact terms the user searched for without any correction/enhancement.
Maximum length: 50 chars.
limitNoNumber of content to return from the offset. Defaults to 25.
offsetNoThe offset to start returning content. Defaults to 0.
country_codeNoThe country code, in ISO-3166-1 alpha-2 format. Defaults to automatic detection based on IP. Required if API is implemented via a proxy.
langNoThe language code, in ISO-639-1 format. Defaults to automatic detection based on IP.
ratingNoThe maximum rating of content to return. Defaults to R.

Response

Success 200
Error 4xx/5xx

GIPHY Clips Trending Endpoint

Returns list of trending video content from Giphy’s network

  • Access to Clips endpoints is only available upon approval. Please reach out to clips@giphy.com to request permission.
  • Optionally, use the &rating param to tailor the response per your preferences. Read more here about content ratings.
  • Optionally, you can use rendition on demand bundles to limit which renditions the API sends.

Request

GET /v1/clips/trending
Request Parameters:Required:Description:
api_keyYesYour issued API key
limitNoNumber of content to return from the offset (default 25)
offsetNoThe offset to start returning content (default 0)
country_codeNoThe country code, in ISO-3166-1 alpha-2 format. Defaults to automatic detection based on IP.
ratingNoThe maximum rating of content to return. Defaults to PG.

Response

Success 200
Error 4xx/5xx

Content By ID Endpoint

Same functionality as the Get GIF By ID endpoint, but generalized for any Giphy content (GIFs or Clips) based on given ID.

Request

GET /v1/content/:Id
Request Parameters:Required:Description:
api_keyYesYour issued API key
idYesID of the content (GIF, Sticker, Clip)

Response

Based on the content type of the given ID, the response

Success 200
Error 4xx/5xx

Content By Multiple IDs Endpoint

Same functionality as the Get GIF By IDs endpoint, but generalized for any GIPHY content (GIFs or Clips) based on given IDs.

Request

GET /v1/content
Request Parameters:Required:Description:
api_keyYesYour issued API key
idsYesID of the content (GIF, Sticker, Clip)

Response

Based on the content type of the given ID, the response

Success 200
Error 4xx/5xx

Clips Response Schema

The clip object is a variation of our publicly documented gif object. In addition to the properties provided by the gif object, clip objects have an additional video property that contains all of the media information for video format. The Pagination and Meta objects are also publicly documented.

PropertyTypeDescription
typestringIndicates the type of GIPHY asset, always “video” for clips
idstringUnique ID for a GIPHY asset
urlstringURL linking to the GIPHY - Be Animated page for the clip
embed_urlstringURL used to access a rich media player for the Clip
durationstringThe duration of the video expressed as seconds plus a portion of a second as a decimal.
usernamestringUsername the Clip is attached to, if applicable
sourcestringThe page on which this Clip was found
titlestringThe title that appears on GIPHY - Be Animated for the clip
ratingstringThe MPAA-style rating for this content. Accepted values are G, PG, PG-13 and R
ctaCTAAn optional object containing data for connections to third party applications for custom GIPHY partnerships when available for a Clip. For example, for this GIF we link to a specific track within the Spotify app.
imagesImage[]An object containing data for various available formats and sizes of this GIF version (i.e no sound) of Clip. Use any of these for previews in a scrollable grid. Check here for more details. We do not generate the following renditions for Clips: preview, preview_gif, looping, fixed_width_small, fixed_width_small_still, fixed_height_small, fixed_height_small_still, downsized_small, downsized_still, downsized
userUserAn object containing data about the user associated with this clip, if applicable. Check here for more details
videoVideoAn object that contains all of the media information for video format for the clip. Check here for more details

The Video Object

PropertyTypeDescription
descriptionstringAdditional information about a Clip
assetsObject

Similar to the images properties, this provides various video renditions with their rendition name as the property:

  • 360p
  • 480p
  • 720p
  • 1080p
  • 4k

The 360p rendition is always present by default. All other renditions will only be present if they are available.

Each rendition contains: width, height, url

captionsObject

This object provides URLs to caption files in Subrip and Webvtt format (if available) based on transcriptions from the clip audio in the native language.

Format of a captions object:

  • "captions": {
  •  "<string: ISO 639-1 language code>": {
  •   "srt": "<string: url to caption file>",
  •   "vtt": "<string: url to caption file>"
  •  }
  • }

Additionally the mp4 assets within the video object contain a captions stream too if available in the clip’s native language

nativestringISO 639-1 language code that is the native language caption for the clip. references property in captions object

Examples

API calls

Copy Code
# video search on "cats"
curl --location --max-time 1 --request GET 'https://api.giphy.com/v1 /clips/search?api_key={API_KEY}&q=cats&limit=5'
# first 10 trending videos
curl --location --max-time 1 --request GET 'https://api.giphy.com/v1 /clips/trending?api_key={API_KEY}&limit=10'

Video content on web

You can use a standard video element available in browsers to play a Clip. Fetch a Clip URL from one of the renditions returned in the videos object and instantiate the <video> component as follows:

Copy Code
<video src="some-giphy-rendition.mp4" autoPlay loop/>

Video content on iOS

The iOS SDK repo contains a Clips-specific sample project which showcases technical solutions playing back Clips in a UICollectionView. While this project features the SDK’s UI for discovering and searching for Clips, the video components used for playback in the UICollectionView are unreliant on the SDK and may serve as a useful resource for partners powering their integration with the GIPHY API.

Playing back a Clips video asset in your iOS app is easy thanks to Apple’s native APIs.

We recommend using the AVFoundation framework, including the AVPlayer, AVPlayerItem, AVPlayerLayer, AVQueuePlayer, and AVPlayerLooper components to support looping video playback.

Instantiate a player item with a Clips video asset url like so:

Copy Code
let playerItem = AVPlayerItem(url: url)

Create an AVQueuePlayer and AVPlayerLooper to take care of automatic looping.

Copy Code
let videoPlayer = AVQueuePlayer(items: [playerItem])
let playerLooper = AVPlayerLooper(player: videoPlayer, templateItem: playerItem)

Then, all that’s necessary is to set your AVQueuePlayer into the .player property of an AVPlayerLayer. Apple provides a useful code sample for setting up a simple Video Player View here.

Video content on Android

Similar to iOS, we have made source code for our looping video components available in the Android SDK repository. Learn more here and access the sample code here.

Playing back a Clips video asset in your Android app is best achieved with Google’s ExoPlayer, an application-level media player for Android. We recommend using ExoPlayer over Android MediaPlayer. And here is why:

MediaPlayer does not support smooth streaming

Exoplayer Supports caching out-of-the-box.

MediaPlayer is less customizable as compared to ExoPlayer.

The steps to get started with Exoplayer are described here:

Hello world! - ExoPlayer