In addition to Renditions on Demand, the GIPHY API allows you to request only the data you need, significantly reducing the response payload size.
Specify the fields parameter and provide a comma-separated list of requested fields, and the API will return only the requested data.
For example, to get back id, url and images:/v1/gifs/search?q=cat&fields=id,url,images&limit=2
{
data: [
{
id: "YRtLgsajXrz1FNJ6oy",
url: "https://giphy.com/gifs/moodman-YRtLgsajXrz1FNJ6oy",
images: {
...
},
},
{
id: "2x0VePimPaFJDpGZ7H",
url: "https://giphy.com/gifs/reaction-mood-2x0VePimPaFJDpGZ7H",
images: {
// all available renditions
},
},
],
pagination: { ... },
meta: { ... }
}Furthermore, you can filter fields within nested objects.
For instance, to get only original and downsized renditions, id and url fields: /v1/gifs/search?q=cat&fields=id,url,images.original,images.downsized&limit=2
{
data: [
{
id: "YRtLgsajXrz1FNJ6oy",
url: "https://giphy.com/gifs/moodman-YRtLgsajXrz1FNJ6oy",
images: {
original: { ... },
downsized: { ... },
},
},
{
id: "2x0VePimPaFJDpGZ7H",
url: "https://giphy.com/gifs/reaction-mood-2x0VePimPaFJDpGZ7H",
images: {
original: { ... },
downsized: { ... },
},
},
],
pagination: { ... },
meta: { ... }
}