> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fucksornot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Uploads

> Browse and filter uploads

## List All Uploads

Get a paginated list of all public uploads.

### Request

```bash theme={null}
curl "https://fucksornot.com/api/uploads?page=1&limit=10"
```

### Parameters

| Parameter | Type    | Default | Description              |
| --------- | ------- | ------- | ------------------------ |
| `page`    | integer | 1       | Page number (1-indexed)  |
| `limit`   | integer | 10      | Items per page (max 100) |

### Response

```json theme={null}
{
  "uploads": [
    {
      "id": "upload-uuid",
      "user_id": "user-uuid",
      "filename": "abc123.webp",
      "description": "Cool gadget",
      "upload_type": "image",
      "upvotes": 42,
      "downvote_count": 5,
      "created_at": "2025-01-24T12:00:00Z",
      "tags": [...],
      "username": "johndoe"
    }
  ],
  "page": 1,
  "limit": 10
}
```

***

## Filter by Tags

Get uploads filtered by tags.

### Request

```bash theme={null}
curl "https://fucksornot.com/api/uploads/filtered?tags=gadget,tech&page=1"
```

### Parameters

| Parameter | Type    | Default | Description                          |
| --------- | ------- | ------- | ------------------------------------ |
| `tags`    | string  | -       | Comma-separated tag names to include |
| `page`    | integer | 1       | Page number                          |
| `limit`   | integer | 10      | Items per page (max 100)             |

### Example: Related Content

Get uploads with similar tags:

```bash theme={null}
curl "https://fucksornot.com/api/uploads/filtered?tags=gadget&page=1&limit=10"
```

### Response

```json theme={null}
{
  "uploads": [
    {
      "id": "upload-uuid",
      "user_id": "user-uuid",
      "filename": "abc123.webp",
      "description": "Cool gadget",
      "upload_type": "image",
      "upvotes": 42,
      "downvote_count": 5,
      "created_at": "2025-01-24T12:00:00Z",
      "tags": [...],
      "username": "johndoe"
    }
  ],
  "total": 37,
  "page": 1,
  "limit": 10
}
```

***

## Recent Items

Get the 6 most recently uploaded items.

### Request

```bash theme={null}
curl https://fucksornot.com/api/items-recent
```

### Response

```json theme={null}
{
  "items": [...],
  "type": "recent"
}
```

<Note>
  This endpoint is cached for 5 minutes.
</Note>

***

## Top Voted Items

Get the highest voted items.

### Request

This endpoint takes **no query parameters**. It always returns the top 6 items ranked by votes — there is no way to change the count, page through results, or filter by time range.

```bash theme={null}
curl https://fucksornot.com/api/items-top-voted
```

### Response

```json theme={null}
{
  "items": [...],
  "type": "top-voted"
}
```

***

## Caching

| Endpoint               | Cache Duration |
| ---------------------- | -------------- |
| `/api/uploads`         | 2 minutes      |
| `/api/items-recent`    | 5 minutes      |
| `/api/items-top-voted` | 5 minutes      |
