Displaying curated GIFs from Giphy API without user search input

I’m working on a React project and need help with the Giphy API. I want to show specific GIFs on my page without letting users search for them.

Let’s say I want to create a page that only shows cooking GIFs or gaming reactions. How can I fetch and display these specific categories automatically when the page loads?

Also, I’d like to split these results into pages with maybe 8 GIFs per page. What’s the best way to handle this pagination?

I’ve searched around but can’t find clear examples of this approach. Any guidance would be really helpful!

hey! i tried this too last month. just call the giphy trending endpoint and put ‘q’ with topics like ‘cooking’ or ‘gaming’. for pagination, you’ll need the offset - start at 0 and add 8 for each page. it works great once setup!

Had this exact problem 6 months ago building a mood board feature. Skip trending - hit /v1/gifs/search directly with your keywords.

What worked: use q=cooking and limit=8 for cooking GIFs. For pagination, track your page state and calculate offset as page * 8.

Make these API calls in useEffect with hardcoded categories, not user input. I threw different categories in an array and added tabs for users to switch between them.

Built a simple pagination component that increments/decrements the page number and triggers a new fetch. Much cleaner than loading everything at once.

One gotcha - handle loading states properly. Giphy’s slow sometimes and you don’t want blank spaces where GIFs should be.