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
}
}
}
}
Snoffle Search
Endpoint
/api/search/
Description
Search through web content or images.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
q | string | Yes | Search query |
type | string | No | Type of search (web/images, default: web) |
Example Request (Web)
GET /api/search/?q=trump&type=web
Example Response (Web)
{
"type": "web",
"results": [
{
"url": "https://www.heise.de/download/specials/Unabhaengig-von-Big-Tech-Alternativen-zu-Google-Microsoft-Co-10015382?wt_mc=intern.red.download.europaische-software-alternativen.hdl.trends.trends",
"title": "Europ\u00e4ische Alternativen: Google, Microsoft & Co. ersetzen | heise Download",
"description": "Ob Familienfotos oder Gesch\u00e4ftszahlen: Sensible Daten sind bei US-Anbietern nicht ideal aufgehoben. Mit Donald Trump als US-Pr\u00e4sident gewinnt die Frage nach Software-Alternativen erneute Relevanz. Wir geben Empfehlungen.",
"score": 1000,
"score_percent": 100
}
]
}
Example Request (Images)
GET /api/search/?q=cat&type=images
Example Response (Images)
{
"type": "images",
"results": [
{
"url": "https://schwein.dev/media/cursedDB/8105dcc39a5549a48323f7620a235586.png",
"alt_text": "frog",
"source_page": "/db/",
"width": 800,
"height": 600
}
]
}
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
}
]
}
Quick Links
Response Codes
- 200 - Success
- 400 - Bad Request
- 404 - Not Found