
Gif Search
Search and fetch GIFs from Tenor using the public API with curl or PowerShell, ...
Install
npx skills add taracodlabs/aiden --skill gif-search -g -a claude-code -y- Repository
- taracodlabs/aiden868
- Category
- Engineering
- Updated
- 16d ago
- License
- Apache-2.0
- Context cost
- Lightabout 898 tokens
- Runs scripts
- No, instructions only
What it does
Search and fetch GIFs from Tenor using the public API with curl or PowerShell, requires a free Tenor API key
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)
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
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
$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}}
