# Gif Search

Search and fetch GIFs from Tenor using the public API with curl or PowerShell, ...

- Repository: https://github.com/taracodlabs/aiden (868 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-19
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add taracodlabs/aiden --skill gif-search -g -a claude-code -y`
Codex: `npx skills add taracodlabs/aiden --skill gif-search -g -a codex -y`
Cursor: `npx skills add taracodlabs/aiden --skill gif-search -g -a cursor -y`
Gemini CLI: `npx skills add taracodlabs/aiden --skill gif-search -g -a gemini-cli -y`

## Description

Search and fetch GIFs from Tenor using the public API with curl or PowerShell, requires a free Tenor API key

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# GIF Search via Tenor

Search and fetch GIFs using the Tenor API. Obtain a free API key at
https://developers.google.com/tenor/guides/quickstart (takes 2 minutes) and set it as
the `TENOR_API_KEY` environment variable. All examples below use `$env:TENOR_API_KEY`
(PowerShell) or `os.environ["TENOR_API_KEY"]` (Python).

## When to Use

- User wants to find a GIF for a given mood, reaction, or topic
- User wants to share a GIF URL in a chat or document
- User wants to download a GIF file locally
- User wants to embed a GIF in a web page or email

## How to Use

### 1. Search GIFs with PowerShell (no API key needed)

```powershell
function Search-Gif($query, $limit = 5) {
  $q    = [Uri]::EscapeDataString($query)
  $url  = "https://tenor.googleapis.com/v2/search?q=$q&limit=$limit&key=$env:TENOR_API_KEY"
  $resp = Invoke-RestMethod -Uri $url
  $resp.results | ForEach-Object {
    [PSCustomObject]@{
      Title    = $_.title
      GifUrl   = $_.media_formats.gif.url
      PreviewUrl = $_.media_formats.tinygif.url
    }
  }
}

# Usage
Search-Gif "excited celebration" | Format-Table -AutoSize
```

### 2. Search GIFs with Python

```python
import requests, urllib.parse

def search_gif(query, limit=5, api_key=None):
  api_key = api_key or os.environ.get("TENOR_API_KEY", "")
  params = {"q": query, "limit": limit, "key": api_key}
  resp   = requests.get("https://tenor.googleapis.com/v2/search", params=params)
  resp.raise_for_status()
  results = resp.json().get("results", [])
  return [{"title": r["title"], "url": r["media_formats"]["gif"]["url"]} for r in results]

gifs = search_gif("happy dancing")
for g in gifs:
  print(g["title"])
  print(g["url"])
  print()
```

### 3. Get trending GIFs

```powershell
$url  = "https://tenor.googleapis.com/v2/featured?limit=10&key=$env:TENOR_API_KEY"
$resp = Invoke-RestMethod -Uri $url
$resp.results | Select-Object title, @{N="url";E={$_.media_formats.gif.url}}
```

### 4. Download a GIF to disk

The rest: https://github.com/taracodlabs/aiden/blob/HEAD/workspace-templates/skills/gif-search/SKILL.md
