Skip to main content
Welcome to the Haunt.gg API documentation. This section covers all available endpoints for user lookups and leaderboard functionality.

Welcome

The Haunt.gg API provides access to user profiles, leaderboard data, and image hosting. All endpoints return JSON responses. Base URL: https://haunt.gg/api

Available Endpoints

Lookup Endpoints

Retrieve detailed user information, including profile data, badges, links, and audio tracks.
  • GET /lookup/username/{username} - Look up user by username
  • GET /lookup/uid/{uid} - Look up user by user ID

Leaderboard Endpoints

Access leaderboard rankings with user statistics.
  • GET /leaderboard/views - Get users ranked by profile views
  • GET /leaderboard/badges - Get users ranked by badge count
  • GET /leaderboard/uid - Get users ranked by UID

ImageHost Endpoints

Upload and manage images through the Haunt.gg image hosting service.
  • POST /imagehost/upload - Upload an image file
  • GET /imagehost/gallery - List all uploaded images
  • GET /imagehost/folders - List all folders
  • POST /imagehost/folders - Create a new folder
  • GET /imagehost/folders/{id} - Get folder details with files
  • PATCH /imagehost/folders/{id} - Update a folder
  • DELETE /imagehost/folders/{id} - Delete a folder

Authentication

There are two types of API keys:

Account API Key

Used for all endpoints except image upload. Can be passed as a query parameter or Bearer token:
curl "https://haunt.gg/api/lookup/username/curet?key=YOUR_ACCOUNT_API_KEY"
curl -H "Authorization: Bearer YOUR_ACCOUNT_API_KEY" "https://haunt.gg/api/lookup/username/curet"

ImageHost API Key

Used only for the /imagehost/upload endpoint. Passed as a form field in the multipart upload request.

Response Format

All successful requests return a 200 status with JSON data. Failed requests return a 404 status with:
{
  "error": "Error message"
}