Random Game API Documentation

Fetch a random game based on optional genre, tag, and price filters. You can also get all available genres and tags.

No Rate Limit – Use responsibly.

API Overview

This API allows you to fetch a single random game from the database, optionally filtered by genres, tags, and price. You can also retrieve all available genres and tags for client-side filter options.

Base URL: https://hishuanigami.com/api/v1/games

Endpoints

Get Random Game

GET
/api/v1/games/random

Query Parameters

Parameter Type Required Description
genres string (comma-separated) No Genres to filter by (e.g., action,horror). Case-insensitive and underscores allowed (e.g. survival_horror)
tags string (comma-separated) No Tags to filter by (e.g., multiplayer,co_op)
price float No Maximum price (inclusive). Only games with price ≤ given value are returned.

Response Format

{
  "name": "Resident Evil",
  "price": 9.99,
  "genres": ["Survival Horror", "Action"],
  "tags": ["Multiplayer", "Horror"]
}

Error Example

{
  "message": "No matching game found"
}

Get All Tags

GET
/api/v1/games/tags

Response Format

[
  "Multiplayer",
  "Singleplayer",
  "Co_op",
  "VR",
  "Story Rich"
]

Get All Genres

GET
/api/v1/games/genres

Response Format

[
  "Action",
  "Adventure",
  "Survival Horror",
  "Strategy",
  "Simulation"
]

Example Requests

1. Random Game (No Filters)

GET https://hishuanigami.com/api/v1/games/random

2. Filter by Genres and Tags

GET https://hishuanigami.com/api/v1/games/random?genres=action,horror&tags=multiplayer

3. Filter by Price

GET https://hishuanigami.com/api/v1/games/random?price=10

4. All Genres

GET https://hishuanigami.com/api/v1/games/genres

5. All Tags

GET https://hishuanigami.com/api/v1/games/tags

Response Codes

200 Success

Returns JSON with the game or list of genres/tags

404 Not Found

No game matches the filters

{"message": "No matching game found"}

500 Internal Server Error

Unexpected server issue

{"error": "Something went wrong"}