Using Steam Web API to generate a small widget with account statistics
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Steam profile widget

Use Steam Web API to generate a small widget with account statistics (with caching)

Project contains 2 templates, one HTML and one image; HTML widget Image widget

Warning code is somewhat sloppy, partially commented, and there is little-to-no error handling.

Article/Tutorial for this project (link to my blog)


  • Edit set $api_key to your Steam Web API key
  • Upload to server
  • Give write permissions on cache/ folder, .html cache will be saved there
  • Give write permissions on icons/ folder, game icons/images will be saved there

GET Variables

  • debug if set, skips cache
  • t type of widget/output (1 = HTML, 2 = PNG image)
  • w width (default 248px for HTML, 640px for image)
  • h height (default 280px for HTML, 96px for image)
  • f image file format (only PNG for now)
  • c count of games to show (in HTML output)
  • p Steam profile URL, ID or nick


Set GET variable debug if you want to skip cache.

Cache is kept for 1 hour contains the Steam Web API calls index.php entry point, calls to get data, handles templating


templates folder contains templates, here you change the appearance of the widget Edit, minify it to and it will be used. If doesn't exist, is used as template.