steam


Getting CS:GO player stats


How could I use the Steam Web API to get a player's stats, such as "Total Kills" or "Total Wins". Some sites that use these features include http://csgo-stats.com and http://csgo-stats.net. I have tried using http://api.steampowered.com/ISteamUserStats/GetGlobalStatsForGame/v0001/?format=xml&appid=730&count=1&name[0]=total_wins with no success. Where is the documentation for such statistics?
I believe you are using the wrong API end point for this. Utilize the GetUserStatsForGame end point instead.
Your call will look like this:
http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=730&key=<<KEY>>&steamid=<<PROFILEID>>
You'll replace <<KEY>> with your API key and <<PROFILEID>> with the profile ID (not SteamID) of the user you are interested in. This value is the same one passed to you when you sign in via Valve's OpenID.
This will return a result similar to this:
{
"playerstats": {
"steamID": "7656-EDITED-OUT",
"gameName": "ValveTestApp260",
"stats": [
{
"name": "total_kills",
"value": 110527
},
{
"name": "total_deaths",
"value": 95930
},
{
"name": "total_time_played",
"value": 5784386
},
{
"name": "total_planted_bombs",
"value": 2726
},
{
"name": "total_defused_bombs",
"value": 594
},
{
"name": "total_wins",
"value": 26937
},
...
]
}
}
You can see that you need to iterate through the ['playerstats']['stats'] element and look at the name attribute of each to find the stats you are looking for.

Related Links

Steam API Get steam level of user?
Get Global Stats CSGO via steam web api
How to retrieve Steam username using SteamWorks API?
How to get steam items names?
Retrieve announcements from steam group
Steam: How retrieve game scheme data?
SteamID64 minimum and maximum length
IEconItems_730 api no longer working
Steam market API returns null
How to get the float value of CS:GO market items?
Using steam web api to access how many times players are reported for hacking
Steam game positive/negative recommendations
Alternatives to the CS:GO API?
Get list of players from server
Node-steam-trade, how to get items names?
Is it possible to create/join a lobby with 4 people, not on friends list, programmatically? [Steam + CSGO]

Categories

HOME
cntk
cil
meshlab
puzzle
nlp
webrtc
translation
mainframe
apollo
heap-memory
sbt-assembly
webdav
terrain
filter
dataframe
constructor
diagram
click
squarespace
derived
flexlm
backpropagation
embedly
apple-tv
avplayeritem
extractor
memsql
iis-10
activepython
java-ee-7
geopandas
skmaps
pygooglechart
gpib
vegan
android-vpn-service
modelandview
recurrence-relation
vmd
coreclr
polyfills
nashorn
productivity
fastq
windows-firewall
broadcast
mouseclick-event
component-pascal
fontconfig
mercury
unity3d-editor
gmt
spyne
gitweb
uiprogressview
fps
emokit
search-regex
amazon-kcl
brackets-shell
getrusage
jenkins-scriptler
ninject.web.mvc
integral
stream-framework
uos
robocode
multipleselection
ibmsbt
vcl
ogr2ogr
colt
alertifyjs
hamsterdb
gfs
windows-mobile-6
osx-snow-leopard
dig
stagefright
ienumerator
argb
device-emulation
arbor.js
vt100
pitch
symfony-2.0
file-exists
entity-framework-ctp5
fileutils
zookeeper
surf
newsstand-kit
django-nose
msbuildextensionpack
testunit
ets
symbol-server
libavformat
exitstatus
svn-hooks
j-interop
task-management
code-design
graph-layout
longjmp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App