Skip to content

Instantly share code, notes, and snippets.

@unex
Last active May 6, 2024 22:33
Show Gist options
  • Save unex/41e9a356327fff31db13cd84edf8905e to your computer and use it in GitHub Desktop.
Save unex/41e9a356327fff31db13cd84edf8905e to your computer and use it in GitHub Desktop.

Steam Web

A collection of variables, functions and endpoints the Steam website uses

Variables

g_sessionID Your Steam session ID

g_steamID Your Steam ID

Store

g_ServerTime Steam server timestamp

App

g_eDiscoveryQueueType

Market

g_bLoggedIn bool logged-in state

g_rgWalletInfo Wallet information

g_strCountryCode Your country code

g_strLanguage Your language

Functions

Soon....

Endpoints

These are cross-domain protected, so they will only work in a userscript etc

Craft a badge

POST https://steamcommunity.com/id/<userid>/ajaxcraftbadge/
Parameters
appidThe badge ID
seriesThe card deck series
border-colornot sure what this is, set it to '0'
sessionidYour g_sessionID
Example Response
{
    "success": 1,
    "rgDroppedItems": [ // List of drops recieved
        {
            "title": "",
            "label": "",
            "description": "",
            "image": "",
            "economy_hover_data": ""
        }
    ],
    "Badge": { // Leveled-up badge info
        "image": "",
        "title": "",
        "xp": "",
        "unlocked_time": 1482886723,
        "game": ""
    }
}

Get an items market pricing info

GET https://steamcommunity.com/market/itemordershistogram/
Parameters
countryYour g_strCountryCode
languageYour g_strLanguage
currencyYour wallet currency
item_nameidThe item market ID
Example Response

Create item buy order

POST https://steamcommunity.com/market/createbuyorder/
Parameters
appidThis should equal 753 for most things
market_hash_namehash name of market item
price_totalprice for your order
quantitynumber you would like to buy
currencyYour wallet currency
sessionidYour g_sessionID
Example Response

Check buy order status

POST https://steamcommunity.com/market/getbuyorderstatus/
Parameters
buy_orderidThe orderid returned when you make a buy order
sessionidYour g_sessionID
Example Response

Cancel buy order

POST https://steamcommunity.com/market/cancelbuyorder/
Parameters
buy_orderidThe orderid returned when you make a buy order
sessionidYour g_sessionID
Example Response

Get your store game data

GET https://store.steampowered.com/dynamicstore/userdata/
Example Response

Add a game to your wishlist

POST https://store.steampowered.com/api/addtowishlist/
Parameters
appidApp ID
sessionidYour g_sessionID
Example Response

Remove a game from your wishlist

POST https://store.steampowered.com/api/removefromwishlist
Parameters
appidApp ID
sessionidYour g_sessionID
Example Response

Get comments on a Steam profile

POST steamcommunity.com/comment/Profile/render/<userid>/-1/
Parameters
countNumber of comments you wish to retrieve, can be set to Number.POSITIVE_INFINITY to get all
startNot sure what this is, seems to always be 0
sessionidYour g_sessionID
Example Response

Comment on a profile

POST http://steamcommunity.com/comment/Profile/post/<userid>/-1/
Parameters
commentYour comment text
countNot sure what this is, seems to always be 6
sessionidYour g_sessionID
Example Response
{  
   "success":true,
   "name":"Profile_<userid>_0",
   "start":0,
   "pagesize":"6",
   "total_count": 0, // Total count of all comments
   "upvotes":0,
   "has_upvoted":0,
   "comments_html: "", // HTML string of current comments page
   "timelastpost":1482905415
}

Delete comment from a profile

POST http://steamcommunity.com/comment/Profile/delete/<userid>/-1/
Parameters
gidcommentThe comment ID
startNot sure what this is, seems to always be 0
countNot sure what this is, seems to always be 6
sessionidYour g_sessionID
Example Response
{  
   "success":true,
   "name":"Profile_<userid>_0",
   "start":0,
   "pagesize":"6",
   "total_count": 0, // Total count of all comments
   "upvotes":0,
   "has_upvoted":0,
   "comments_html: "", // HTML string of current comments page
   "timelastpost":1482905415
}
@unex
Copy link
Author

unex commented May 27, 2017

https://steamcommunity.com/my/ajaxaliases/

$J.post(g_rgProfileData.url + '/ajaxsetpersonaname', {'persona': 'doggo', 'sessionid': g_sessionID}).then(r => { console.log(r) })

@sp0ok3r
Copy link

sp0ok3r commented Apr 18, 2019

and Clear Aliases? exists?

@Revadike
Copy link

Hey, I would love it if you are willing to incorporate your work into https://github.com/Revadike/InternalSteamWebAPI/wiki <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment