Tenor

From Archiveteam
Jump to navigation Jump to search

Tenor (originally Riffsy)[2] is a GIF sharing site that was acquired by Google in 2018.[3] Its API is notably used by Discord and Twitter.

API

The current API is hosted on https://tenor.googleapis.com/v2/, and endpoints are documented at https://developers.google.com/tenor/guides/endpoints[IAWcite.today].

Using the API requires an API key from the Google Cloud Console; key generation was disabled on 2026-01-13.[4]

Shutdown

Google announced through e-mail and Tenor's FAQ page that the Tenor API will be "decommissioned" and throw errors on 2026-06-30.[4]

Website

GIFs can be browsed on https://tenor.com[IAWcite.today], which hotlinks media from media1.tenor.com for GIFs and media.tenor.com for MP4s, previews, and "stickers".

Discovery

Tenor has the homepage, GIF pages, user pages, and search pages. These all display "suggested GIFs", and the first batch of JSON is inside the HTML as <script id="store-cache" type="text/x-cache" nonce="">.

  • On the homepage, store-cache.gifs.featured.results is an array with metadata for max 50 GIFs.
  • On GIF pages, store-cache.gifs.byId.<id>.results[0] is the GIF's own metadata and store-cache.gifs.related.<id>.results is an array with metadata of max 20 GIFs.
  • On user pages, store-cache.{gifs,memes,stickers}.searchByUsername.<username>-<type>-profile-public.results are all arrays with metadata for max 50 GIFs.
  • On search pages, store-cache.universal.search.<query>-low-all.results is an array with metadata for max 50 GIFs.

GIF metadata includes "tags", which can be used in search to discover more GIFs. For non-GIF pages, Tenor fetches more GIFs using the API after the batch has been scrolled past.

Media

Tenor appears to host media on at least three subdomains, which take a media ID and a filename (changing the filename gives the same media and does not change the format). These are:

Observed media IDs end in AAAXX, where "XX" are letters corresponding to the desired media format type[IAWcite.today]. These are:

  • AD: "preview" type, .png
  • Ae: "gifpreview" type, .png (the API returns the gifpreview URL ending in .png even though it is actually a GIF)
  • AC: "gif" type, .gif
  • Ad: "mediumgif" type, .gif
  • AM: "tinygif" type, .gif
  • AS: "nanogif" type, .gif
  • Po: "mp4" type, .mp4
  • Pw: "loopedmp4" type, .mp4
  • P1: "tinymp4" type, .mp4
  • P2: "nanomp4" type, .mp4
  • Ps: "webm" type, .webm
  • P3: "tinywebm" type, .webm
  • P4: "nanowebm" type, .webm
  • Ax: "webp" type, .webp
  • A1: "tinywebp" type, .webp
  • A2: "nanowebp" type, .webp
  • A3: "tinywebppreview" type, .webp
  • A4: "nanowebppreview" type, .webp
  • A5: "webppreview" type, .webp
  • Al: "webp_transparent" type, .webp, stickers only
  • Am: "tinywebp_transparent" type, .webp, stickers only
  • An: "nanowebp_transparent" type, .webp, stickers only
  • At: "webppreview_transparent" type, .webp, stickers only
  • Au: "tinywebppreview_transparent" type, .webp, stickers only
  • Av: "nanowebppreview_transparent" type, .webp, stickers only
  • Ai: "gif_transparent" type, .gif, stickers only
  • Aj: "tinygif_transparent" type, .gif, stickers only
  • Ak: "nanogif_transparent" type, .gif, stickers only

Due to serving an HTML page, media1.tenor.com in the browser may give 200s that others do not: transparent types for non-stickers and nonexistent media with image types are examples of this.

References