Get list of players from server

Guerrilla picture Guerrilla · Aug 14, 2015 · Viewed 11k times · Source

I would like to be able to get a complete player list from a server, either by using server IP or a player that is currently logged into server.

The game I want to do this specifically for is Ark Survival Evolved.

I have looked at the Steam Web API documentation and cannot see any endpoint with this data however in the steam client this is all viewable with "view game info".

Is it possible to do this via a Steam API or do I have to figure out how to manually handshake with the game server to retrieve this data. I have searched high and low but cannot find the answer. Any help greatly appreciated.

Answer

johnf picture johnf · Oct 12, 2015

It's possible to get the information using the Valve A2S Protocol, at least for some servers.

You can use the the python-valve library to query the server.

I have written an IRC plugin for Supybot/Limnoria that implements this check. You can see an example of it's use in the code.