API Documentation
With this documentation, you get to learn how to access Photon's RESTful API. For convenience, all endpoints do return JSON responses, so keep that in mind.
https://photonmodmanager.onrender.comVersion: 1.0.0
Rate Limit: No rate limit currently
Endpoints
This command gets the API version, the current endpoints, the rate limit, and a link to this documentation. In a way, this is a sort of "help" command.
{
"version": "1.0.0",
"endpoints": {
"/api/mods": "Get all mods",
"/api/mods/:key": "Get specific mod",
"/api/search?q=...": "Search mods",
"/api/tags": "Get all tags",
"/api/authors": "Get all authors"
},
"rateLimit": "No rate limit currently",
"docs": "https://photonmodmanager.onrender.com/api.html"
}
This gets a list of all of the mods currently in the database, as well as all relevant information to the mods, such as analytics.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| type | string | Filter by type: mods, modpacks, or all (default: all) |
{
"success": true,
"count": 42,
"mods": [
{
"key": "ExampleMod@ModAuthor",
"name": "Example Mod",
"author": "ModAuthor",
"description": "An example mod description",
"type": "Mod",
"tags": ["Jokers", "Gameplay"],
"favourites": 15,
"published_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-20T14:45:00.000Z",
"analytics": {
"views": 234,
"downloads": 87
}
}
]
}
This gets the details for a specific mod, specified by its key. Similar to the command above, it also gets all relevant information.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| key | string | The mod key in format RepoName@GitHubUser |
{
"success": true,
"mod": {
"key": "ExampleMod@ModAuthor",
"name": "Example Mod",
"author": "ModAuthor",
"description": "An example mod description",
"type": "Mod",
"tags": ["Jokers", "Gameplay"],
"dependencies": ["Steamodded@Steamodded"],
"conflicts": [],
"version": "1.0.0",
"favourites": 15,
"published_at": "2025-01-15T10:30:00.000Z"
}
}
This uses Photon's search algorithm to search for mods by name, description, or author.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| q | string | Required. Search query string |
{
"success": true,
"query": "joker",
"count": 8,
"results": [
{
"key": "JokerMod@Author",
"name": "Amazing Jokers",
"description": "Adds 20 new jokers",
"author": "Author",
"favourites": 23
}
]
}
This gets all available tags currently in the system, getting their usage counts as well.
{
"success": true,
"tags": [
{ "tag": "Jokers", "count": 15 },
{ "tag": "Textures", "count": 8 },
{ "tag": "Quality of Life", "count": 12 }
]
}
This gets all of the mod authors currently in the system, getting their usage counts as well.
{
"success": true,
"authors": [
{ "author": "ModAuthor", "modCount": 3 },
{ "author": "AnotherAuthor", "modCount": 5 }
]
}
Raw Data Access
All of the relevant data for the mods is stored in this subdomain. It is all stored as a JSON file, and it is the same source the other endpoints fetch from when gathering information about mods.
Error Responses
All error responses follow this format:
{
"success": false,
"error": "Error message describing what went wrong"
}
Common Error Codes
| Status Code | Description |
|---|---|
| 400 | Bad Request - Missing or invalid parameters |
| 404 | Not Found - Resource doesn't exist |
| 500 | Internal Server Error - Something went wrong on our end |
Usage Examples
JavaScript (Fetch API)
// Get all mods
fetch('https://photonmodmanager.onrender.com/api/mods')
.then(response => response.json())
.then(data => console.log(data.mods));
// Search for mods
fetch('https://photonmodmanager.onrender.com/api/search?q=joker')
.then(response => response.json())
.then(data => console.log(data.results));
Python (requests)
import requests
# Get all mods
response = requests.get('https://photonmodmanager.onrender.com/api/mods')
mods = response.json()['mods']
# Get specific mod
mod_key = 'ExampleMod@ModAuthor'
response = requests.get(f'https://photonmodmanager.onrender.com/api/mods/{mod_key}')
mod = response.json()['mod']
cURL
# Get all tags curl https://photonmodmanager.onrender.com/api/tags # Search mods curl "https://photonmodmanager.onrender.com/api/search?q=joker"