PDA

View Full Version : [TF2] Unified Open API for looking up bans


Nikkii
03-04-2016, 20:44
Often we'll have a few people on our servers that are fishy, but we can't pinpoint whether they're cheating or not. The best way to do this is to google their SteamID2 with "sourcebans" in the query. This gets you a list of servers where they appear in their SourceBans database for whatever reason.

After a while of doing this, it got tedious. I have aggregated the bans from 5 different communities (currently) - and put their results into a single API. Communities in this list will only be well-known and trustworthy, though the results should be taken with a grain of salt (bans could be for reasons other than cheating, and not for reasons you particularly agree with.) It reports expired bans, too, so take that into account when querying the API, as it should only be used as a guideline or resource to help with a ban decision.

The following URL accepts GET or POST, either with the steamid parameter in the query or body, as a Steam2, Steam3, or Community ID.

https://api.meow.tf/sourcebans/lookup?steamid=<steamid2/steamid3/steamid64>Responses are as follows:

Empty:

{
"query": "76561198046627751",
"steamid": {
"steam2": "STEAM_0:1:43181011",
"steam3": "[U:1:86362023]",
"community": "76561198046627751"
},
"time": 1457141370,
"results": {
"probablyaserver": [],
"firepowered": [],
"gaming-servers": [],
"skial": [],
"tf2app": []
}
}
Results:
{
"query": "STEAM_0:1:91821056",
"steamid": {
"steam2": "STEAM_0:1:91821056",
"steam3": "[U:1:183642113]",
"community": "76561198143907841"
},
"time": 1457142906,
"results": {
"probablyaserver": [
{
"authid": "STEAM_0:1:91821056",
"name": "R4V3N",
"reason": "Wallhack, Ping masking, Trigger bot",
"created_at": 1456711708,
"expires_at": null,
"removed_at": null
}
],
"firepowered": [],
"gaming-servers": [],
"skial": [],
"tf2app": [
{
"authid": "STEAM_0:1:91821056",
"name": "Tai-Ni-Po-Ni",
"reason": "Steam Community Group Ban (annoyingprogamers) LMAOBOX group",
"created_at": 1432232820,
"expires_at": null,
"removed_at": null
}
]
}
}It is rate limited to 30 unique lookups an hour. Subsequent lookups of the same id or cached lookups do not count towards this limit.

Special thanks to Dr. McKay and the communities whose SourceBans installations this uses. Is your community in this list, and you don't want it to be? Perhaps you want it added? Let me know via PM here, on GameSurge (Nick: Nikkii), or Steam.

Communities:


ProbablyAServer
FirePowered
Gaming-Servers.net
TF2APP
Skial

Dagothur
03-05-2016, 08:45
Neat. What response is returned when you reach the rate limit?


EDIT:

This guy isn't showing any hits:

https://api.meow.tf/sourcebans/lookup?steamid=STEAM_0:0:119672057
https://www.skial.com/sourcebans/index.php?p=banlist&advSearch=[U:1:239344114]&advType=steamid&Submit

Nikkii
03-05-2016, 14:03
Neat. What response is returned when you reach the rate limit?


EDIT:

This guy isn't showing any hits:

https://api.meow.tf/sourcebans/lookup?steamid=STEAM_0:0:119672057
https://www.skial.com/sourcebans/index.php?p=banlist&advSearch=[U:1:239344114]&advType=steamid&Submit

Rate limit is just an HTTP 429 response with the body "{"success":false, "error": "Too Many Attempts."}"

That's because they store their SteamIDs in the steam3 format I guess, thanks for pointing this out, I'll fix it up :)

Edit: All fixed.