-
Notifications
You must be signed in to change notification settings - Fork 7
Stats CSGO
The custom stat object structure for this game. Instead of using the original names from the Web API, you have to use these names to access data about the player.
Why? Because the data from the Steam Web API is very shallow, and stupidly returns an array of objects instead of a single object with many properties. All stats are converted to a single object in this library, making it a lot easier to access the data. This improves your experience when working with stats. In the Steam Web API, some names aren't very obvious, some data tracks totally different values than the schema suggests, and some stats are literally never tracked despite being in the schema. To fix that problem, a custom object definition is required.
With a custom object definition, names are more accurate, data is easier to access, and it
offers some extra documentation for the original stat names in the Web API. If you want to create a
custom object definition for your game, go ahead and check out the json folder in the
repository, and review the stats.json file and the specs/csgo.js file to see how it works.
Once you built a similar structure, go ahead and create a pull-request to add it to the project.
Due to the nature of the Web API, and to save space, unset stats are not returned in these objects. It's possible for a stat to be tracked, but not yet set for the player. This is true for achievements; any non-unlocked achievements will simply not be returned by the Web API at all. The same goes for stats. Before attempting to access any values, check that the exact path of objects already exists. Also remember that certain stats can have default values, so if they are unset, you should assume the default value specified in the schema as its true value.
Integer
kills
KillsInteger
deaths
DeathsInteger
time
Time playedObject
bombsInteger
planted
Bombs plantedInteger
defused
Bombs defusedObject
roundsInteger
won
Rounds wonInteger
pistol
Pistol rounds wonInteger
played
Rounds playedObject
matchesInteger
won
Matches wonInteger
played
Matches playedObject
demolitionInteger
won
Demolition matches wonObject
bombsInteger
planted
Bombs planted in DemolitionInteger
defused
Bombs defused in DemolitionObject
gungameObject
roundsInteger
won
Arms Race rounds wonInteger
played
Arms Race rounds playedObject
matchesInteger
won
Arms Race matches wonInteger
played
Arms Race matches playedInteger
won
Arms Race matches wonInteger
score
Total score in Arms RaceInteger
lastScore
Score in last Arms Race matchInteger
shots
Total shotsInteger
hits
Total hitsInteger
headshots
Headshot killsInteger
score
Total scoreInteger
damage
Damage dealtInteger
money
Money earnedInteger
mvps
Total MVPsInteger
rescues
Hostages rescuedInteger
sprays
Graffiti sprays (not tracked)Integer
knife
Knife killsInteger
knifeFight
Knife fight killsInteger
grenade
Grenade killsInteger
burns
Incendiary killsInteger
backfire
Kills with enemy's own weaponInteger
flashKill
Kills on blind enemyInteger
snipers
Kills on scoped snipersInteger
dominations
DominationsInteger
brutality
Kills on dominated enemyInteger
revenges
Kills on dominating enemyInteger
donated
Donated weaponsInteger
windows
Windows brokenObject
gunObject
glockInteger
shots
Glock-18 shotsInteger
hits
Glock-18 hitsInteger
kills
Glock-18 killsObject
deagleInteger
shots
Desert Eagle shotsInteger
hits
Desert Eagle hitsInteger
kills
Desert Eagle killsObject
dualiesInteger
shots
Dual Beretta shotsInteger
hits
Dual Beretta hitsInteger
kills
Dual Beretta killsObject
fivesevenInteger
shots
Five-SeveN shotsInteger
hits
Five-SeveN hitsInteger
kills
Five-SeveN killsObject
xm1014Integer
shots
XM1014 shotsInteger
hits
XM1014 hitsInteger
kills
XM1014 killsObject
mac10Integer
shots
MAC-10 shotsInteger
hits
MAC-10 hitsInteger
kills
MAC-10 killsObject
ump45Integer
shots
UMP-45 shotsInteger
hits
UMP-45 hitsInteger
kills
UMP-45 killsObject
p90Integer
shots
P90 shotsInteger
hits
P90 hitsInteger
kills
P90 killsObject
awpInteger
shots
AWP shotsInteger
hits
AWP hitsInteger
kills
AWP killsObject
ak47Integer
shots
AK-47 shotsInteger
hits
AK-47 hitsInteger
kills
AK-47 killsObject
augInteger
shots
AUG shotsInteger
hits
AUG hitsInteger
kills
AUG killsObject
famasInteger
shots
FAMAS shotsInteger
hits
FAMAS hitsInteger
kills
FAMAS killsObject
g3sg1Integer
shots
G3SG1 shotsInteger
hits
G3SG1 hitsInteger
kills
G3SG1 killsObject
m249Integer
shots
M249 shotsInteger
hits
M249 hitsInteger
kills
M249 killsObject
p2000Integer
shots
P2000 & USP-S shotsInteger
hits
P2000 & USP-S hitsInteger
kills
P2000 & USP-S killsObject
p250Integer
shots
P250 shotsInteger
hits
P250 hitsInteger
kills
P250 killsObject
sg553Integer
shots
SG 553 shotsInteger
hits
SG 553 hitsInteger
kills
SG 553 killsObject
scar20Integer
shots
SCAR-20 shotsInteger
hits
SCAR-20 hitsInteger
kills
SCAR-20 killsObject
ssg08Integer
shots
SSG 08 shotsInteger
hits
SSG 08 hitsInteger
kills
SSG 08 killsObject
mp7Integer
shots
MP7 shotsInteger
hits
MP7 hitsInteger
kills
MP7 killsObject
mp9Integer
shots
MP9 shotsInteger
hits
MP9 hitsInteger
kills
MP9 killsObject
novaInteger
shots
Nova shotsInteger
hits
Nova hitsInteger
kills
Nova killsObject
negevInteger
shots
Negev shotsInteger
hits
Negev hitsInteger
kills
Negev killsObject
sawedoffInteger
shots
Sawed-Off shotsInteger
hits
Sawed-Off hitsInteger
kills
Sawed-Off killsObject
bizonInteger
shots
PP-Bizon shotsInteger
hits
PP-Bizon hitsInteger
kills
PP-Bizon killsObject
tec9Integer
shots
Tec-9 shotsInteger
hits
Tec-9 hitsInteger
kills
Tec-9 killsObject
mag7Integer
shots
MAG-7 shotsInteger
hits
MAG-7 hitsInteger
kills
MAG-7 killsObject
m4a1Integer
shots
M4A4 & M4A1-S shotsInteger
hits
M4A4 & M4A1-S hitsInteger
kills
M4A4 & M4A1-S killsObject
galilInteger
shots
Galil AR shotsInteger
hits
Galil AR hitsInteger
kills
Galil AR killsObject
taserInteger
shots
Zeus x27 shotsInteger
hits
Zeus x27 hits (not tracked)Integer
kills
Zeus x27 killsObject
mapObject
italyObject
roundsInteger
won
Rounds won on ItalyInteger
played
Rounds played on ItalyObject
officeObject
roundsInteger
won
Rounds won on OfficeInteger
played
Rounds played on OfficeObject
aztecObject
roundsInteger
won
Rounds won on AztecInteger
played
Rounds played on AztecObject
cobbleObject
roundsInteger
won
Rounds won on CobblestoneInteger
played
Rounds played on CobblestoneObject
dust2Object
roundsInteger
won
Rounds won on Dust 2Integer
played
Rounds played on Dust 2Object
dustObject
roundsInteger
won
Rounds won on DustInteger
played
Rounds played on DustObject
infernoObject
roundsInteger
won
Rounds won on InfernoInteger
played
Rounds played on InfernoObject
nukeObject
roundsInteger
won
Rounds won on NukeInteger
played
Rounds played on NukeObject
piranesiObject
roundsInteger
won
Rounds won on PiranesiInteger
played
Rounds played on PiranesiObject
prodigyObject
roundsInteger
won
Rounds won on ProdigyInteger
played
Rounds played on ProdigyObject
tidesObject
roundsInteger
won
Rounds won on TidesObject
trainObject
matchesInteger
won
Matches won on TrainObject
roundsInteger
won
Rounds won on TrainInteger
played
Rounds played on TrainObject
assaultObject
roundsInteger
won
Rounds won on AssaultInteger
played
Rounds played on AssaultObject
lakeObject
matchesInteger
won
Matches won on LakeObject
roundsInteger
won
Rounds won on LakeInteger
played
Rounds played on LakeObject
safehouseObject
matchesInteger
won
Matches won on SafehouseObject
roundsInteger
won
Rounds won on SafehouseInteger
played
Rounds played on SafehouseObject
sugarcaneObject
matchesInteger
won
Matches won on SugarcaneObject
roundsInteger
won
Rounds won on SugarcaneInteger
played
Rounds played on SugarcaneObject
stmarcObject
matchesInteger
won
Matches won on St. MarcObject
roundsInteger
won
Rounds won on St. MarcInteger
played
Rounds played on St. MarcObject
millObject
roundsInteger
won
Rounds won on MillObject
shacksObject
roundsInteger
won
Rounds won on ShacksObject
bankObject
matchesInteger
won
Matches won on BankObject
roundsInteger
won
Rounds won on BankInteger
played
Rounds played on BankObject
alleywayObject
roundsInteger
won
Rounds won on AlleywayObject
depotObject
matchesInteger
won
Matches won on DepotObject
roundsInteger
won
Rounds won on DepotInteger
played
Rounds played on DepotObject
embassyObject
matchesInteger
won
Matches won on EmbassyObject
roundsInteger
won
Rounds won on EmbassyInteger
played
Rounds played on EmbassyObject
shortTrainObject
matchesInteger
won
Matches won on Short TrainObject
roundsInteger
won
Rounds won on Short TrainInteger
played
Rounds played on Short TrainObject
houseObject
roundsInteger
won
Rounds won on HouseObject
vertigoObject
roundsInteger
won
Rounds won on VertigoInteger
played
Rounds played on VertigoObject
balkanObject
roundsInteger
won
Rounds won on BalkanInteger
played
Rounds played on BalkanObject
monasteryObject
roundsInteger
won
Rounds won on MonasteryInteger
played
Rounds played on MonasteryObject
shootsObject
matchesInteger
won
Matches won on ShootsObject
roundsInteger
won
Rounds won on ShootsInteger
played
Rounds played on ShootsObject
baggageObject
matchesInteger
won
Rounds won on BaggageObject
roundsInteger
won
Rounds won on BaggageInteger
played
Rounds played on BaggageObject
militiaObject
roundsInteger
won
Rounds won on MilitiaInteger
played
Rounds played on MilitiaObject
lastInteger
wins
Last match rounds wonInteger
rounds
Last match rounds playedInteger
winsT
Last match Terrorist winsInteger
winsCT
Last match Counter-Terrorist winsInteger
players
Last match number of unique playersInteger
kills
Last match killsInteger
deaths
Last match deathsInteger
score
Last match scoreInteger
mvps
Last match MVPsObject
weaponInteger
id
Last match favorite weaponInteger
shots
Last match favorite weapon shotsInteger
hits
Last match favorite weapon hitsInteger
kills
Last match favorite weapon killsInteger
damage
Last match damage dealtInteger
spending
Last match money spentInteger
dominations
Last match dominationsInteger
revenges
Last match revenges
{
"name": "ValveTestApp260",
"count": 214,
"stats": {
"kills": 42959,
"deaths": 33612,
"time": 1780338,
"bombs": {
"planted": 1056,
"defused": 295
},
"rounds": {
"won": 17840,
"pistol": 580,
"played": 28765
},
"damage": 6068789,
"money": 63585608,
"rescues": 502,
"knife": 612,
"grenade": 141,
"gun": {
"glock": {
"kills": 1110,
"shots": 28008,
"hits": 5590
},
"deagle": {
"kills": 2714,
"shots": 21090,
"hits": 5930
},
"dualies": {
"kills": 309,
"shots": 5068,
"hits": 1309
},
"fiveseven": {
"kills": 884,
"shots": 10505,
"hits": 2929
},
"xm1014": {
"kills": 456,
"shots": 16518,
"hits": 3427
},
"mac10": {
"kills": 439,
"shots": 12850,
"hits": 2663
},
"ump45": {
"kills": 1008,
"shots": 20663,
"hits": 4639
},
"p90": {
"kills": 1251,
"shots": 39499,
"hits": 7401
},
"awp": {
"kills": 4651,
"shots": 13214,
"hits": 5119
},
"ak47": {
"kills": 8934,
"shots": 145820,
"hits": 29079
},
"aug": {
"kills": 749,
"shots": 10921,
"hits": 2746
},
"famas": {
"kills": 600,
"shots": 12934,
"hits": 2815
},
"g3sg1": {
"kills": 387,
"shots": 3338,
"hits": 719
},
"m249": {
"kills": 360,
"shots": 10843,
"hits": 1447
},
"p2000": {
"kills": 2170,
"shots": 35007,
"hits": 8679
},
"p250": {
"hits": 4538,
"kills": 1150,
"shots": 17763
},
"sg553": {
"kills": 1585,
"shots": 25719,
"hits": 5248
},
"scar20": {
"hits": 970,
"kills": 539,
"shots": 3626
},
"ssg08": {
"shots": 4444,
"hits": 1535,
"kills": 852
},
"mp7": {
"shots": 15532,
"hits": 3700,
"kills": 642
},
"mp9": {
"kills": 298,
"shots": 8060,
"hits": 1915
},
"nova": {
"hits": 4063,
"kills": 577,
"shots": 20228
},
"negev": {
"hits": 5118,
"kills": 1333,
"shots": 63896
},
"sawedoff": {
"shots": 8072,
"hits": 1571,
"kills": 259
},
"bizon": {
"shots": 13350,
"hits": 3108,
"kills": 467
},
"tec9": {
"kills": 737,
"shots": 12279,
"hits": 2683
},
"mag7": {
"shots": 12682,
"hits": 3013,
"kills": 448
},
"m4a1": {
"kills": 6491,
"shots": 110824,
"hits": 25856
},
"galil": {
"kills": 504,
"shots": 10343,
"hits": 2090
},
"taser": {
"kills": 86,
"shots": 227
}
},
"headshots": 17482,
"backfire": 1662,
"map": {
"italy": {
"rounds": {
"won": 256,
"played": 287
}
},
"office": {
"rounds": {
"won": 216,
"played": 399
}
},
"aztec": {
"rounds": {
"won": 158,
"played": 165
}
},
"cobble": {
"rounds": {
"won": 182,
"played": 355
}
},
"dust2": {
"rounds": {
"won": 3039,
"played": 7291
}
},
"dust": {
"rounds": {
"won": 133,
"played": 151
}
},
"inferno": {
"rounds": {
"won": 482,
"played": 985
}
},
"nuke": {
"rounds": {
"won": 197,
"played": 271
}
},
"train": {
"rounds": {
"won": 191,
"played": 319
},
"matches": {
"won": 7
}
},
"assault": {
"rounds": {
"played": 4
}
},
"lake": {
"rounds": {
"played": 104,
"won": 44
},
"matches": {
"won": 12
}
},
"safehouse": {
"rounds": {
"played": 65,
"won": 37
},
"matches": {
"won": 11
}
},
"sugarcane": {
"rounds": {
"played": 35,
"won": 33
},
"matches": {
"won": 3
}
},
"stmarc": {
"rounds": {
"played": 98,
"won": 44
},
"matches": {
"won": 8
}
},
"bank": {
"rounds": {
"played": 8,
"won": 8
},
"matches": {
"won": 5
}
},
"shortTrain": {
"rounds": {
"played": 293,
"won": 235
},
"matches": {
"won": 89
}
},
"house": {
"rounds": {
"won": 5
}
},
"vertigo": {
"rounds": {
"won": 6,
"played": 9
}
},
"monastery": {
"rounds": {
"won": 2,
"played": 5
}
},
"shoots": {
"rounds": {
"played": 48,
"won": 35
},
"matches": {
"won": 14
}
},
"baggage": {
"rounds": {
"played": 10,
"won": 7
},
"matches": {
"won": 7
}
}
},
"donated": 1370,
"windows": 121,
"flashKill": 524,
"knifeFight": 177,
"snipers": 2953,
"dominations": 1284,
"brutality": 1591,
"revenges": 435,
"hits": 148302,
"shots": 713446,
"last": {
"winsT": 9,
"winsCT": 12,
"wins": 16,
"players": 10,
"kills": 29,
"deaths": 13,
"mvps": 5,
"weapon": {
"id": 7,
"shots": 118,
"hits": 34,
"kills": 12
},
"damage": 3735,
"spending": 43050,
"dominations": 0,
"revenges": 0,
"score": 55,
"rounds": 21
},
"mvps": 4136,
"demolition": {
"bombs": {
"planted": 40,
"defused": 15
},
"won": 4147
},
"gungame": {
"rounds": {
"won": 6058,
"played": 6682
},
"matches": {
"won": 4179,
"played": 5127
},
"won": 42,
"score": 3379,
"lastScore": 0
},
"matches": {
"won": 4715,
"played": 6068
},
"score": 292742,
"burns": 215,
"unknown": {
"GI.lesson.csgo_instr_explain_buymenu": 16,
"GI.lesson.csgo_instr_explain_buyarmor": 0,
"GI.lesson.csgo_instr_explain_plant_bomb": 0,
"GI.lesson.csgo_instr_explain_bomb_carrier": 1,
"GI.lesson.bomb_sites_A": 0,
"GI.lesson.defuse_planted_bomb": 0,
"GI.lesson.csgo_instr_explain_follow_bomber": 0,
"GI.lesson.csgo_instr_explain_pickup_bomb": 0,
"GI.lesson.csgo_instr_explain_prevent_bomb_pickup": 0,
"GI.lesson.Csgo_cycle_weapons_kb": 16,
"GI.lesson.csgo_instr_explain_zoom": 16,
"GI.lesson.csgo_instr_explain_reload": 16,
"GI.lesson.tr_explain_plant_bomb": 0,
"GI.lesson.bomb_sites_B": 0,
"GI.lesson.version_number": 16,
"GI.lesson.find_planted_bomb": 1,
"GI.lesson.csgo_hostage_lead_to_hrz": 0,
"GI.lesson.csgo_instr_rescue_zone": 0,
"GI.lesson.csgo_instr_explain_inspect": 32
}
}
}> GetTradeHistory
> GetTradeStatus
> GetBadges
> GetCommunityBadgeProgress
> GetOwnedGames
> GetRecentlyPlayedGames
> GetSteamLevel
> GetAssetClassInfo
> GetAssetPrices
> GetFriendList
> GetPlayerBans
> GetPlayerSummaries
> GetUserGroupList
> ResolveVanityURL
> GetGlobalAchievement...
> GetNumberOfCurrentPlayers
> GetPlayerAchievements
> GetSchemaForGame
> GetUserStatsForGame