steamcommunity

0
0
Source

Retrieves Steam inventory data for a user from steamcommunity.com

Install

mkdir -p .claude/skills/steamcommunity && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7140" && unzip -o skill.zip -d .claude/skills/steamcommunity && rm skill.zip

Installs to .claude/skills/steamcommunity

About this skill

Steam Community Inventory Skill

Retrieve and browse a Steam user's inventory, and send/manage trade offers on steamcommunity.com.

Setup

  1. Find your Steam ID (SteamID64):

    • Go to your Steam profile page
    • If your URL is https://steamcommunity.com/profiles/76561198012345678, your Steam ID is 76561198012345678
    • If your URL uses a vanity name like https://steamcommunity.com/id/myname, visit steamid.io and paste your profile URL to get your SteamID64
  2. Get your Steam Web API key:

  3. Get your Steam session cookies (required for trade offers and bypassing inventory rate limits):

    • Log in to steamcommunity.com in your browser
    • Open Developer Tools (F12) > Application tab > Cookies > https://steamcommunity.com
    • Copy the value of the steamLoginSecure cookie
    • Copy the value of the sessionid cookie
  4. Set environment variables:

    export STEAM_ID="your-steamid64"
    export STEAM_API_KEY="your-api-key"
    export STEAM_COOKIES="steamLoginSecure=your-cookie-value"
    export STEAM_SESSION_ID="your-sessionid-cookie-value"
    

Usage

All commands use curl to hit the Steam Community inventory endpoint. The context ID is 2 for all standard game inventories.

Common App IDs

GameApp ID
CS2 / CS:GO730
Team Fortress 2440
Dota 2570
Rust252490
PUBG578080
Steam Community (trading cards, etc.)753

Get inventory for a game

Replace $APP_ID with the game's App ID (see table above). Context ID is 2 for all standard game inventories.

curl -s "https://steamcommunity.com/inventory/$STEAM_ID/$APP_ID/2?l=english&count=2000" \
  -H "Cookie: $STEAM_COOKIES" | jq '.'

Get CS2 inventory

curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000" \
  -H "Cookie: $STEAM_COOKIES" | jq '.'

Get a summary of items (names and quantities)

curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000" \
  -H "Cookie: $STEAM_COOKIES" | jq '[.descriptions[] | {market_hash_name, type}]'

Get item details (asset IDs mapped to descriptions)

curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000" \
  -H "Cookie: $STEAM_COOKIES" | jq '{assets: [.assets[] | {assetid, classid, instanceid, amount}], total: .total_inventory_count}'

Paginated fetch (for inventories over 2000 items)

The API returns a last_assetid field when there are more items. Pass it as start_assetid to get the next page:

curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000&start_assetid=$LAST_ASSET_ID" \
  -H "Cookie: $STEAM_COOKIES" | jq '.'

Check for more pages by looking at the more_items field in the response (equals 1 if there are more).

Response Format

The inventory endpoint returns JSON with these key fields:

FieldDescription
assetsArray of items with appid, contextid, assetid, classid, instanceid, amount
descriptionsArray of item metadata: market_hash_name, name, type, icon_url, tradable, marketable, tags, etc.
total_inventory_countTotal number of items in the inventory
more_items1 if more pages available (absent otherwise)
last_assetidLast asset ID returned; use as start_assetid for next page
success1 if the request succeeded

Assets are linked to descriptions via classid + instanceid.

Notes

  • Rate limits: The community endpoint is heavily rate-limited by IP. Using your own cookies bypasses this for your own inventory. Without cookies, expect IP bans after a few requests (cooldown ~6 hours).
  • Spacing: If fetching multiple inventories or pages, wait at least 4 seconds between requests.
  • count parameter: Max value is 5000, but 2000 is recommended to avoid issues.
  • Context ID: Use 2 for all standard game inventories. Steam Community items (appid 753) also use context ID 6 for some item types.
  • Private profiles: Inventory must be set to public, or you must be authenticated as the owner.

Trade Offers

Trade offers require an authenticated session (cookies) and a Steam Web API key. The sessionid cookie is sent as both a cookie and a POST body parameter.

Partner identification

Trade partners can be identified two ways:

  1. By SteamID64 — e.g., 76561198012345678. Convert to a 32-bit account ID for the partner field: subtract 76561197960265728 from the SteamID64.
  2. By trade URL — e.g., https://steamcommunity.com/tradeoffer/new/?partner=52079950&token=YDAlR4bC. The partner value is the 32-bit account ID. The token is needed when the partner is not on your friends list.

Send a trade offer

This sends items from your inventory to another user (and/or requests items from theirs). Each item requires its appid, contextid, and assetid (obtained from the inventory endpoint above).

The json_tradeoffer parameter is a JSON string describing what each side gives. The me object holds your items to give; the them object holds items you want to receive.

# Set trade parameters
PARTNER_ACCOUNT_ID="52079950"  # 32-bit account ID (from trade URL or SteamID64 - 76561197960265728)
PARTNER_STEAM_ID="76561198012345678"  # Full SteamID64 (= 76561197960265728 + PARTNER_ACCOUNT_ID)
TRADE_TOKEN="YDAlR4bC"         # From partner's trade URL (omit if partner is on your friends list)
TRADE_MESSAGE="Here's the trade we discussed"

# Build the json_tradeoffer payload
# me.assets = items YOU are giving, them.assets = items you WANT from them
JSON_TRADEOFFER='{
  "newversion": true,
  "version": 4,
  "me": {
    "assets": [
      {"appid": 730, "contextid": "2", "amount": 1, "assetid": "YOUR_ASSET_ID"}
    ],
    "currency": [],
    "ready": false
  },
  "them": {
    "assets": [
      {"appid": 730, "contextid": "2", "amount": 1, "assetid": "THEIR_ASSET_ID"}
    ],
    "currency": [],
    "ready": false
  }
}'

# Send with trade token (non-friend)
curl -s "https://steamcommunity.com/tradeoffer/new/send" \
  -X POST \
  -H "Cookie: sessionid=$STEAM_SESSION_ID; $STEAM_COOKIES" \
  -H "Referer: https://steamcommunity.com/tradeoffer/new/?partner=$PARTNER_ACCOUNT_ID&token=$TRADE_TOKEN" \
  -H "Origin: https://steamcommunity.com" \
  -d "sessionid=$STEAM_SESSION_ID" \
  -d "serverid=1" \
  -d "partner=$PARTNER_STEAM_ID" \
  --data-urlencode "tradeoffermessage=$TRADE_MESSAGE" \
  --data-urlencode "json_tradeoffer=$JSON_TRADEOFFER" \
  -d "captcha=" \
  --data-urlencode "trade_offer_create_params={\"trade_offer_access_token\":\"$TRADE_TOKEN\"}" \
  | jq '.'

To send to a friend (no token needed), omit the token from the Referer and set trade_offer_create_params to {}:

curl -s "https://steamcommunity.com/tradeoffer/new/send" \
  -X POST \
  -H "Cookie: sessionid=$STEAM_SESSION_ID; $STEAM_COOKIES" \
  -H "Referer: https://steamcommunity.com/tradeoffer/new/?partner=$PARTNER_ACCOUNT_ID" \
  -H "Origin: https://steamcommunity.com" \
  -d "sessionid=$STEAM_SESSION_ID" \
  -d "serverid=1" \
  -d "partner=$PARTNER_STEAM_ID" \
  --data-urlencode "tradeoffermessage=$TRADE_MESSAGE" \
  --data-urlencode "json_tradeoffer=$JSON_TRADEOFFER" \
  -d "captcha=" \
  -d "trade_offer_create_params={}" \
  | jq '.'

The response returns a tradeofferid on success:

{"tradeofferid": "1234567890", "needs_mobile_confirmation": true, "needs_email_confirmation": false}

Sending a gift (no items requested in return)

Set them.assets to an empty array []:

JSON_TRADEOFFER='{
  "newversion": true,
  "version": 4,
  "me": {
    "assets": [
      {"appid": 730, "contextid": "2", "amount": 1, "assetid": "YOUR_ASSET_ID"}
    ],
    "currency": [],
    "ready": false
  },
  "them": {
    "assets": [],
    "currency": [],
    "ready": false
  }
}'

Get trade offers (sent and received)

Uses the official Steam Web API with your API key.

# Get all active trade offers (sent and received)
curl -s "https://api.steampowered.com/IEconService/GetTradeOffers/v1/?key=$STEAM_API_KEY&get_sent_offers=1&get_received_offers=1&active_only=1&get_descriptions=1&language=english" \
  | jq '.'
# Get only received active offers
curl -s "https://api.steampowered.com/IEconService/GetTradeOffers/v1/?key=$STEAM_API_KEY&get_sent_offers=0&get_received_offers=1&active_only=1&get_descriptions=1&language=english" \
  | jq '.response.trade_offers_received'
# Get only sent active offers
curl -s "https://api.steampowered.com/IEconService/GetTradeOffers/v1/?key=$STEAM_API_KEY&get_sent_offers=1&get_received_offers=0&active_only=1&get_descriptions=1&language=english" \
  | jq '.response.trade_offers_sent'

Get a specific trade offer

curl -s "https://api.steampowered.com/IEconService/GetTradeOffer/v1/?key=$STEAM_API_KEY&tradeofferid=$TRADE_OFFER_ID&language=english&get_descriptions=1" \
  | jq '.response.offer'

Get trade offers summary (counts)

curl -s "https://api.steampowered.com/IEconService/GetTradeOffersSummary/v1/?key=$STEAM_API_KEY&time_last_visit=0" \
  | jq '.response'

Accept a trade offer

Accepting uses the Steam Community web endpoint (not the Web API). You need the tradeofferid and the partner's SteamID64.

TRADE_OFFER_ID="1234567890"
PARTNER_STEAM_ID="76561198012345678"

curl -s "https://steamcommunity.com/tradeoffer/$TRADE_OFFER_ID/accept" \
  -X POST \
  -H "Cookie: sessionid=$STEAM_SESSION_ID; $STEAM_COOKIES" \
  -H "Referer: https://steamcommunity.com/tradeoffer/$TRADE_OFFER_ID/" \
  -d "sessionid=$STEAM_SESSION_ID" \
  -d "tradeof

---

*Content truncated.*

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

9521,094

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

846846

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

571699

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

548492

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

673466

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

514280

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.