Counter-Strike 2

Counter-Strike 2

View Stats:
lethality_x May 10, 2024 @ 3:23am
CS2 API for fetching premier rank
Hello community!

Do you know by any chance if it’s possible somehow to fetch the premier rank from the Steam Web API or something else? I would like to create a simple discord bot to show the current premier rank as an output like:
!rank <link_to_steam_profile> (or steamid64)

Thanks in advance for your responses!
< >
Showing 1-7 of 7 comments
♛⁧Schultheiß Jul 23, 2024 @ 3:33am 
If you need it for a simple discord bot, scraping data from sites like csstats, leetify and faceitanalyser should work well enough.
coda Jul 23, 2024 @ 3:33am 
Not exist. Easiest way is to fetch rating from csstats.
robin Jul 23, 2024 @ 3:40am 
hi
lethality_x Jul 23, 2024 @ 1:03pm 
Originally posted by coda:
Not exist. Easiest way is to fetch rating from csstats.
It actually does and there's also already npm package for it. I already found a way to fetch the premier rank stats, although it's a little bit tricky and you don't need any website scraping or using csstats. You just need some analytical thinking and make use of the already exiting package.
HINT: https://www.npmjs.com/package/globaloffensive
Last edited by lethality_x; Jul 23, 2024 @ 1:05pm
coda Jul 23, 2024 @ 1:32pm 
Originally posted by lethality_x:
Originally posted by coda:
Not exist. Easiest way is to fetch rating from csstats.
It actually does and there's also already npm package for it. I already found a way to fetch the premier rank stats, although it's a little bit tricky and you don't need any website scraping or using csstats. You just need some analytical thinking and make use of the already exiting package.
HINT: https://www.npmjs.com/package/globaloffensive
Looks like it's now what you want. This package isn't looks like an API. I think it works with your game client. So you could only fetch yours rating, and only if cs is installed on your machine. It's not suitable for a discord bot.
lethality_x Jul 23, 2024 @ 2:06pm 
Originally posted by coda:
Originally posted by lethality_x:
It actually does and there's also already npm package for it. I already found a way to fetch the premier rank stats, although it's a little bit tricky and you don't need any website scraping or using csstats. You just need some analytical thinking and make use of the already exiting package.
HINT: https://www.npmjs.com/package/globaloffensive
Looks like it's now what you want. This package isn't looks like an API. I think it works with your game client. So you could only fetch yours rating, and only if cs is installed on your machine. It's not suitable for a discord bot.
Nope, I can fetch everyone but by using an account as bot, which you add as friend. Therefore It's actually a perfect fit, that's why I said, that it's a little bit tricky to achieve it, but it does the job perfectly.
Good luck.
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: May 10, 2024 @ 3:23am
Posts: 7