GIF Search (Tenor API)
Search and download GIFs directly via the Tenor API using curl. No extra tools needed.
When to use
Useful for finding reaction GIFs, creating visual content, and sending GIFs in chat.
Setup
Set your Tenor API key in your environment (add to ~/.hermes/.env):
TENOR_API_KEY=your_key_here
Get a free API key at https://developers.google.com/tenor/guides/quickstart — the Google Cloud Console Tenor API key is free and has generous rate limits.
Prerequisites
curl and jq (both standard on macOS/Linux)
TENOR_API_KEY environment variable
Search for GIFs
# Search and get GIF URLs
curl -s "https://tenor.googleapis.com/v2/search?q=thumbs+up&limit=5&key=${TENOR_API_KEY}" | jq -r '.results[].media_formats.gif.url'
# Get smaller/preview versions
curl -s "https://tenor.googleapis.com/v2/search?q=nice+work&limit=3&key=${TENOR_API_KEY}" | jq -r '.results[].media_formats.tinygif.url'
Download a GIF
# Search and download the top result
URL=$(curl -s "https://tenor.googleapis.com/v2/search?q=celebration&limit=1&key=${TENOR_API_KEY}" | jq -r '.results[0].media_formats.gif.url')
curl -sL "$URL" -o celebration.gif
Get Full Metadata
curl -s "https://tenor.googleapis.com/v2/search?q=cat&limit=3&key=${TENOR_API_KEY}" | jq '.results[] | {title: .title, url: .media_formats.gif.url, preview: .media_formats.tinygif.url, dimensions: .media_formats.gif.dims}'
API Parameters
| Parameter |
Description |
q |
Search query (URL-encode spaces as +) |
limit |
Max results (1-50, default 20) |
key |
API key (from $TENOR_API_KEY env var) |
media_filter |
Filter formats: gif, tinygif, mp4, tinymp4, webm |
contentfilter |
Safety: off, low, medium, high |
locale |
Language: en_US, es, fr, etc. |
Available Media Formats
Each result has multiple formats under .media_formats:
| Format |
Use case |
gif |
Full quality GIF |
tinygif |
Small preview GIF |
mp4 |
Video version (smaller file size) |
tinymp4 |
Small preview video |
webm |
WebM video |
nanogif |
Tiny thumbnail |
Notes
- URL-encode the query: spaces as
+, special chars as %XX
- For sending in chat,
tinygif URLs are lighter weight
- GIF URLs can be used directly in markdown:

1---2name: gif-search3description: "Search/download GIFs from Tenor via curl + jq."4version: 1.1.05author: community6license: MIT7platforms: [linux, macos, windows]8category: media9tags: [GIF, Media, Search, Tenor, API]10requires_commands: [curl, jq]11requires_env: [TENOR_API_KEY]12compatible: [claude-code, openai-agents, hermes-agent, autogen, langchain, any-llm]13source: built-in14---1516# GIF Search (Tenor API)1718Search and download GIFs directly via the Tenor API using curl. No extra tools needed.1920## When to use2122Useful for finding reaction GIFs, creating visual content, and sending GIFs in chat.2324## Setup2526Set your Tenor API key in your environment (add to `~/.hermes/.env`):2728```bash29TENOR_API_KEY=your_key_here30```3132Get a free API key at https://developers.google.com/tenor/guides/quickstart — the Google Cloud Console Tenor API key is free and has generous rate limits.3334## Prerequisites3536- `curl` and `jq` (both standard on macOS/Linux)37- `TENOR_API_KEY` environment variable3839## Search for GIFs4041```bash42# Search and get GIF URLs43curl -s "https://tenor.googleapis.com/v2/search?q=thumbs+up&limit=5&key=${TENOR_API_KEY}" | jq -r '.results[].media_formats.gif.url'4445# Get smaller/preview versions46curl -s "https://tenor.googleapis.com/v2/search?q=nice+work&limit=3&key=${TENOR_API_KEY}" | jq -r '.results[].media_formats.tinygif.url'47```4849## Download a GIF5051```bash52# Search and download the top result53URL=$(curl -s "https://tenor.googleapis.com/v2/search?q=celebration&limit=1&key=${TENOR_API_KEY}" | jq -r '.results[0].media_formats.gif.url')54curl -sL "$URL" -o celebration.gif55```5657## Get Full Metadata5859```bash60curl -s "https://tenor.googleapis.com/v2/search?q=cat&limit=3&key=${TENOR_API_KEY}" | jq '.results[] | {title: .title, url: .media_formats.gif.url, preview: .media_formats.tinygif.url, dimensions: .media_formats.gif.dims}'61```6263## API Parameters6465| Parameter | Description |66|-----------|-------------|67| `q` | Search query (URL-encode spaces as `+`) |68| `limit` | Max results (1-50, default 20) |69| `key` | API key (from `$TENOR_API_KEY` env var) |70| `media_filter` | Filter formats: `gif`, `tinygif`, `mp4`, `tinymp4`, `webm` |71| `contentfilter` | Safety: `off`, `low`, `medium`, `high` |72| `locale` | Language: `en_US`, `es`, `fr`, etc. |7374## Available Media Formats7576Each result has multiple formats under `.media_formats`:7778| Format | Use case |79|--------|----------|80| `gif` | Full quality GIF |81| `tinygif` | Small preview GIF |82| `mp4` | Video version (smaller file size) |83| `tinymp4` | Small preview video |84| `webm` | WebM video |85| `nanogif` | Tiny thumbnail |8687## Notes8889- URL-encode the query: spaces as `+`, special chars as `%XX`90- For sending in chat, `tinygif` URLs are lighter weight91- GIF URLs can be used directly in markdown: ``