Created
October 3, 2021 14:15
-
-
Save Kr3m/e534fb4a75df5e1bdcd0dc64f0fc32b8 to your computer and use it in GitHub Desktop.
Retrieve total number of Steam players currently playing a game.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Usage: ./playercount.sh "Warfork" | |
#!/bin/bash | |
appid=$(curl -s https://api.steampowered.com/ISteamApps/GetAppList/v0002/ | jq ".applist.apps[] | select(.name==\"$1\")" | jq '.appid') | |
curl -s https://api.steampowered.com/ISteamUserStats/GetNumberOfCurrentPlayers/v1/?appid="$appid" | jq '.response.player_count' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment