Skip to content
DonutStatsAPI
Sign up
Images

Item card

A share card with an item's icon, market price and order book.

GET/v1/images/item/{key}.png

Renders the card DonutStats shows when a price page is shared. It shows the item icon, its variant, the market price, the best buy order and how many are listed.

The key is a product key followed by .png, URL encoded like everywhere else: diamond.png, or netherite_sword%5Bsharpness%3A5%5D.png for an enchanted sword. Try different items on the image generator.

Authentication

None needed. 60 images per minute per IP.

Cached for

10 min

Data updates

Rendered from the latest prices, then cached for 10 minutes.

No key needed

Image endpoints are public so you can put them straight into an <img> tag, a Discord embed or a README. They are limited to 60 images per minute per IP address, and every image is cached for 10 minutes.

Path parameters

  • keystringrequired

    Product key followed by .png. Find keys with GET /v1/items.

Response

A 1200 x 630 PNG image.

  • content-typeheader

    Always image/png.

  • cache-controlheader

    public, max-age=600: cache the image for 10 minutes.

Status codes

StatusWhen
400Bad RequestThe file name is malformed.
404Not FoundThere is nothing to draw: a player DonutStats has never seen, or an unknown item.
429Too Many RequestsMore than 60 images in a minute from your IP address.