API - raftario/BeatMods-Website GitHub Wiki

The best way to access BeatMods programmatically is using it's API. It's fairly complete and easy to use, and most of its accessible features will be covered here.

Mods

The API is mainly focused on mods, as BeatMods is a mod repository. The entry point to access the mod API is /api/v1/mod. From there, you will get the complete list of all mods. To filter mods, just add a query string to the URL (ie. /api/v1/mod?status=approved).

You can also add multiple filters (ie. /api/v1/mod?status=approved&category=Core) or even multiple possible values for a single filter (ie. /api/v1/mod?status[]=approved&status[]=pending).

The API will always return a json formatted array of mod objects. If no mod matches the filters, it will return an empty array.

Here is a list of keys in a mod object, with their possible values. They can all be used as filters.

  • name - Mod name (string - any)
  • version - Mod version (string - any (should be Semantic version))
  • gameVersion - Beat Saber version the mod is made for (string - Semantic version)
  • authorId - Mod author ID (string - ID)
  • uploadDate - Mod upload date (string - ISO 8601 UTC Date & Time)
  • updatedDate - Last update date of the mod (string - ISO 8601 UTC Date & Time)
  • author - Mod author (user object)
  • status - Mod status (string - approved|inactive|pending|declined)
  • description - Mod description (string - any)
  • link - Link to mod website / info (string - any (should be URL))
  • category - Mod category (string - Other|Core|Cosmetic|Practice / Training|Gameplay|Stream Tools|Libraries|UI Enhancements|Lighting|Tweaks / Tools|Multiplayer|Text Changes)
  • downloads - Mod file downloads (array of download object)
  • required - Is the mod a required one (boolean)
  • dependencies - Dependencies of the mod (array of mod object)
  • _id - Mod ID (string - ID)

Here is a list or keys in a download object.

  • type - Mod download type (string - universal|steam|oculus)
  • url - Url of the file, relative to BeatMods root (string - URI)
  • hashMd5 - MD5 hashes of the mod files (array of hash object)

Here is a list or keys in a hash object.

  • hash - MD5 file hash (string - MD5 hash)
  • file - File name (string - any)