API Documentation

The OnlyPepes public API lets you fetch, search, and paginate through the full collection of pepe images. All endpoints return JSON.

GET /api/pepe

List, search, or randomly browse pepe images with pagination.

Query Parameters

ParameterTypeDefaultDescription
limitinteger1Results per page. Min 1, max 25.
pageinteger1Page number (1-indexed).
searchstringSearch query. Matches against tags and description via full-text search.
fieldstringtexttext for full-text search, id to look up by UUID.
sortstringcreated_at_desccreated_at_desc or created_at_asc. Ignored when random=true.
randombooleanfalseReturn results in random order.

Behavior

Response — Paginated (limit > 1)

GET https://onlypepes.com/api/pepe?limit=3&page=1&random=true
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "file_name": "550e8400-e29b-41d4-a716-446655440000.png",
      "file_ext": ".png",
      "file_size": 284012,
      "tags": [
        "smug",
        "classic"
      ],
      "description": "Classic smug Pepe with a subtle grin",
      "url": "https://onlypepes.com/images/550e8400-e29b-41d4-a716-446655440000.png",
      "phash": "a4c3b2d1e5f6...",
      "created_at": "2025-06-15T10:30:00.000Z",
      "updated_at": "2025-06-15T10:30:00.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "limit": 3,
      "total_items": 1842,
      "total_pages": 615,
      "has_next": true,
      "has_previous": false
    },
    "search": {
      "terms": "",
      "found": true
    },
    "sort": "created_at_desc"
  },
  "error": null
}

Response — Single (limit = 1)

GET https://onlypepes.com/api/pepe?search=smug
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "file_name": "550e8400-e29b-41d4-a716-446655440000.png",
    "file_ext": ".png",
    "file_size": 284012,
    "tags": [
      "smug",
      "classic"
    ],
    "description": "Classic smug Pepe with a subtle grin",
    "url": "https://onlypepes.com/images/550e8400-e29b-41d4-a716-446655440000.png",
    "phash": "a4c3b2d1e5f6...",
    "created_at": "2025-06-15T10:30:00.000Z",
    "updated_at": "2025-06-15T10:30:00.000Z"
  },
  "meta": {
    "search": {
      "terms": "smug",
      "found": true
    }
  },
  "error": null
}

Aliases

Equivalent paths: /api/pepe, /api/pepe_image, /api/public/pepe, /api/public/pepes.

GET /api/pepe/:id

Fetch a single pepe by its UUID.

Path Parameters

ParameterTypeDescription
idUUIDThe unique identifier of the pepe image.

Response — Success

GET https://onlypepes.com/api/pepe/550e8400-e29b-41d4-a716-446655440000
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "file_name": "550e8400-e29b-41d4-a716-446655440000.png",
    "file_ext": ".png",
    "file_size": 284012,
    "tags": [
      "smug",
      "classic"
    ],
    "description": "Classic smug Pepe with a subtle grin",
    "url": "https://onlypepes.com/images/550e8400-e29b-41d4-a716-446655440000.png",
    "phash": "a4c3b2d1e5f6...",
    "created_at": "2025-06-15T10:30:00.000Z",
    "updated_at": "2025-06-15T10:30:00.000Z"
  },
  "error": null
}

Response — Not Found

{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Pepe image not found: 550e8400-e29b-41d4-a716-446655440000"
  }
}
GET /images/:file_name

Serves the actual image file. The URL matches the url field returned by the API. Responses are served directly by nginx with 30-day immutable caching headers.

Error Responses

All errors follow the same shape. HTTP status codes used: 400 validation, 404 not found, 500 server error.

{
  "data": null,
  "error": {
    "code": "VALIDATION_ERROR | NOT_FOUND | INTERNAL_SERVER_ERROR",
    "message": "Human-readable description"
  }
}

Pepe Object Fields

FieldTypeDescription
idstring (UUID)Unique identifier.
file_namestringFile name including extension.
file_extstringFile extension (e.g. .png).
file_sizenumberFile size in bytes.
tagsstring[] | nullArray of tags, or null if untagged.
descriptionstring | nullHuman-readable description.
urlstringFull public URL to the image.
phashstringPerceptual hash for duplicate detection.
created_atstring (ISO 8601)When the image was added.
updated_atstring (ISO 8601)When the record was last modified.