GameDB API Documentation

Overview

GameDB API is a game information query interface that provides game search, detail viewing, download link retrieval, and other functions.

Base URL: https://game.nite07.com/api/v1

Authentication

All API endpoints require authentication except for the health check endpoint.

Getting API Token

  1. Visit https://game.nite07.com/ to log in
  2. After successful login, get your API Token from the https://game.nite07.com/profile page

Using API Token

Include the Authorization field in the request headers:

Authorization: Bearer YOUR_API_TOKEN

API Endpoints

1. Health Check

Endpoint: GET /health

Description: Check service status and statistics

Authentication: No authentication required

2. Search Games

Endpoint: GET /search

Description: Search games by keyword

Authentication: API Token required

Request Parameters:

  • keyword (string, required): Search keyword, minimum 2 characters
  • page (int, required): Page number, starting from 1
  • page_size (int, required): Items per page, maximum 100
  • nsfw_mode (nsfw_mode: sfw|nsfw|all, optional): NSFW mode, default all

Request Example:

GET /search?keyword=cyberpunk&page=1&page_size=10&nsfw_mode=sfw

3. Get Game Details

Endpoint: GET /game/{id}

Description: Get detailed information for a game by ID

Authentication: API Token required

Path Parameters:

  • id: Game ID

Request Example:

GET /game/12345

5. Get Recently Updated Games

Endpoint: GET /game/recent_updated

Description: Get list of recently updated games

Authentication: API Token required

Request Parameters:

  • num (int, optional): Number of results to return, default 10, maximum 100
  • nsfw_mode (nsfw_mode: sfw|nsfw|all, optional): NSFW mode, default all

Request Example:

GET /game/recent_updated?num=20&nsfw_mode=sfw

Admin Endpoints

The following endpoints require admin API authentication.

6. Merge Game Infos

Endpoint: POST /game-infos/merge

Description: Merge one source game info into an existing target game info.

Request Body:

{
  "source_game_info_id": "11111111-1111-1111-1111-111111111111",
  "target_game_info_id": "22222222-2222-2222-2222-222222222222"
}

7. Move Game Items By IDs

Endpoint: POST /game-items/move-by-ids

Description: Move selected game items from one game info to another.

Request Body:

{
  "source_game_info_id": "11111111-1111-1111-1111-111111111111",
  "target_game_info_id": "22222222-2222-2222-2222-222222222222",
  "game_item_ids": [
    "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
  ]
}

8. Move Game Items By Regexp

Endpoint: POST /game-items/move-by-regexp

Description: Move game items whose raw name matches the regexp from one game info to another.

Request Body:

{
  "source_game_info_id": "11111111-1111-1111-1111-111111111111",
  "target_game_info_id": "22222222-2222-2222-2222-222222222222",
  "name_regexp": "DLC|Soundtrack"
}

9. Update Game Info External IDs

Endpoint: PATCH /game-infos/{id}/external-ids

Description: Update IGDB, VNDB, and Steam IDs for one game info.

Request Body:

{
  "igdb_id": 26192,
  "vndb_id": "v31262",
  "steam_id": 1145360
}

Error Responses

All endpoints return a standardized error format when errors occur:

{
  "status": "error",
  "error": "Error description message"
}

Rate Limiting

API endpoints have access rate limits of maximum 10 requests per second. If the limit is exceeded, a 429 Too Many Requests error will be returned.