Counter-Strike 2

Counter-Strike 2

View Stats:
Armand.ol Nov 11, 2016 @ 3:41pm
API for tracking stats of a game
Is there an existing API which can be used to track the score and stats of a game live and display it on a web page?
< >
Showing 1-15 of 25 comments
PFC Demigo [29th ID] (Banned) Nov 11, 2016 @ 4:50pm 
No idea but there is this
http://csgo-stats.com/
Armand.ol Nov 12, 2016 @ 1:19am 
Yeah thank you I know that api already.
But I am curious if there is one (should be one probably) to get live scores of a match.
Jud May 14, 2019 @ 6:32am 
You can track Competitive and Wingman games live using https://csgo-stalker.com
λ | CODY May 25, 2019 @ 1:32pm 
that's cool, but anywhere where data is not actually human readable? xd

I'm looking for a JSON API
Roco May 25, 2019 @ 1:38pm 
Originally posted by ♡ C O D Y ♡:
that's cool, but anywhere where data is not actually human readable? xd

I'm looking for a JSON API
after digging around i found this as an example

https://steamcommunity.com/id/codingneko/stats/csgo/?xml=1

found them in here https://partner.steamgames.com/documentation/community_data

Edit: might not be the exact data you need actually xd
Last edited by Roco; May 25, 2019 @ 1:39pm
λ | CODY May 25, 2019 @ 1:45pm 
Originally posted by Roco:
Originally posted by ♡ C O D Y ♡:
that's cool, but anywhere where data is not actually human readable? xd

I'm looking for a JSON API
after digging around i found this as an example

https://steamcommunity.com/id/codingneko/stats/csgo/?xml=1

found them in here https://partner.steamgames.com/documentation/community_data

Edit: might not be the exact data you need actually xd

nop, that I had already seen, I'm looking for lobby and live game information mainly, everything else is a plus, but thanks for taking the time to find the links :LIS_pixel_heart:
T.w² rockhog May 25, 2019 @ 1:46pm 
the necro.. jeez
Roco May 25, 2019 @ 1:47pm 
Originally posted by ♡ C O D Y ♡:
Originally posted by Roco:
after digging around i found this as an example

https://steamcommunity.com/id/codingneko/stats/csgo/?xml=1

found them in here https://partner.steamgames.com/documentation/community_data

Edit: might not be the exact data you need actually xd

nop, that I had already seen, I'm looking for lobby and live game information mainly, everything else is a plus, but thanks for taking the time to find the links :LIS_pixel_heart:
tried using the webapi ?
λ | CODY May 25, 2019 @ 1:54pm 
Originally posted by Roco:
Originally posted by ♡ C O D Y ♡:

nop, that I had already seen, I'm looking for lobby and live game information mainly, everything else is a plus, but thanks for taking the time to find the links :LIS_pixel_heart:
tried using the webapi ?
Yeah, I've been looking around the docs for a while, closest I could find was this endpoint
http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/?appid=730 (csgo archivements and stats) or this one https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/ (user information and currently playing game, but no live match data)
Armand.ol May 27, 2019 @ 3:16pm 
Methods for retrieving different data regarding CS:GO

First of all, thank you for reviving my old thread. Back at the time I was also eager to do something cool with the CS:GO API. At least I thought it is possible and there is some usable API to retrieve information about ongoing matches from, and analyze games after they have ended.

Unfortunately, CS:GO does not provide a cool API (like Dota2 does), where you can retrieve data about any game, BUT there are alternatives!


Alternative 1 - WebAPI
While this does not represent a good alternative, as it is limited, it may be interesting for some of you. The Steam WebAPI offers different endpoints. Unfortunately, it does not offer endpoints where you can retrieve data for specific CS:GO matches. You can, however, query some data about the overall game stats regarding CS:GO for your user. For example, the
ISteamUserStats
interface has a method called
GetUserStatsForGame
This method returns general data about a game, for example CS:GO, where you can extract information like your total kills or total deaths.

Example URL: http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/?appid=730&key=<APIKEY>&steamid=<STEAMID>
Note: In this case, 730 is the appid for CS:GO!

Visit the Steam WebAPI reference doc for more information.

Alternative 2 - Demos
Ever wondered how https://csgo-stats.com/ or https://csgostats.gg/ are able to analyze your games by pulling data from an API? Well, the answer is they do not use an API for that. Instead, they simply use your Demo file. Whenever someone shares their link to the demo (i.e. match) they want to analyze, these sites actually analyze your demo! If you need more information on this one, you can research it on your own or pm me!

Alternative 3 - (Personal) Live Data
Steam also offers something called Game State Integration. In short, this allows to track almost any LIVE data during a match. For example, you can track which weapon you are currently holding, how much bullets are in your magazine and so on. However, this is intended for integrating other applications with CS:GO and therefore you have to locally add a configuration that enables your CS:GO game to send such live data to a server by using events and push notifications. You can read more about this here: CS:GO Game State Integration

I hope I could clarify the actual status of CS:GO and its (somewhat) limited API. Feel free to ask if you have further questions!
Last edited by Armand.ol; May 27, 2019 @ 3:27pm
hera aeth May 27, 2019 @ 3:23pm 
H
λ | CODY May 27, 2019 @ 3:55pm 
Originally posted by Armand.ol:
Methods for retrieving different data regarding CS:GO

First of all, thank you for reviving my old thread. Back at the time I was also eager to do something cool with the CS:GO API. At least I thought it is possible and there is some usable API to retrieve information about ongoing matches from, and analyze games after they have ended.

Unfortunately, CS:GO does not provide a cool API (like Dota2 does), where you can retrieve data about any game, BUT there are alternatives!


Alternative 1 - WebAPI
While this does not represent a good alternative, as it is limited, it may be interesting for some of you. The Steam WebAPI offers different endpoints. Unfortunately, it does not offer endpoints where you can retrieve data for specific CS:GO matches. You can, however, query some data about the overall game stats regarding CS:GO for your user. For example, the
ISteamUserStats
interface has a method called
GetUserStatsForGame
This method returns general data about a game, for example CS:GO, where you can extract information like your total kills or total deaths.

Example URL: http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/?appid=730&key=<APIKEY>&steamid=<STEAMID>
Note: In this case, 730 is the appid for CS:GO!

Visit the Steam WebAPI reference doc for more information.

Alternative 2 - Demos
Ever wondered how https://csgo-stats.com/ or https://csgostats.gg/ are able to analyze your games by pulling data from an API? Well, the answer is they do not use an API for that. Instead, they simply use your Demo file. Whenever someone shares their link to the demo (i.e. match) they want to analyze, these sites actually analyze your demo! If you need more information on this one, you can research it on your own or pm me!

Alternative 3 - (Personal) Live Data
Steam also offers something called Game State Integration. In short, this allows to track almost any LIVE data during a match. For example, you can track which weapon you are currently holding, how much bullets are in your magazine and so on. However, this is intended for integrating other applications with CS:GO and therefore you have to locally add a configuration that enables your CS:GO game to send such live data to a server by using events and push notifications. You can read more about this here: CS:GO Game State Integration

I hope I could clarify the actual status of CS:GO and its (somewhat) limited API. Feel free to ask if you have further questions!

That is INCREDIBLY useful, thank you SO much, I'll have a look into the demos option, Live Data doesn't seem like a good fit for what I was planning to do.
Call Me Sempai May 27, 2019 @ 5:21pm 
and how to i improve my stats?
Armand.ol May 28, 2019 @ 1:12am 
Originally posted by ♡ C O D Y ♡:
Originally posted by Armand.ol:
Methods for retrieving different data regarding CS:GO

First of all, thank you for reviving my old thread. Back at the time I was also eager to do something cool with the CS:GO API. At least I thought it is possible and there is some usable API to retrieve information about ongoing matches from, and analyze games after they have ended.

Unfortunately, CS:GO does not provide a cool API (like Dota2 does), where you can retrieve data about any game, BUT there are alternatives!


Alternative 1 - WebAPI
While this does not represent a good alternative, as it is limited, it may be interesting for some of you. The Steam WebAPI offers different endpoints. Unfortunately, it does not offer endpoints where you can retrieve data for specific CS:GO matches. You can, however, query some data about the overall game stats regarding CS:GO for your user. For example, the
ISteamUserStats
interface has a method called
GetUserStatsForGame
This method returns general data about a game, for example CS:GO, where you can extract information like your total kills or total deaths.

Example URL: http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/?appid=730&key=<APIKEY>&steamid=<STEAMID>
Note: In this case, 730 is the appid for CS:GO!

Visit the Steam WebAPI reference doc for more information.

Alternative 2 - Demos
Ever wondered how https://csgo-stats.com/ or https://csgostats.gg/ are able to analyze your games by pulling data from an API? Well, the answer is they do not use an API for that. Instead, they simply use your Demo file. Whenever someone shares their link to the demo (i.e. match) they want to analyze, these sites actually analyze your demo! If you need more information on this one, you can research it on your own or pm me!

Alternative 3 - (Personal) Live Data
Steam also offers something called Game State Integration. In short, this allows to track almost any LIVE data during a match. For example, you can track which weapon you are currently holding, how much bullets are in your magazine and so on. However, this is intended for integrating other applications with CS:GO and therefore you have to locally add a configuration that enables your CS:GO game to send such live data to a server by using events and push notifications. You can read more about this here: CS:GO Game State Integration

I hope I could clarify the actual status of CS:GO and its (somewhat) limited API. Feel free to ask if you have further questions!

That is INCREDIBLY useful, thank you SO much, I'll have a look into the demos option, Live Data doesn't seem like a good fit for what I was planning to do.

There are multiple projects already available for parsing the demo files. Some examples might be https://github.com/ValveSoftware/csgo-demoinfo or https://github.com/StatsHelix/demoinfo
λ | CODY May 28, 2019 @ 12:11pm 
Originally posted by Armand.ol:
Originally posted by ♡ C O D Y ♡:

That is INCREDIBLY useful, thank you SO much, I'll have a look into the demos option, Live Data doesn't seem like a good fit for what I was planning to do.

There are multiple projects already available for parsing the demo files. Some examples might be https://github.com/ValveSoftware/csgo-demoinfo or https://github.com/StatsHelix/demoinfo

>C# and C++
I'm a JavaScript peasant, thank you though, low level demigod :LIS_pixel_heart:
< >
Showing 1-15 of 25 comments
Per page: 1530 50

Date Posted: Nov 11, 2016 @ 3:41pm
Posts: 25