Developer API

Integrate GifHub GIFs into your applications, bots, and tools using our public REST API endpoints.

Quick Start

No API key required for read-only endpoints. All responses are JSON.

fetch('https://gifhub.app/api/gifs?sort=trending&limit=4')
.then(r => r.json())
.then(data => console.log(data.gifs))

Endpoints

GET/api/gifs

Fetch paginated GIFs with sorting and filtering

Parameters

NameTypeDescription
pagenumberPage number (default: 1)
limitnumberResults per page (default: 16, max: 50)
sortstring"latest" | "trending" | "popular"
category_idstringFilter by category UUID
qstringSearch query string

Example

https://gifhub.app/api/gifs?sort=trending&limit=8
GET/api/gifs/random

Get a random GIF slug for discovery features

Example

https://gifhub.app/api/gifs/random
GET/api/tags/popular

Get popular tags with usage counts

Example

https://gifhub.app/api/tags/popular
GET/api/stats

Get platform-wide statistics

Example

https://gifhub.app/api/stats

Response Format

The /api/gifs endpoint returns:

{
  "gifs": [
    {
      "id": "uuid",
      "title": "GIF title",
      "slug": "gif-slug",
      "url": "https://...gif",
      "altText": "Description",
      "views": 142,
      "likes": 8,
      "categorySlug": "saas",
      "subcategorySlug": "product-launch",
      "tags": ["celebration", "launch"]
    }
  ],
  "hasMore": true
}

Rate Limiting

Public endpoints are rate-limited to ensure fair usage. Please keep requests under 60 requests per minute per IP. For higher limits or commercial use, please contact us.