Listing your private Steam games

At the end of 2023 Valve introduced Steam Private Games, allowing you to hide games in your library from anyone but yourself. I’m not going to make a porn game joke, because as a German I can’t even buy those.

That feature has a useful side effect, which I might elaborate on in another post. Either way: I found myself wanting to determine all the games I had set to Private. This turned out trickier than it should be – as far as I can tell, neither the Steam client nor website allow you to filter your games on that criterium.

However, if you’re logged in and browse to the All Games tab of your own Steam Community profile (e.g. this link for my profile), that list does include private games and they sport a fancy little “private” icon:

I am no longer interested in Rust.

That means we can extract the information via the JavaScript Console. I don’t know how stable the ._2UkkK2haCjZZi3oNZjrHTt CSS class is to identify the little crossed-through eye icon, but it remained the same for a couple of weeks now at least. If you know of a less brittle way1 to get this information, I’d love to know!

var privatedGameIcons = document.querySelectorAll('._2UkkK2haCjZZi3oNZjrHTt');
var privatedGames = Array.from(privatedGameIcons).map(function(element) {
  return element.parentNode.parentNode.parentNode.querySelector('div').querySelector('span')
});

var result = Array.from(privatedGames).map(function(element) {
  return element.innerText + " | " + element.querySelector('a').href;
});

console.log(result.join("\n"));

Here’s what it looks like in action:

Example output, showing some of the games I marked as private.


  1. There’s a private GetPrivateAppList API endpoint, but my normal API key can’t auth requests to it. When looking at the request via web inspector the return value seems to be encoded, but I’m not sure in what way. ↩︎