Mechanics
Equipment and Forge
Combat
Character
Crafting and Shops
Exploration and Loot
Soul Companions
Economy and Trading
Community
Competition and Events
First Steps
Events and Challenges
For creators
API in practice: use cases
Ready-made scenarios for the public API: what you want to build, which endpoints to call and in what order, what to watch out for - plus working code to copy. Every example uses the real address of the game API.
Full documentation of all endpoints Parameters, example responses, the guild token, limits and error codes.Scenarios
A site with the ranking and builds of the best players
Who it is for Fan sites, guide blogs, community portals.
Goal Show the current top players of the server and, after a click on a player, their full build: equipment with upgrades, CP and class.
Step by step
-
1
Fetch the ranking - you immediately get the name, level, avatar, guild and weapon of every player.
GET /api/v1/servers/s1/rankings/characters/level?limit=100 -
2
When a player is clicked, fetch their profile with the build.
GET /api/v1/servers/s1/characters/{characterRef}
Tips
- The ranking refreshes every minute - keep it cached on your site for at least as long.
- A private profile has profile_public: false and build: null - show just the player card then.
- Fetch profiles only on click, not all at once - the limit is 60 requests per minute.
Ready HTML + JavaScript page (save it as top10.html and open it in a browser)
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Berserk Rush - Top 10</title>
<style>
body { font-family: sans-serif; background: #111; color: #eee; }
li { margin: 6px 0; cursor: pointer; }
img { width: 32px; height: 32px; vertical-align: middle; border-radius: 4px; }
</style>
<ol id="top"></ol>
<pre id="build"></pre>
<p><small>Data: Berserk Rush</small></p>
<script>
const API = 'https://berserkrush.pl/api/v1/servers/s1';
async function api(path) {
const response = await fetch(API + path + (path.includes('?') ? '&' : '?') + 'lang=en');
const body = await response.json();
if (!response.ok) throw new Error(body.error.code);
return body.data;
}
async function showBuild(id) {
const hero = await api('/characters/' + id);
const out = document.getElementById('build');
if (!hero.profile_public) {
out.textContent = hero.name + ' keeps the profile private.';
return;
}
const gear = hero.build.equipment.map(e => `${e.slot}: ${e.item.name} +${e.upgrade_level} (${e.rarity})`);
out.textContent = `${hero.name} - CP ${hero.combat_power}\n` + gear.join('\n');
}
api('/rankings/characters/level?limit=10').then(top => {
const list = document.getElementById('top');
for (const hero of top) {
const li = document.createElement('li');
const avatar = Object.assign(document.createElement('img'), { src: hero.avatar_url, alt: '' });
li.append(avatar, ` ${hero.name} - lvl ${hero.level_label} (${hero.weapon_type})`); // text node, safe
li.onclick = () => showBuild(hero.id);
list.appendChild(li);
}
});
</script>
</html>
Discord bot with commands about players and guilds
Who it is for Discord servers of guilds and player communities.
Goal Answer the !top, !hero and !guild commands with live game data, without leaving Discord.
Step by step
-
1
!top - the top five of the level ranking.
GET /api/v1/servers/s1/rankings/characters/level?limit=5 -
2
!hero Name - the level, guild, ELO and CP of a player.
GET /api/v1/servers/s1/characters/{characterRef} -
3
!guild Name - the level, number of members and leader of a guild.
GET /api/v1/servers/s1/guilds/{guildRef}
Tips
- An unknown name or guild returns 404 with the code character_not_found or guild_not_found - reply with a short message then.
- Pass names and guild names through encodeURIComponent - they may contain spaces and Polish characters.
- On an English-speaking server add ?lang=en so titles and item names are in English.
Node.js bot (discord.js v14)
// Minimal Discord bot (discord.js v14, Node 18+): !top, !hero <name>, !guild <name>
import { Client, GatewayIntentBits } from 'discord.js';
const API = 'https://berserkrush.pl/api/v1/servers/s1';
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
});
async function api(path) {
const response = await fetch(API + path);
return response.ok ? (await response.json()).data : null; // 404 = character_not_found / guild_not_found
}
client.on('messageCreate', async (message) => {
const [command, ...args] = message.content.trim().split(/\s+/);
const name = encodeURIComponent(args.join(' '));
if (command === '!top') {
const top = await api('/rankings/characters/level?limit=5');
if (!top) return message.reply('The game API is not available right now.');
await message.reply(top.map(h => `#${h.rank} ${h.name} (${h.level_label}, ${h.weapon_type})`).join('\n'));
}
if (command === '!hero' && name) {
const hero = await api(`/characters/${name}`);
if (!hero) return message.reply('No such character.');
const guild = hero.guild ? ` [${hero.guild.name}]` : '';
const power = hero.profile_public ? `, CP ${hero.combat_power}` : ' (private profile)';
await message.reply(`${hero.name}${guild}: level ${hero.level_label}, ELO ${hero.arena.elo}${power}`);
}
if (command === '!guild' && name) {
const guild = await api(`/guilds/${name}`);
if (!guild) return message.reply('No such guild.');
await message.reply(`${guild.name}: level ${guild.level}, ${guild.members}/${guild.max_members} members, leader ${guild.leader?.name ?? '-'}`);
}
});
client.login(process.env.DISCORD_TOKEN);
Weekly guild treasurer report
Who it is for Guild leaders and treasurers (requires a guild token).
Goal Once a week, post the treasury state, the most generous members and the list of people who donated nothing to the guild channel.
Step by step
-
1
Fetch the treasury state together with its caps.
GET /api/v1/servers/s1/guild -
2
Fetch the donation totals of the last 7 days - the list also includes members with nothing but zeros.
GET /api/v1/servers/s1/guild/donations/summary?days=7&sort=gold
Tips
- Run the script on your own server (e.g. a weekly cron job) and keep the token in an environment variable.
- Members who left but donated this week are in a separate former_members list.
- After leadership is handed over the token stops working (token_invalid) - the new leader has to generate a new one.
Python script posting the report to a Discord webhook
# Weekly treasury report for the guild Discord channel - run it once a week (cron) on YOUR server.
# pip install requests; env: BERSERK_GUILD_TOKEN (brk_s1_...), DISCORD_WEBHOOK_URL
import os
import requests
API = "https://berserkrush.pl/api/v1/servers/s1"
HEADERS = {"Authorization": f"Bearer {os.environ['BERSERK_GUILD_TOKEN']}"}
guild = requests.get(f"{API}/guild", headers=HEADERS, timeout=10).json()["data"]
summary = requests.get(f"{API}/guild/donations/summary", params={"days": 7, "sort": "gold"},
headers=HEADERS, timeout=10).json()["data"]
treasury = guild["treasury"]
lines = [
f"**{guild['name']}** - {summary['period']['from']} .. {summary['period']['to']}",
f"Treasury: {treasury['gold']:,} / {treasury['gold_cap']:,} gold, {treasury['gems']} / {treasury['gems_cap']} gems",
f"Donated: {summary['totals']['gold']:,} gold, {summary['totals']['exp']:,} EXP",
"",
"Top donors:",
]
for row in summary["members"][:5]:
lines.append(f"- {row['character']['name']}: {row['gold']:,} gold, {row['exp']:,} EXP")
idle = [row["character"]["name"] for row in summary["members"] if row["donations"] == 0]
if idle:
lines += ["", "No donations this week: " + ", ".join(idle)]
requests.post(os.environ["DISCORD_WEBHOOK_URL"], json={"content": "\n".join(lines)}, timeout=10)
Syncing donations into your own database or spreadsheet
Who it is for Builders of guild management panels (requires a guild token).
Goal Every few minutes, pull only the new donations and keep the full history on your side - for your own statistics, ranks or rewards for members.
Step by step
-
1
Fetch donations with the since parameter set to the newest updated_at from the previous sync, page by page up to meta.last_page.
GET /api/v1/servers/s1/guild/donations?since=2026-09-21T12:00:00Z&per_page=100 -
2
Optionally refresh the guild roster to match donations with current members and roles.
GET /api/v1/servers/s1/guild/members
Tips
- Store donations by the id field (upsert) - an automatic EXP donation is one entry per day that keeps growing until midnight.
- Move since back by a minute relative to the last sync - overlapping windows are harmless because you upsert.
- A 401 token_invalid response means the token was revoked - stop syncing and ask the leader for a new one.
Node.js script saving donations to a JSON file
// sync-donations.mjs - keeps every guild donation in donations.json (Node 18+, run on YOUR server).
// Auto EXP donations are one row per player per day that keeps growing - always upsert by id.
import { readFile, writeFile } from 'node:fs/promises';
const API = 'https://berserkrush.pl/api/v1/servers/s1';
const headers = { Authorization: `Bearer ${process.env.BERSERK_GUILD_TOKEN}` };
async function sync() {
const store = JSON.parse(await readFile('donations.json', 'utf8').catch(() => '{"since":null,"rows":{}}'));
let newest = store.since;
let page = 1;
let lastPage = 1;
do {
const query = new URLSearchParams({ per_page: '100', page: String(page) });
if (store.since) {
// Go back one minute - overlapping windows are harmless because rows are upserted.
query.set('since', new Date(Date.parse(store.since) - 60_000).toISOString());
}
const response = await fetch(`${API}/guild/donations?${query}`, { headers });
const body = await response.json();
if (!response.ok) throw new Error(body.error.code); // token_invalid = token revoked or leader changed
for (const row of body.data) {
store.rows[row.id] = row;
if (!newest || Date.parse(row.updated_at) > Date.parse(newest)) newest = row.updated_at;
}
lastPage = body.meta.last_page;
page++;
} while (page <= lastPage);
store.since = newest;
await writeFile('donations.json', JSON.stringify(store, null, 2));
}
await sync();
setInterval(() => sync().catch(console.error), 10 * 60 * 1000);
Meta analysis: popular classes and weapons at the top
Who it is for Guide authors, build theorycrafters, statistics makers.
Goal Find out which weapons the best players use and which items dominate the top builds.
Step by step
-
1
Fetch the top 100 - the weapon_type field in every entry is enough to count the class distribution without extra requests.
GET /api/v1/servers/s1/rankings/characters/arena?limit=100 -
2
For selected players, fetch their profiles and count the items in each slot.
GET /api/v1/servers/s1/characters/{characterRef}
Tips
- Wait about a second between profiles to stay within the limit of 60 requests per minute.
- Skip private profiles and hidden sections (hidden_sections) in your statistics instead of treating them as zeros.
- The arena ranking shows the best in PvP, the level ranking the most developed characters - comparing both makes for interesting material.
Python script counting the class distribution and the most popular weapons
# Weapon types of the top 100 PvP players and the most popular weapons among the top 20 builds.
import collections
import time
import requests
API = "https://berserkrush.pl/api/v1/servers/s1"
top = requests.get(f"{API}/rankings/characters/arena", params={"limit": 100}, timeout=10).json()["data"]
print("Weapon types in top 100:", collections.Counter(hero["weapon_type"] for hero in top).most_common())
weapons = collections.Counter()
for hero in top[:20]:
profile = requests.get(f"{API}/characters/{hero['id']}", params={"lang": "en"}, timeout=10).json()["data"]
time.sleep(1.1) # stay under 60 requests per minute
if profile["build"] is None: # private profile
continue
for piece in profile["build"]["equipment"]:
if piece["slot"] == "main_hand":
weapons[piece["item"]["name"]] += 1
print("Most popular weapons in top 20:", weapons.most_common(5))
Loot finder: where to get an item
Who it is for Guide sites, bots, player overlays.
Goal After an item name is typed in, show the monsters and maps it drops from.
Step by step
-
1
Find the item by a part of its Polish name.
GET /api/v1/servers/s1/items?search=wilcza&per_page=1 -
2
Fetch the item details - the dropped_by field lists the monsters and their maps.
GET /api/v1/servers/s1/items/{itemId} -
3
Optionally show the whole map with its monsters and most valuable loot.
GET /api/v1/servers/s1/maps/{mapId}
Tips
- The search compares Polish names (the name_pl field), while the name field returns the name in the language from the lang parameter.
- An empty dropped_by list means no monster drops the item - it comes e.g. from chests, the Blacksmith or trade.
- Catalogue data rarely changes - you can keep it cached on your side for several hours.
JavaScript function
// "Where does it drop?" - finds an item by (Polish) name and lists the monsters and maps that drop it.
const API = 'https://berserkrush.pl/api/v1/servers/s1';
async function whereDoesItDrop(query) {
const found = await fetch(`${API}/items?per_page=1&lang=en&search=${encodeURIComponent(query)}`).then(r => r.json());
const item = found.data[0];
if (!item) return `Nothing matches "${query}".`;
const { data } = await fetch(`${API}/items/${item.id}?lang=en`).then(r => r.json());
if (data.dropped_by.length === 0) return `${data.name}: not dropped by monsters (chests, crafting or trade).`;
const sources = data.dropped_by.map(m => `${m.monster} (lvl ${m.level}${m.map ? ', ' + m.map.name : ''})`);
return `${data.name}: ${sources.join('; ')}`;
}
whereDoesItDrop('wilcza').then(console.log);
Chest calculator: what drops and how likely it is
Who it is for Guide sites, Discord bots, calculators for players.
Goal Show the loot of a chest with the chance of each entry and work out how many chests you need to open to get a specific item or any legendary with 90% certainty.
Step by step
-
1
Fetch the list of chests - the level required to open them helps you match a chest to a character.
GET /api/v1/servers/s1/chests -
2
Get the loot of the chosen chest by ID or Polish name: the chance of each entry per draw (one opening is pulls_per_open draws), and for equipment the rarity distribution from the quality roll.
GET /api/v1/servers/s1/chests/Skrzynia%20Hydry
Tips
- One draw gives exactly one entry and one opening is pulls_per_open draws, so the chance that an entry drops at least once in N openings is 1 - (1 - chance_pct / 100)^(N x pulls_per_open).
- Equipment rarity is rolled only on opening: the chance of a legendary copy of a given item is chance_pct times rarity_roll_pct.legendary / 100, and rarity_chances_pct.legendary directly gives the chance of any legendary from one draw.
- The chances do not include the Lucky Chest event - on the event day epic and legendary items drop more often.
Calculator in JavaScript (browser or Node 18+)
// Chest calculator: what can drop from a chest, how likely it is and how many chests
// to open for a 90% chance of getting it. Works in the browser (CORS) and in Node 18+.
const API = 'https://berserkrush.pl/api/v1/servers/s1';
// Chests to open so that something with chancePct per draw drops at least once with the given certainty.
// One opening is `pulls` draws (pulls_per_open: 8 for equipment, land, skill book and Gates chests, 1 for the rest).
function chestsFor(chancePct, pulls = 1, certainty = 0.9) {
const p = chancePct / 100;
if (p <= 0) return Infinity;
return p >= 1 ? 1 : Math.ceil(Math.log(1 - certainty) / (pulls * Math.log(1 - p)));
}
async function chestCalculator(chest) {
const response = await fetch(`${API}/chests/${encodeURIComponent(chest)}?lang=en`);
const body = await response.json();
if (!response.ok) throw new Error(body.error.code); // chest_not_found
const { name, drops, rarity_chances_pct: rarity, pulls_per_open: pulls } = body.data;
const anyLegendary = rarity.legendary > 0
? `${rarity.legendary}% per draw (${pulls} draws per chest), ~${chestsFor(rarity.legendary, pulls)} chests for 90%`
: 'never';
console.log(`${name} - any legendary: ${anyLegendary}`);
for (const drop of drops) {
const qty = drop.min_qty === drop.max_qty ? `${drop.min_qty}x` : `${drop.min_qty}-${drop.max_qty}x`;
// Equipment rarity is rolled on opening: the chance of a legendary copy of THIS item.
const legendaryCopy = drop.rarity_roll_pct
? `, legendary copy ${(drop.chance_pct * drop.rarity_roll_pct.legendary / 100).toFixed(4)}%`
: '';
console.log(`${drop.chance_pct}% ${qty} ${drop.name}${legendaryCopy} (~${chestsFor(drop.chance_pct, pulls)} chests for 90%)`);
}
}
chestCalculator('Skrzynia Hydry').catch(console.error);
More ideas
- Stream overlay (OBS): the top 5 of a weekly ranking with a countdown to the reset from meta.resets_at.
- Recruitment page: a list of guilds with their recruitment mode, minimum level and number of free spots.
- Character comparison: two profiles side by side, slot by slot.
- Automatic roles on the guild Discord based on the roles from the guild roster (token endpoint).
- Map guide: a map, its monsters, bosses and most valuable loot in one view.
Built something cool or missing some data in the API? Write to us on our Discord.