API Documentation

Random CursedDB Media
Endpoint
/api/random-media/
Description

Get random images or videos from cursedDB. You can filter by tag, type, and specify how many you want.

Parameters
Parameter Type Required Description
type string No "image" (default) or "video"
tag string No Filter by tag
count integer No Number to return (1-10, default: 1)
Example Request (Images)
GET /api/random-media/?type=image&tag=cat&count=1
Example Response (Images)
{
    "images": [
        {
            "filename": "8105dcc39a5549a48323f7620a235586.png",
            "url": "https://schwein.dev/media/cursedDB/8105dcc39a5549a48323f7620a235586.png",
            "tags": [
                "frog"
            ]
        }
    ]
}
Example Request (Videos)
GET /api/random-media/?type=video&tag=cat&count=1
Example Response (Videos)
{
    "videos": [
        {
            "filename": "7a6c4264e5274252a83241430f3aca26.mp4",
            "url": "https://schwein.dev/media/cursedDB/7a6c4264e5274252a83241430f3aca26.mp4",
            "tags": [
                "horse"
            ]
        }
    ]
}
CursedDB Tags
Endpoint
/api/tags/
Description

Get a list of all available tags in the system.

Example Request
GET /api/tags/
Example Response
{
    "tags": [
        "AI",
        "NSFW",
        "baby",
        "banana"
    ]
}
User Profile
Endpoint
/api/user-profile/
Description

Get public user profile data as JSON.

Parameters
Parameter Type Required Description
username string Yes The username of the user
Example Request
GET /api/user-profile/?username=Schwein
Example Response
{
    "username": "Schwein",
    "avatar": "https://schwein.dev/media/profile_pics/e36708a304c14da9afbda91722762730.png",
    "bio": "Him (Himself)",
    "iq": 160,
    "gorilla_opinion": 187
}
User Statistics
Endpoint
/api/user-stats/
Description

Get user statistics including wiki articles, posts, comments, and votes.

Parameters
Parameter Type Required Description
username string Yes The username of the user
Example Request
GET /api/user-stats/?username=Schwein
Example Response
{
    "username": "Schwein",
    "stats": {
        "wiki": {
            "articles": 6,
            "total_views": 1225
        },
        "posts": 10,
        "comments": 45,
        "votes": {
            "received": {
                "upvotes": 46,
                "downvotes": 1,
                "total": 47
            },
            "given": {
                "upvotes": 34,
                "downvotes": 2,
                "total": 36
            }
        }
    }
}
Leaderboard
Endpoint
/api/leaderboard/
Description

Get the top users by IQ, Captcha, or AIGuessr. Use the type parameter to select the leaderboard: iq (default), captcha, or aiguessr.

Parameters
Parameter Type Required Description
count integer No Number of users to return (1-50, default: 10)
type string No Leaderboard type: iq (default), captcha, aiguessr
Example Request (IQ)
GET /api/leaderboard/?type=iq&count=5
Example Response (IQ)
{
    "type": "iq",
    "count": 2,
    "results": [
        {
            "username": "Schwein",
            "avatar": "/media/profile_pics/e36708a304c14da9afbda91722762730.png",
            "score": 160
        },
        {
            "username": "Jaeck",
            "avatar": "/media/profile_pics/test.png",
            "score": 160
        }
    ]
}
Response Codes
  • 200 - Success
  • 400 - Bad Request
  • 404 - Not Found