Start
Everything here comes from the live build. When a new build ships, the API moves to it as part of the same release, and every response names the build in X-Citadel-Build. Poll /v1/status if you want to know when that happens.
| Route | Returns |
|---|---|
GET /v1/status | The live build, when it went live, and how many of each thing it has. |
GET /v1/items, /v1/items/{id} | Every module and conduit a player can get in the live game. Unreleased and NPC-only items are left out. |
GET /v1/hulls, /v1/hulls/{id} | Hulls with their fitting grids and 3D models. |
GET /v1/ciphers, /v1/artifacts, /v1/regalia, /v1/regalia-sets, /v1/heretical-specials, /v1/harmonic-sets, /v1/affinity | Ciphers, artifacts, Regalia and the other things a rolled item can carry. Artifacts, Regalia pieces and harmonic sets say the lowest breach tier they drop at, a harmonic set its drop weight, and a heretical special the weight a GULLVEIG BRAND draws it by on each module type. |
GET /v1/modifier-pools, /v1/qualities, /v1/placement-rules | How items roll, what each quality means, and where items may be placed. |
GET /v1/npcs | NPC ships, bosses and their weapons. |
GET /v1/stats | Every stat, with the label and sign the game shows in its tooltips. |
GET /v1/grid-consumables, /v1/breach-tiers | The consumables that change a fitting grid, and the breach tiers a modifier roll can be made at. Each tier carries the weights its rarities, qualities, modifier tiers and port counts roll from. |
GET /v1/materials | The minerals, ORE, components and scrap the game has, with their point ratings and stack sizes. |
GET /v1/consumables, /v1/drones | The consumables, with the modules each charge item feeds and each GULLVEIG BRAND's heresy and chance to ascend, and the drones, with their role, flight and role stats. |
GET /v1/recipes, /v1/recipes/{id}/materials | Every recipe players can craft: what it makes, its blueprint, and the materials, craft time and research steps at each blueprint rarity. The second route works out what a craft takes on a forge cell with a material discount, with the game's own code. |
GET /v1/industry | The rules of crafting: the odds of each quality and of ports at each tier, what a blueprint's rarity scales, the settings for craft and research times, the forge cell effects with their magnitudes, and what the industry grid and the merchants charge. |
GET /v1/hubs | Every hub: its craft and research multipliers and taxes, the stationary merchants it hosts (loot tables, stock counts and budgets, markup, tax, refresh cost and wallet, as the game spawns them), and its faction quartermaster with the Merit or ORE price of everything it offers at each rank. |
GET /v1/loot-tables | Every loot table a source can roll: its no-drop weight and its entries in order, each an item or another table, with its weight and the breach tier and NPC class it needs. Only entries that can drop are listed. |
GET /v1/loot-sources | Every way the game rolls loot: an NPC's wreck as authored and as a faction's ship, an elite archetype or a promoted elite, a spawn node's containers and mining caches, beacon eruptions, supply caches, the traveling merchant, hub merchants and quartermasters, and guaranteed drops. Each names the tables it rolls and what it rolls them with, and lists every region, map and spawn node where it appears, with the breach tiers. |
GET /v1/drops | Every item loot sources give: for each source and each breach tier it appears at, the chance one pick gives the item, and the chance under each breach mutator that changes it. Sources that give an item the same chances are listed together. A guaranteed drop's chance is 1, and a quartermaster's catalog comes with no odds. See Crafting and loot. |
GET /v1/breach-mutators | The mutators a breach session can roll, with the weight and breach tiers each rolls at, the loot tables it boosts, and the multipliers and bonuses it applies to rarity, modifier tiers, elites and budgets. /v1/drops names a mutator by the same id. |
GET /v1/ores | The ores, with their item, point value and mining work, and the weights a field picks secondary ores by. The numbers the game makes an asteroid's mining zones from: what a zone holds, how its kind is rolled and how long it lasts. Every spawn node that mines, with its primary ore and the share of its wallet that pays for asteroids, and the maps that seed surface ore. |
GET /v1/ship-classes, /v1/ship-roles, /v1/death-causes, /v1/merit-ranks | The game's ship classes with their overlay icons, the roles a hull can have, how a ship can die, and the Merit ranks with the Merits each one needs, each in the game's order. |
GET /v1/zones | Every zone a kill can name, with its breach tiers and whether it is a travel lane or a private event route. The kill routes filter by its id with zoneId. |
GET /v1/ui/fitting-grid | How the game draws a fitting grid: cell size, port notches, hardpoint icons and state colours. This is UI style, not game data, so sde.zip leaves it out. |
GET /v1/art/{file} | Icons as WebP, and each ship's 3D model as GLB. Take icon file names from a record's art object and model file names from its model. See Ship models. |
POST /v1/fits/evaluate, /v1/fits/import, /v1/fits/export, /v1/items/facts | Check a fit, convert it to and from the in-game fit string, or read an item's stat lines. These run the game's own code. |
POST /v1/grid-mods, /v1/roll | See where each grid consumable can be used on a fit and what it would do, or roll an item's modifiers the way a drop rolls them. These run the game's own code too. |
GET /v1/kills, /v1/kills/{id} | Ships players have lost, newest first, with filters; one kill with its fitting, cargo and everyone who damaged it. See Kills. |
GET /v1/kills/feed, /v1/kills/stream | New kills in the order they become public: a feed to poll, or a server-sent events stream. |
GET /v1/kills/summary, /v1/battles, /v1/pilots/{id}, /v1/leaderboards | Totals for any filter, battles, a pilot's record, and the leaderboards. |
GET /v1/merit | The faction event's Merit leaderboard, filtered by faction or callsign. A pilot's own standing is the merit field of their record. See Merit. |
An id is the game's asset GUID written as a decimal string, and it doesn't change between builds. Fixed-point numbers come as raw decimal strings; divide by 65536 to get the value. Errors look like { "error": { "code", "message" } } and use status 400, 404, 405, 413, 415, 429, 500 or 503.
Rules
User-Agent
Put your app's name and a way to reach you in the User-Agent, for example MyFitTool/1.0 (me@example.com). If something you run starts misbehaving, that's how we get in touch before we have to block it. Requests with no User-Agent, or a bare curl/8.4.0 or python-requests/2.31, still work, but the response carries a Warning header.
Rate limits
You can make 60 requests in a burst, and the allowance refills at 10 a second. Art has its own, larger allowance (600, refilling at 100 a second) so a page full of icons doesn't eat into your data requests. sde.zip allows 5 downloads, then one every 6 seconds. The kill routes read a database rather than the build, so they share a smaller allowance: 20 in a burst, refilling at 2 a second. Rejected requests count too. When you hit the limit you get a 429 with Retry-After in seconds. Request bodies can be up to 256 KB.
Caching
Every response has an ETag and a Cache-Control. Send the tag back in If-None-Match and you'll get an empty 304 until the data changes. Art file names are a hash of the file, so a file never changes and you can cache it for a year. CORS is open to every origin, so a web page can call the API directly.
Examples
Each example makes the same three calls. It reads the live build from /v1/status, asks for /v1/hulls again with its ETag and gets a 304, then turns a fit string copied from the game into a fit and evaluates it. Put your own app and contact in the User-Agent, and paste a fit string over the placeholder.
curl
API=https://api.thecitadel.com
UA='MyFitTool/1.0 (me@example.com)'
FIT_STRING='<a fit string from the game>'
curl -A "$UA" "$API/v1/status"
# Conditional request: 304 with no body while the data is unchanged
etag=$(curl -s -D - -o /dev/null -A "$UA" "$API/v1/hulls" | tr -d '\r' | awk 'tolower($1) == "etag:" { print $2 }')
curl -i -A "$UA" -H "If-None-Match: $etag" "$API/v1/hulls"
# Turn an in-game fit string into a fit, then check it
curl -s -A "$UA" -H 'Content-Type: application/json' \
-d "{ \"fitString\": \"$FIT_STRING\" }" "$API/v1/fits/import" |
curl -A "$UA" -H 'Content-Type: application/json' -d @- "$API/v1/fits/evaluate"
JavaScript
Node 18 or later, as an ES module. Browsers send their own User-Agent and don't let you change it, so leave that header out in a web page; those calls get no warning.
const api = "https://api.thecitadel.com";
const headers = { "User-Agent": "MyFitTool/1.0 (me@example.com)" };
const fitString = "<a fit string from the game>";
const status = await fetch(`${api}/v1/status`, { headers }).then((r) => r.json());
console.log(status.build);
// Conditional request: 304 with no body while the data is unchanged.
const first = await fetch(`${api}/v1/hulls`, { headers });
const { hulls } = await first.json();
const again = await fetch(`${api}/v1/hulls`, {
headers: { ...headers, "If-None-Match": first.headers.get("ETag") },
});
console.log(again.status); // 304
// Art: every item and hull has an `art` object of API-relative URLs, and every hull a 3D `model`.
console.log(`${api}${hulls[0].art.base}`);
console.log(`${api}${hulls[0].model}`);
// Turn an in-game fit string into a fit, then check it.
const post = (path, body) =>
fetch(`${api}${path}`, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify(body),
}).then((r) => r.json());
const { fit } = await post("/v1/fits/import", { fitString });
const result = await post("/v1/fits/evaluate", { fit });
console.log(result.valid, result.rating);
Python
Python 3, standard library only.
import json
import urllib.error
import urllib.request
API = "https://api.thecitadel.com"
USER_AGENT = "MyFitTool/1.0 (me@example.com)"
FIT_STRING = "<a fit string from the game>"
def call(path, body=None, headers=None):
request = urllib.request.Request(API + path, headers={"User-Agent": USER_AGENT, **(headers or {})})
if body is not None:
request.data = json.dumps(body).encode()
request.add_header("Content-Type", "application/json")
try:
with urllib.request.urlopen(request) as response:
return response.status, response.headers, response.read()
except urllib.error.HTTPError as error:
if error.code != 304:
raise
return error.code, error.headers, b""
_, _, status = call("/v1/status")
print(json.loads(status)["build"])
# Conditional request: 304 with no body while the data is unchanged.
_, headers, _ = call("/v1/hulls")
code, _, _ = call("/v1/hulls", headers={"If-None-Match": headers["ETag"]})
print(code) # 304
# Turn an in-game fit string into a fit, then check it.
_, _, imported = call("/v1/fits/import", {"fitString": FIT_STRING})
_, _, evaluated = call("/v1/fits/evaluate", {"fit": json.loads(imported)["fit"]})
result = json.loads(evaluated)
print(result["valid"], result["rating"])
C#
.NET 8, as a top-level program.
using System.Net.Http.Json;
using System.Text.Json;
using var http = new HttpClient { BaseAddress = new Uri("https://api.thecitadel.com") };
http.DefaultRequestHeaders.UserAgent.ParseAdd("MyFitTool/1.0 (me@example.com)");
var fitString = "<a fit string from the game>";
var status = await http.GetFromJsonAsync<JsonElement>("/v1/status");
Console.WriteLine(status.GetProperty("build"));
// Conditional request: 304 with no body while the data is unchanged.
using var first = await http.GetAsync("/v1/hulls");
var conditional = new HttpRequestMessage(HttpMethod.Get, "/v1/hulls");
conditional.Headers.IfNoneMatch.Add(first.Headers.ETag!);
using var again = await http.SendAsync(conditional);
Console.WriteLine((int)again.StatusCode); // 304
// Turn an in-game fit string into a fit, then check it.
var imported = await (await http.PostAsJsonAsync("/v1/fits/import", new { fitString }))
.Content.ReadFromJsonAsync<JsonElement>();
var result = await (await http.PostAsJsonAsync("/v1/fits/evaluate", new { fit = imported.GetProperty("fit") }))
.Content.ReadFromJsonAsync<JsonElement>();
Console.WriteLine($"{result.GetProperty("valid")} {result.GetProperty("rating")}");
Go
Go 1.18 or later, standard library only.
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)
const api = "https://api.thecitadel.com"
const userAgent = "MyFitTool/1.0 (me@example.com)"
const fitString = "<a fit string from the game>"
func call(path string, body any, header http.Header) (*http.Response, []byte) {
method, reader := http.MethodGet, io.Reader(nil)
if body != nil {
encoded, err := json.Marshal(body)
if err != nil {
log.Fatal(err)
}
method, reader = http.MethodPost, bytes.NewReader(encoded)
}
req, err := http.NewRequest(method, api+path, reader)
if err != nil {
log.Fatal(err)
}
for name, values := range header {
req.Header[name] = values
}
req.Header.Set("User-Agent", userAgent)
if body != nil {
req.Header.Set("Content-Type", "application/json")
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
data, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
return resp, data
}
func main() {
_, status := call("/v1/status", nil, nil)
fmt.Println(string(status))
// Conditional request: 304 with no body while the data is unchanged.
first, _ := call("/v1/hulls", nil, nil)
again, _ := call("/v1/hulls", nil, http.Header{"If-None-Match": {first.Header.Get("ETag")}})
fmt.Println(again.StatusCode) // 304
// Turn an in-game fit string into a fit, then check it.
_, imported := call("/v1/fits/import", map[string]string{"fitString": fitString}, nil)
var fit struct {
Fit json.RawMessage `json:"fit"`
}
if err := json.Unmarshal(imported, &fit); err != nil {
log.Fatal(err)
}
_, evaluated := call("/v1/fits/evaluate", fit, nil)
var result struct {
Valid bool `json:"valid"`
Rating int `json:"rating"`
}
if err := json.Unmarshal(evaluated, &result); err != nil {
log.Fatal(err)
}
fmt.Println(result.Valid, result.Rating)
}
Kills
The kill routes serve the killboard: every ship a player loses, in a breach or in the hub, to other pilots or to NPCs. A kill is recorded within seconds of the ship dying and becomes public 5 minutes later, so nothing here shows a fight that is still going on.
Following new kills
There are two ways, and both list kills in the order they become public.
/v1/kills/feed?after=returns every kill listed after a cursor. Poll it with thecursorit hands back and you see each kill once. Responses are cached for 10 seconds, so polling faster than that gains nothing./v1/kills/streamis a server-sent events stream. Each kill arrives as akillevent a few seconds after it becomes public, and the event's id is the kill's cursor. The server ends a stream after 10 minutes. Reconnect with the last id inLast-Event-IDand you get what you missed first, for up to an hour; a browser'sEventSourcedoes all of this by itself. Each client can hold 3 streams open.
Both take the same filters as /v1/kills, so ?kind=pvp follows only PvP kills and ?pilot=<id> one pilot's.
What to expect
- Kills from older recordings are sometimes added later. They reach the feed and the stream when they become public, with their real
occurredAt, so check it if you only want fresh fights. - A kill can be withdrawn: when it repeats another loss of the same ship, or when a pilot asks to be anonymised. It then answers 404. Neither the feed nor the stream announces it. Anonymising a pilot also drops them from Merit.
- Hull, item, cipher and artifact ids in a kill are the ids the rest of this API uses, so
/v1/items/{id}tells you what a fitted module does. Kills recorded before the killboard kept ids carry null there; filter those byhullName. - Each kill names the
buildthat recorded it.X-Citadel-Buildis still the live build.
Each example below follows new PvP kills. The JavaScript one runs in a web page and uses the stream; the others start from the newest kill and poll the feed every 15 seconds.
curl
The polling half uses jq.
API=https://api.thecitadel.com
UA='MyKillBot/1.0 (me@example.com)'
# Follow the stream; -N prints each event as it arrives. Ctrl-C to stop.
curl -N -A "$UA" "$API/v1/kills/stream?kind=pvp"
# Or poll: start from the newest kill, then ask for whatever was listed after it.
cursor=$(curl -s -A "$UA" "$API/v1/kills?limit=1" | jq -r '.kills[0].cursor')
while sleep 15; do
page=$(curl -s -A "$UA" "$API/v1/kills/feed?kind=pvp&after=$cursor")
echo "$page" | jq -r '.kills[] | "\(.victim.name) lost a \(.victim.hull.name)"'
cursor=$(echo "$page" | jq -r '.cursor')
done
JavaScript
In a web page. EventSource reconnects by itself and resumes after the last kill it saw.
const stream = new EventSource("https://api.thecitadel.com/v1/kills/stream?kind=pvp");
stream.addEventListener("kill", (event) => {
const kill = JSON.parse(event.data);
console.log(`${kill.victim.name} lost a ${kill.victim.hull.name}`, kill.value?.total);
});
// Sent instead of a replay when the page was away for over an hour: fetch the
// kills after `after`, up to and including `until`, from /v1/kills/feed.
stream.addEventListener("gap", (event) => console.log(JSON.parse(event.data)));
Python
Python 3, standard library only.
import json
import time
import urllib.request
API = "https://api.thecitadel.com"
USER_AGENT = "MyKillBot/1.0 (me@example.com)"
def get(path):
request = urllib.request.Request(API + path, headers={"User-Agent": USER_AGENT})
with urllib.request.urlopen(request) as response:
return json.load(response)
# Start from the newest kill, then ask for whatever was listed after it.
cursor = get("/v1/kills?limit=1")["kills"][0]["cursor"]
while True:
time.sleep(15)
page = get(f"/v1/kills/feed?kind=pvp&after={cursor}")
for kill in page["kills"]:
print(f'{kill["victim"]["name"]} lost a {kill["victim"]["hull"]["name"]}')
cursor = page["cursor"]
C#
.NET 8, as a top-level program.
using System.Net.Http.Json;
using System.Text.Json;
using var http = new HttpClient { BaseAddress = new Uri("https://api.thecitadel.com") };
http.DefaultRequestHeaders.UserAgent.ParseAdd("MyKillBot/1.0 (me@example.com)");
// Start from the newest kill, then ask for whatever was listed after it.
var newest = await http.GetFromJsonAsync<JsonElement>("/v1/kills?limit=1");
var cursor = newest.GetProperty("kills")[0].GetProperty("cursor").GetString();
while (true)
{
await Task.Delay(TimeSpan.FromSeconds(15));
var page = await http.GetFromJsonAsync<JsonElement>($"/v1/kills/feed?kind=pvp&after={cursor}");
foreach (var kill in page.GetProperty("kills").EnumerateArray())
{
var victim = kill.GetProperty("victim");
Console.WriteLine($"{victim.GetProperty("name")} lost a {victim.GetProperty("hull").GetProperty("name")}");
}
cursor = page.GetProperty("cursor").GetString();
}
Go
Go 1.18 or later, standard library only.
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
)
const api = "https://api.thecitadel.com"
const userAgent = "MyKillBot/1.0 (me@example.com)"
type kill struct {
Cursor string `json:"cursor"`
Victim struct {
Name string `json:"name"`
Hull struct {
Name string `json:"name"`
} `json:"hull"`
} `json:"victim"`
}
type page struct {
Kills []kill `json:"kills"`
Cursor string `json:"cursor"`
}
func get(path string) page {
req, err := http.NewRequest(http.MethodGet, api+path, nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("User-Agent", userAgent)
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var p page
if err := json.NewDecoder(resp.Body).Decode(&p); err != nil {
log.Fatal(err)
}
return p
}
func main() {
// Start from the newest kill, then ask for whatever was listed after it.
cursor := get("/v1/kills?limit=1").Kills[0].Cursor
for {
time.Sleep(15 * time.Second)
p := get("/v1/kills/feed?kind=pvp&after=" + cursor)
for _, k := range p.Kills {
fmt.Printf("%s lost a %s\n", k.Victim.Name, k.Victim.Hull.Name)
}
cursor = p.Cursor
}
}
Merit
The Merit routes serve the faction event's leaderboard, with the numbers the in-game board shows. /v1/merit lists every pilot on it in the in-game board's order: most Merits first, then by callsign ignoring case, then by pilotId. Where two callsigns differ only in case, capitals come first. /v1/merit-ranks lists the Merit ranks from Slug to Imperator, each with the Merits it takes to reach. A pilot holds the highest rank whose threshold their current Merits meet, so rank drops when Merits do.
Two filters narrow the list. ?faction= takes TZHAL or Ganden, in any case. ?name= takes a whole callsign of 1 to 24 characters and ignores case; callsigns aren't unique, so it can return several pilots. A bad filter is a 400. To find a pilot's id from their callsign, ask for ?name= and read the pilotId. It's the id the kill routes use, so you can pass it to /v1/pilots/{id}.
A response is { "updatedAt", "pilots" }, and each pilot has these fields.
| Field | Holds |
|---|---|
pilotId | The pilot's id, as the kill routes give it. |
name | The callsign the pilot's game last reported. |
faction | The pilot's faction, written TZHAL or Ganden. |
merits | The pilot's Merits. Friendly fire costs Merits, so this can be negative. |
rank | The Merit rank those Merits reach: the same { "id", "title", "minimumMerits" } that /v1/merit-ranks lists. |
kills | The faction event's kills. These aren't the killboard's; see below. |
deaths | Times the pilot died while in TZHAL or GANDEN. |
bankedValue | The value the pilot has deposited at the recycler. |
Two counts called kills
Merit kills are the faction event's: rival ships the pilot finished, NPCs included, plus friendly kills, which cost Merits. The kills on a pilot's record are the killboard's: player ships the pilot damaged before they died. A pilot can be high on one and low on the other, so don't use one to check the other.
On a pilot's record
/v1/pilots/{id} carries the pilot's standing as merit: the fields above without pilotId and name, which the record already carries as id and name. The record's name and kills stay the killboard's. merit is null when the pilot has no standing. A pilot who is on the leaderboard but in no public kill still gets a record: every killboard count is 0, efficiency is null, every list is empty, and name is their Merit callsign.
Who is listed
- Pilots in TZHAL or GANDEN, the same ones the in-game board lists.
- An admin can hide a pilot from the board, and anonymising a pilot does. A hidden pilot isn't in
/v1/merit. If they're in a public kill, their record hasmerit: null. If they aren't,/v1/pilots/{id}answers 404 while Merit data is available. Hiding someone from Merit alone doesn't withdraw their kills. - Pilot ids from before 2026-09-29, when the game changed how players sign in, have no standing. Their
meritisnull.
How fresh it is
The API reads the standings from the game about once a minute and caches responses for 60 seconds, so polling faster than that gains nothing. updatedAt is when the standings last changed, as the API saw it. A read that finds the same standings leaves updatedAt and the ETag alone, so a poll with If-None-Match gets a 304 until the standings change.
When the API can't read the standings, /v1/merit answers 503 with the code unavailable. That happens until the first successful read after the API starts, and whenever the last one is more than 10 minutes old. A pilot's record then leaves merit out instead of setting it to null, so a missing merit means unknown and null means no standing. While Merit data is unavailable on a deployment that reads it, a pilot in no public kill gets a 503 as well, not a 404, because the API can't tell whether the board lists them. Retry shortly.
Crafting and loot
The crafting and loot routes serve the game's own settings, and work some results out for you: /v1/recipes every recipe at each blueprint rarity, /v1/recipes/{id}/materials what a craft takes on a forge cell with a material discount, and /v1/drops every item's odds. The formulas below cover the rest, such as a hub that crafts faster, a forge cell with effects or what a merchant pays for an item. Each one names the game function it comes from and the fields it reads. A field shown without a route is in /v1/industry. Basis points are out of 10000, so 10000 is ×1.
Crafting and research
Here r is the base point rating of the item a recipe makes (roll.rating.base in /v1/items and /v1/hulls, pointRating in the other lists), and t is the tier a research step starts from.
| Value | Game function | How it's worked out |
|---|---|---|
| Craft time | SimulationConfig.GetCraftDuration, then ForgeJobRules.CraftSeconds | craft.baseSeconds × (r / craft.referencePointRating)1.5. Then × the blueprint rarity's rarityScales[].basisPoints, × the hub's settings.craftTimeBasisPoints from /v1/hubs, and × (10000 − the forge cell's CraftSpeed), each over 10000. Rounded up to a whole second. |
| Research time | SimulationConfig.GetResearchDuration, then ForgeJobRules.ResearchSeconds | research.baseSeconds × research.tierMultipliert − 1 × √(r / research.referencePointRating). Then scaled like a craft, by the rarity, the hub's settings.researchTimeBasisPoints and the cell's ResearchSpeed. Rounded up to a whole second. |
| Research ORE | SimulationConfig.GetResearchOreCost, through RecipeDefinition.GetResearchCost | r × t × research.oreBasisPointsPerTier / 10000, rounded half up, and at least 1. The blueprint's rarity doesn't change it. A blueprint at its recipe's maxBlueprintTier has no step left. |
| Materials | ForgeJobRules.ScaleMaterialQuantity, then ForgeCellRules.ApplyMaterialDiscount | Each amount in the recipe's materials × the rarity's basisPoints / 10000, rounded half up, and never below 1. The forge cell's material discount then comes off the whole recipe's point value (each amount times its material's pointRating, summed), a unit at a time, leaving at least one of each material. A negative discount adds a surcharge the same way. Which materials give up a unit depends on all of their ratings, so ask /v1/recipes/{id}/materials?rarity=Prototype&discount=1500 for the exact counts. |
craft.baseSeconds, research.baseSeconds and research.tierMultiplier are raw fixed-point numbers. The game works these times out in fixed point and rounds up at the end, so a floating-point copy can land a second off. byRarity in /v1/recipes has the game's own seconds and ORE, at a hub that changes nothing and on a cell with no effects.
Buying, selling and recycling
| Value | Game function | How it's worked out |
|---|---|---|
| Purchase price | MerchantInteractionRules.CalculateMerchantPrice | The item's point rating, with what its roll adds, × the merchant's markup / 10000, rounded half up, and at least 1. The traveling merchant's markup is merchants.travelingMarkupBasisPoints. A hub merchant has its own, markupBasisPoints in /v1/hubs. |
| Hub tax | MerchantInteractionRules.QuoteMerchantPurchase | A hub merchant charges the price × merchants.hubTaxBasisPoints / 10000 on top, rounded half up. The tax leaves the game. The traveling merchant charges none. |
| Recycle value | ItemValuation.CalculateRecycleOre | The item's point value × the quantity × sellAndRecycle.recycleOreBasisPoints / 10000, rounded down. Then × the hub's settings.salvageYieldBasisPoints / 10000, rounded down. |
| Sell value | ItemValuation.CalculateMerchantSellOre | The recycle value at that hub × sellAndRecycle.merchantSellRecyclePremiumBasisPoints / 10000, rounded down. |
| Blueprint value | ItemValuation.ScaleBlueprintPointRatingForUses | The point value a blueprint sells and recycles at. Its point rating gains sellAndRecycle.blueprintResearchTierBonusBasisPoints of its base rating for each tier researched past 1, rounded half up. A blueprint with a use limit is then worth that × the uses it has left / its most uses (byRarity[].maxUses in /v1/recipes), rounded half up. |
A faction-issue item is worth nothing to a merchant or the recycler: factionIssue.sellValue is 0.
Drop odds
/v1/drops has the chance one pick gives each item, worked out from /v1/loot-tables and /v1/loot-sources the way the game picks (LootTableResolver.RollWithBudgetMisses). A pick from a table weighs the entries its breach tier and NPC class let through by their weight, against the table's noDropWeight for nothing. The tier and class are the source's breach tier and context.npcClass, checked against each entry's minBreachTier and minNpcClass. An entry's chance is its weight over that total, and the chances combine like this:
- An entry of kind
SubTablerolls that table. An item's chance through it is the entry's chance times the item's chance in the sub-table, multiplied down every level, and the chances of an item reached along several paths add up. The game walks 10 tables at most, the first one included, and a pick that would go further gives nothing. - A source with a
secondaryTablepicks from it onsecondaryTableWeightpercent of picks, before it looks at what either table holds. If w is that weight, an item's chance is (100 − w) / 100 × its chance intable, plus w / 100 × its chance insecondaryTable. - A pick doesn't look at the budget. One that lands on an item the budget can't buy is a miss, so an item's chance holds at any budget that can buy it.
- A container, mining cache or beacon eruption picks from the table of the container tier it rolls,
context.containerProfiles[].lootTable. Its chance at a breach tier mixes those tables by how often the tier roll lands on each tier there:breachTiers[].weightout oftotalWeight. - A breach mutator multiplies the weight of every
SubTableentry that rolls one of itslootBoosts[].tablebyweightMultiplier, cut to a whole number (LootTableResolver.CalculateEffectiveWeight). It also shifts the container and supply cache tier rolls.withMutatorshas the chances that result.
Two kinds of source pick another way. A hub merchant rolls its stock with LootTableResolver.Roll, which passes over any item the stock budget can't buy and any sub-table with nothing left to pick; when one of its two tables has nothing to pick, every pick goes to the other. The supply cache rolls its tier, then draws among the items listed at the top of its context.pooledTables that the tier's cap in context.priceCaps covers, trying each lower tier in turn when none fits. It never rolls their sub-tables.
The odds are for a session with no blood and a pilot with no salvage luck, and they are per pick. A wreck or container keeps picking until its item limit, its budget or its misses stop it, so expected counts are left to you. /v1/loot-sources has each source's limits: context.maxItems, and for a wreck context.lootBudgets, its budget at each breach tier, and a faction flagship's where the NPC leads a group. A wreck pays for its guaranteed drops out of that budget first. A container's budget isn't served: it is a share of its spawn node's wallet, which the session splits among the map's nodes at random and grows as pilots join. Its tier then multiplies it by context.containerProfiles[].budgetMultiplier.
A source's places assume a session with no breach mutator, and so do the breach tiers at which a spawn node can pay for a container, a mining cache or a supply cache. A mutator that raises the session's budget or the value of its asteroid fields (sessionBudgetMultiplier and asteroidBudgetMultiplier in /v1/breach-mutators), such as hoard, forge or abundant, can let a node pay for one at a tier its places leave out.
Ship models
Every hull and NPC ship, and the hull of every ship in a kill, has a model: its 3D model as one GLB file (binary glTF) of up to about 600 KB. A kill's URLs are full URLs on art.thecitadel.com; the other routes give paths under /v1/art/. A ship without a model has null. To show one ship, read its record from /v1/hulls/{id} (or /v1/npcs) and fetch its model path from https://api.thecitadel.com.
A model holds every rarity skin of its ship as a material variant (KHR_materials_variants), named Normal, Augmented, Prototype and Artifact. Normal is the default, so a viewer that ignores variants draws that. Pick the variant that matches the hull's rarity. Textures are WebP (EXT_texture_webp) and the mesh is quantized (KHR_mesh_quantization). three.js's GLTFLoader and <model-viewer> read all three.
The materials are plain PBR baked from the game's own, so a ship keeps its paint and markings but not the game's lighting or effects such as cloaking and shields.
Bulk download
If you want all of it, take one file instead of walking every route.
Inside: one JSON file per route, byte for byte what that route serves, the icons under art/, and a manifest.json with the build and a SHA-256 for each file. The ship models stay out of the zip; fetch the ones you show from /v1/art. The zip only changes when the game data does, so If-None-Match works here too.
Stability policy
- New routes and new fields can appear at any time, without notice. Ignore fields you don't recognise.
- Removing or renaming a field, or changing what it means or its type, only happens in a new version. When
/v2ships,/v1keeps running for at least 90 days and its responses carry aDeprecationheader. - Game data isn't part of that promise. Items, hulls and numbers change whenever the game does.
Terms Draft
Use the data and art in community projects that don't make money. Credit it as "Data from the Citadel game data API", don't suggest we made or back your tool, and expect the service to change. These terms are still a draft: read the draft terms.
Reference
Every route and field, built from /v1/openapi.json (OpenAPI 3.1). Every operation has request samples in the same five languages.