Explore the
DarkerDB API documentation, your gateway to harnessing Dark and Darker game data. Use our APIs to track in-game market trends, analyze live player stats, and access detailed item data, including stats, descriptions, and market data. Download game assets like item icons to enhance your apps or generate interactive tooltips. Feel free to get in touch with us in our Discord for support or to request new features or data!
Icon Transforms
Every /icon and /image endpoint (classes, modules, perks, items, monsters, map icons, …) accepts the same set of transform query params. Source bytes are content-addressed and the transform is deterministic, so variant URLs inherit the source's immutable cache headers — browsers and CDNs hold a variant forever per patch.
No params → original bytes are streamed unchanged (BinaryFileResponse fast path). Any one param flips the request into the Imagick pipeline.
| Param | Values | Notes |
|---|---|---|
| size | N or WxH | 1–512 per axis. Plain 64 means 64×64. |
| dpr | 1 · 2 · 3 | Multiplies size for retina renders. size=64&dpr=2 → 128×128. |
| format | png · webp | WebP is ~30% smaller than PNG for the same image. Other formats register only when the API container ships their delegate. |
| trim | bare flag · true · false | Auto-strips transparent margin with a 1% fuzz. Useful when the source PNG has heavy padding (most perk + class icons). |
| bg | #RRGGBB · #RRGGBBAA · transparent | Background fill. Required if you flatten to an opaque format and want anything other than black behind transparent pixels. |
Invalid input returns 400 with the rule that failed. The original source is always reachable by omitting every transform param.
Examples
The same source icon, resized and re-encoded to WebP:
The same icon trimmed of its transparent margin and flattened onto a solid background: