Register for a GIPHY API key at developers.giphy.com; for production use, you must request a production API key (the default beta key has lower rate limits and is not licensed for production apps).
Search for GIFs by GETting https://api.giphy.com/v1/gifs/search?api_key={key}&q={query}&limit={n}&rating={rating}; the response includes an array of GIF objects each with multiple renditions under images.
Select the appropriate rendition: fixed_width for thumbnails, original for full quality, downsized for bandwidth-constrained contexts; each rendition has url, mp4, and webp variants.
Display the GIPHY Attribution Mark (powered by GIPHY logo/badge) wherever GIPHY content appears; this is required by the GIPHY API Terms of Service and must be visible to end users.
For trending content, use GET https://api.giphy.com/v1/gifs/trending; for random GIFs matching a tag, use GET https://api.giphy.com/v1/gifs/random?tag={tag}.
Known gotchas
The GIPHY API Terms of Service require displaying the GIPHY Attribution Mark (the 'Powered by GIPHY' badge or logo) wherever GIFs are displayed; omitting this branding is a ToS violation that can result in API access revocation.
Using the beta/development API key in a production app with real users violates GIPHY's ToS and the key has a lower rate limit (typically 42 requests/hour) that will cause failures under any real user load.
Direct hotlinking to GIPHY CDN URLs from production apps should be verified against the current Terms of Service; GIPHY periodically adjusts hotlinking policies and relying on direct CDN URLs without reviewing the ToS can cause content to stop loading.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp