Skip to content
DonutStatsAPI
Sign up
Players

Get a player's history

Daily and intraday history of every stat, ready to chart.

GET/v1/players/{username}/history

Returns two series per stat. history has one value per UTC day: the last value of that day. samples has individual readings. By default that is every reading from the last 2 days and at most one per 6 hours before that, which keeps responses small. Ask for detail=full to get every reading in the window.

History starts the first time a player's stats were recorded and is kept forever.

Authentication

API key with the read scope

Cached for

1 min

Data updates

A point is added every time the player's stats change.

Path parameters

  • usernamestringrequired

    Minecraft username, case insensitive. 1 to 16 letters, digits or underscores, with an optional leading dot for Bedrock players.

Query parameters

  • statstringoptional

    Only this stat. Leave it out to get all of them.

    moneyshardskillsdeathsplaytimeplacedBlocksbrokenBlocksmobsKilled
  • daysintegeroptionaldefault 90

    How many days back to go.

    1 to 3,650
  • detailstringoptionaldefault compact

    compact: thin out samples older than 2 days. full: every reading in the window.

    compactfull

Response

Series keyed by stat.

  • usernamestring

    The username you asked for.

  • daysinteger

    The window you asked for.

  • detailstring

    The detail level you asked for.

  • historyobject

    One array per stat, oldest first.

    Show3 child fields
    • daystring

      UTC date, YYYY-MM-DD.

    • ttimestamp

      Midnight UTC of that day.

    • valuenumber

      Last value of the day.

  • samplesobject

    One array per stat, oldest first.

    Show2 child fields
    • ttimestamp

      When the reading was taken.

    • valuenumber

      The reading.

Status codes

StatusWhen
400Bad RequestInvalid username, stat, days or detail.
404Not FoundThe player is not on record.