Introduction

Public documentation for the Wynncraft API v3

V1 and V2 APIs are deprecated and are considered legacy APIs.

The Wynncraft API lets applications read public game, player, guild, item, leaderboard, map, and news data.

Base URL: https://api.wynncraft.com/v3

If you are migrating from a legacy API, most structures were kept familiar where practical. Some responses were reworked where the old shape was difficult to use, especially player stats.

API changelogs and upcoming changes are announced on the developer Discord and listed in changelog.

Caching

GET requests are cached with route-specific TTLs. Cached responses include standard cache headers such as Cache-Control and Expires.

Responses can come from different cache sources:

SourceDescription
USERCached for the current authenticated user. Shared between that user’s tokens.
SHAREDCached globally and shared between all callers.

Throttling and Rate Limits

Rate limits are tracked per bucket. Current buckets are:

BucketGuestAuthenticated
SHARED50 RPM120 RPM
PLAYER50 RPM120 RPM
GUILD50 RPM120 RPM
ITEMS50 RPM120 RPM
LEADERBOARDS50 RPM120 RPM
MAP50 RPM120 RPM

Each bucket is tracked independently. For example, using both PLAYER and GUILD buckets allows requests against each bucket separately.

See Authentication for authenticated request support.

Headers

The API includes quality-of-life HTTP headers:

HeaderDescription
Cache-ControlTTL of the current route in seconds.
Cache-SourceOrigin of the cached content.
DateDate of the current request.
ExpiresExpiration date for cached responses.
RateLimit-RemainingRequests remaining before rate limiting.
RateLimit-ResetSeconds before the rate-limit counter resets.
RateLimit-LimitAllowed requests in the current cycle.
RateLimit-BucketRate-limit bucket used by the request.
VersionCurrent API version.
UserIDAuthenticated user ID, when authenticated.
UserTypeAuthenticated user type, SESSION or TOKEN.

Errors

Errors use a common format:

1{
2 "error": "ErrorName",
3 "detail": "Error description",
4 "code": 400
5}

See Exceptions for the known exception list.

Multi-Selectors

Some queries can match multiple resources. In those cases, the API can return a MultipleObjectsReturned response with code 300 and an objects dictionary.

1{
2 "error": "MultipleObjectsReturned",
3 "detail": "Query returned multiple results.",
4 "code": 300,
5 "objects": {
6 "1ed075fc-5aa9-42e0-a29f-640326c1d80c": {
7 "username": "Salted",
8 "rank": "Administrator",
9 "supportRank": "hero",
10 "shortenedRank": "Admin",
11 "legacyRankColour": {
12 "main": "#aa0000",
13 "sub": "#ff5555"
14 },
15 "rankBadge": "nextgen/badges/rank_owner.svg"
16 }
17 }
18}

API Markup Parser

Some API fields contain rendered Wynncraft markup as HTML. The parser always emits predictable <span> elements.

Allowed style values:

  • text-decoration: underline
  • text-decoration: line-through
  • font-style: italic
  • font-weight: bolder
  • color: #XXXXXX
  • margin-left: 7.5px
  • margin-left: 20px

Allowed classes:

ClassDescription
font-asciiRegular Wynncraft font.
font-commonElemental and combat icon font.
font-defaultMerged common/ascii font. Rare in responses.
font-fiveFont used by some in-game banners.
font-wynnicWynnic web font.
font-high_gavelianHigh Gavelian font.
font-old_frumanOld Fruman font.

Fonts are available on the CDN under https://cdn.wynncraft.com/nextgen/fonts.

1@font-face {
2 font-family: "five";
3 src: url("https://cdn.wynncraft.com/nextgen/fonts/five.woff");
4 font-weight: normal;
5 font-style: normal;
6 font-display: block;
7}
8
9.font-five {
10 font-family: "five";
11}

Media URLs

Some responses include partial media paths. Complete those paths with the CDN base URL: https://cdn.wynncraft.com/nextgen

The API will never return the full URLs for assets coming from the CDN.