API reference

Squads and heroes

squads contains the latest known formations, not a guaranteed current set of four squads. Regular squads have team < 100; 0 means the squad number is unknown. Personal caravan defence uses team 100-199; alliance caravan defence uses team ≥ 200. Defence numbers are not regular squad numbers.

Only known formations are available. A missing second or third squad does not mean the player has none. Squad heroes lists up to five known heroes in position order, but no explicit slot is returned. Top-level heroes is the known hero pool, not a complete inventory or another squad. Factions, hero names and troop tier labels are not included.

Keep player and alliance IDs as strings. Times are Unix seconds except alliance roster[].joined (Unix milliseconds); donation day uses YYYYMMDD. null, missing fields and empty arrays do not prove a zero value. asOf describes the overall profile; individual seen times may differ. Online status and last login time are not provided. No update frequency is guaranteed. Dates of data (asOf, seen, disbanded, history and detected events) have day precision: Unix timestamps at 00:00 UTC. Histories contain the last value of each day. Snapshot dates in API bodies and headers use the same precision. Game event times, alliance join times and quota resets retain their original precision.

Current rows and visible columns.
FieldMeaning
team / power / seenFormation number / its power or null / data time. Power is not calculated by adding heroes and may differ from current power.
heroes[].id / level / quality / awakenHero ID / level or null / quality code / awakening level.
heroes[].starStar step 0-50, not a star count. Five steps per star; 1-25 gold, 26-50 red.
heroes[].exclusiveStarExclusive weapon stars; -1 means unknown. 0 in star/quality/awaken can also mean details are unavailable.
raven / troops[]Raven level or null / [{soldier, count}]: soldier type ID and count. No separate faction or tier fields.
heroes[].seenTime of hero data in the top-level pool. Heroes inside squads have no separate seen; use squad seen.
JSON example (fictional data)
{
  "squads": [
    {
      "team": 2,
      "power": 12000000,
      "seen": 1793577600,
      "heroes": [
        {
          "id": 30006,
          "level": 100,
          "star": 25,
          "quality": 5,
          "awaken": 0,
          "exclusiveStar": -1
        }
      ],
      "raven": null,
      "troops": []
    },
    {
      "team": 201,
      "power": null,
      "seen": 1793577600,
      "heroes": [
        {
          "id": 30006,
          "level": 100,
          "star": 25,
          "quality": 5,
          "awaken": 0,
          "exclusiveStar": -1
        }
      ],
      "raven": null,
      "troops": []
    }
  ],
  "heroes": [
    {
      "id": 30006,
      "level": 100,
      "star": 25,
      "quality": 5,
      "awaken": 0,
      "exclusiveStar": -1,
      "seen": 1793577600
    }
  ]
}