python-steam-api


Namepython-steam-api JSON
Version 2.0 PyPI version JSON
download
home_pageNone
SummaryPython Client wrapper for Steam API.
upload_time2024-04-06 16:13:11
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords api python steam community steam steamapi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Get Started

## Installation

`pip install python-steam-api`

## Create Steam API web key

[Steam API Web key](https://steamcommunity.com/dev/apikey)

Follow instructions to get API Key

# Set up your environment variable

To create an environment variable in Python, you can utilize the os module. Use os.environ to access and modify environment variables. To accommodate different operating systems, check the documentation or resources specific to each OS for instructions on setting environment variables. For example, on Windows, you can use the Command Prompt or PowerShell, while on Unix-based systems like Linux or macOS, you can modify configuration files or use terminal commands like export.

# Basic Usage

### Searching for a user

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")
steam = Steam(KEY)

steam.users.search_user("the12thchairman")
```

Response

```json
{
  "player": {
    "steamid": "76561198995017863",
    "communityvisibilitystate": 3,
    "profilestate": 1,
    "personaname": "The12thChairman",
    "profileurl": "https://steamcommunity.com/id/the12thchairman/",
    "avatar": "https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6.jpg",
    "avatarmedium": "https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6_medium.jpg",
    "avatarfull": "https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6_full.jpg",
    "avatarhash": "427ef7d5f8ad7b21678f69bc8afc95786cf38fe6",
    "lastlogoff": 1659923870,
    "personastate": 1,
    "primaryclanid": "103582791429521408",
    "timecreated": 1570311509,
    "personastateflags": 0,
    "loccountrycode": "US"
  }
}
```

### Getting User details by steam id

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")

steam = Steam(KEY)

# arguments: steamid
user = steam.users.get_user_details("76561198995017863")
```

Response

```json
{
  "player": {
    "steamid": "76561198995017863",
    "communityvisibilitystate": 3,
    "profilestate": 1,
    "personaname": "The12thChairman",
    "profileurl": "https://steamcommunity.com/id/the12thchairman/",
    "avatar": "https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6.jpg",
    "avatarmedium": "https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6_medium.jpg",
    "avatarfull": "https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6_full.jpg",
    "avatarhash": "427ef7d5f8ad7b21678f69bc8afc95786cf38fe6",
    "lastlogoff": 1659923870,
    "personastate": 1,
    "primaryclanid": "103582791429521408",
    "timecreated": 1570311509,
    "personastateflags": 0,
    "loccountrycode": "US"
  }
}
```

### Getting Friends List

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")


steam = Steam(KEY)

# arguments: steamid
user = steam.users.get_user_friends_list("76561198995017863")
```

Response

```json
{
  "friends": [
    {
      "steamid": "76561198164668273",
      "communityvisibilitystate": 3,
      "profilestate": 1,
      "personaname": "ProToType",
      "profileurl": "https://steamcommunity.com/id/bruuitssam/",
      "avatar": "https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb.jpg",
      "avatarmedium": "https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_medium.jpg",
      "avatarfull": "https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_full.jpg",
      "avatarhash": "fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb",
      "lastlogoff": 1659791200,
      "personastate": 3,
      "realname": "Samuel chance",
      "primaryclanid": "103582791429521408",
      "timecreated": 1416698360,
      "personastateflags": 0,
      "loccountrycode": "US",
      "relationship": "friend",
      "friend_since": 1634692088
    },
    {
      "steamid": "76561198040366189",
      "communityvisibilitystate": 3,
      "profilestate": 1,
      "personaname": "\u2654 Regular Tetragon",
      "commentpermission": 1,
      "profileurl": "https://steamcommunity.com/id/regulartetragon/",
      "avatar": "https://avatars.akamai.steamstatic.com/85ee384bec86399cc79728cbde046516fa704b23.jpg",
      "avatarmedium": "https://avatars.akamai.steamstatic.com/85ee384bec86399cc79728cbde046516fa704b23_medium.jpg",
      "avatarfull": "https://avatars.akamai.steamstatic.com/85ee384bec86399cc79728cbde046516fa704b23_full.jpg",
      "avatarhash": "85ee384bec86399cc79728cbde046516fa704b23",
      "lastlogoff": 1659834670,
      "personastate": 0,
      "realname": "Vincent Mattingly",
      "primaryclanid": "103582791435763797",
      "timecreated": 1302294837,
      "personastateflags": 0,
      "relationship": "friend",
      "friend_since": 1649989273
    },
    {
      "steamid": "76561198030124562",
      "communityvisibilitystate": 3,
      "profilestate": 1,
      "personaname": "Robz",
      "profileurl": "https://steamcommunity.com/profiles/76561198030124562/",
      "avatar": "https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb.jpg",
      "avatarmedium": "https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_medium.jpg",
      "avatarfull": "https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_full.jpg",
      "avatarhash": "fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb",
      "lastlogoff": 1659320144,
      "personastate": 1,
      "primaryclanid": "103582791429521408",
      "timecreated": 1283739538,
      "personastateflags": 0,
      "relationship": "friend",
      "friend_since": 1634692171
    }
  ]
}
```

### Getting Users Recently Played Games

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")

steam = Steam(KEY)

# arguments: steamid
user = steam.users.get_user_recently_played_games("76561198995017863")
```

### Getting User Owned Games

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")

steam = Steam()

# arguments: steamid
user = steam.users.get_owned_games("76561198995017863")
```

### Getting User Steam Level

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")

steam = Steam(KEY)

# arguments: steamid
user = steam.users.get_user_steam_level("76561198995017863")
```

### Getting User Badges

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")

steam = Steam(KEY)

# arguments: steamid
user = steam.users.get_user_badges("76561198995017863")
```

### Getting Community Badge Progress

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")

steam = Steam(KEY)

# arguments: steamid, badgeid
user = steam.users.get_community_badge_progress("<steam_id>", "<badge_id>")
```

### Getting User Public Account

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")

steam = Steam(KEY)

# arguments: steamid
user = steam.users.get_account_public_info("<steam_id>")
```

### Searching for Games

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")


steam = Steam(KEY)

# arguments: search
user = steam.apps.search_games("terr")
```

Response

```json
{
  "apps": [
    {
      "id": 105600,
      "link": "https://store.steampowered.com/app/105600/Terraria/?snr=1_7_15__13",
      "name": "Terraria",
      "img": "https://cdn.akamai.steamstatic.com/steam/apps/105600/capsule_sm_120.jpg?t=1590092560",
      "price": "$9.99"
    },
    {
      "id": 1202130,
      "link": "https://store.steampowered.com/app/1202130/Starship_Troopers_Terran_Command/?snr=1_7_15__13",
      "name": "Starship Troopers: Terran Command",
      "img": "https://cdn.akamai.steamstatic.com/steam/apps/1202130/capsule_sm_120.jpg?t=1657104501",
      "price": "$29.99"
    },
    {
      "id": 1176470,
      "link": "https://store.steampowered.com/app/1176470/Terra_Invicta/?snr=1_7_15__13",
      "name": "Terra Invicta",
      "img": "https://cdn.akamai.steamstatic.com/steam/apps/1176470/capsule_sm_120.jpg?t=1659933796",
      "price": ""
    },
    {
      "id": 1945600,
      "link": "https://store.steampowered.com/app/1945600/The_Riftbreaker_Metal_Terror/?snr=1_7_15__13",
      "name": "The Riftbreaker: Metal Terror",
      "img": "https://cdn.akamai.steamstatic.com/steam/apps/1945600/capsule_sm_120.jpg?t=1659109312",
      "price": "$9.99"
    },
    {
      "id": 285920,
      "link": "https://store.steampowered.com/app/285920/TerraTech/?snr=1_7_15__13",
      "name": "TerraTech",
      "img": "https://cdn.akamai.steamstatic.com/steam/apps/285920/capsule_sm_120.jpg?t=1644900341",
      "price": "$24.99"
    }
  ]
}
```

### App/Game details

#### Parameters:

- `app_id` (int): The unique App ID of the app you want to retrieve details for. For example, 105600 corresponds to "Terraria"
  i
- `country` (str): An optional parameter representing the ISO Country Code. The default value is "US."

- `filters` (str): An optional parameter that allows you to specify a list of keys to return in the app details. If not provided, it defaults to "basic." The available filter options include:

- `basic` (Default): Returns essential information like type, name, steam_appid, required_age, is_free, dlc, detailed_description, short_description, about_the_game, supported_languages, header_image, website, pc_requirements, mac_requirements, and linux_requirements.

- Optional filters (Specify one or more of these as a comma-separated string):
  - controller_support
  - dlc
  - fullgame
  - legal_notice
  - developers
  - demos
  - price_overview
  - metacritic
  - categories
  - genres
  - screenshots
  - movies
  - recommendations
  - achievements
    Response

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")

terraria_app_id = 105600
steam = Steam(KEY)

# arguments: app_id
user = steam.apps.get_app_details(terraria_app_id)

```

```json
{
  "105600": {
    "success": true,
    "data": {
      "type": "game",
      "name": "Terraria",
      "steam_appid": 105600,
      "required_age": 0,
      "is_free": false,
      "controller_support": "full",
      "dlc": [409210, 1323320],
      "detailed_description": "Dig, Fight, Explore, Build:  The very world is at your fingertips as you fight for survival, fortune, and glory.   Will you delve deep into cavernous expanses in search of treasure and raw materials with which to craft ever-evolving gear, machinery, and aesthetics?   Perhaps you will choose instead to seek out ever-greater foes to test your mettle in combat?   Maybe you will decide to construct your own city to house the host of mysterious allies you may encounter along your travels? <br><br>In the World of Terraria, the choice is yours!<br><br>Blending elements of classic action games with the freedom of sandbox-style creativity, Terraria is a unique gaming experience where both the journey and the destination are completely in the player’s control.   The Terraria adventure is truly as unique as the players themselves!  <br><br>Are you up for the monumental task of exploring, creating, and defending a world of your own?  <br><br>\t\t\t\t\t\t\t<strong>Key features:</strong><br>\t\t\t\t\t\t\t<ul class=\"bb_ul\"><li>Sandbox Play<br>\t\t\t\t\t\t\t</li><li> Randomly generated worlds<br>\t\t\t\t\t\t\t</li><li>Free Content Updates<br>\t\t\t\t\t\t\t</li></ul>",
      "about_the_game": "Dig, Fight, Explore, Build:  The very world is at your fingertips as you fight for survival, fortune, and glory.   Will you delve deep into cavernous expanses in search of treasure and raw materials with which to craft ever-evolving gear, machinery, and aesthetics?   Perhaps you will choose instead to seek out ever-greater foes to test your mettle in combat?   Maybe you will decide to construct your own city to house the host of mysterious allies you may encounter along your travels? <br><br>In the World of Terraria, the choice is yours!<br><br>Blending elements of classic action games with the freedom of sandbox-style creativity, Terraria is a unique gaming experience where both the journey and the destination are completely in the player’s control.   The Terraria adventure is truly as unique as the players themselves!  <br><br>Are you up for the monumental task of exploring, creating, and defending a world of your own?  <br><br>\t\t\t\t\t\t\t<strong>Key features:</strong><br>\t\t\t\t\t\t\t<ul class=\"bb_ul\"><li>Sandbox Play<br>\t\t\t\t\t\t\t</li><li> Randomly generated worlds<br>\t\t\t\t\t\t\t</li><li>Free Content Updates<br>\t\t\t\t\t\t\t</li></ul>",
      "short_description": "Dig, fight, explore, build! Nothing is impossible in this action-packed adventure game. Four Pack also available!",
      "supported_languages": "English, French, Italian, German, Spanish - Spain, Polish, Portuguese - Brazil, Russian, Simplified Chinese",
      "header_image": "https://cdn.akamai.steamstatic.com/steam/apps/105600/header.jpg?t=1666290860",
      "capsule_image": "https://cdn.akamai.steamstatic.com/steam/apps/105600/capsule_231x87.jpg?t=1666290860",
      "capsule_imagev5": "https://cdn.akamai.steamstatic.com/steam/apps/105600/capsule_184x69.jpg?t=1666290860",
      "website": "http://www.terraria.org/",
      "pc_requirements": {
        "minimum": "<h2 class=\"bb_tag\"><strong>REQUIRED</strong></h2><ul class=\"bb_ul\"><li><strong>OS: Windows Xp, Vista, 7, 8/8.1, 10</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Processor: 2.0 Ghz</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Memory: 2.5GB</strong><br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Hard Disk Space: 200MB </strong> \t<br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Video Card: 128mb Video Memory, capable of Shader Model 2.0+</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>DirectX®: 9.0c or Greater</strong> \t<br>\t\t\t\t\t\t\t\t\t</li></ul>",
        "recommended": "<h2 class=\"bb_tag\"><strong>RECOMMENDED</strong></h2><ul class=\"bb_ul\"><li><strong>OS: Windows 7, 8/8.1, 10</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Processor: Dual Core 3.0 Ghz</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Memory: 4GB</strong><br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Hard Disk Space: 200MB </strong> \t<br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Video Card: 256mb Video Memory, capable of Shader Model 2.0+</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>DirectX®: 9.0c or Greater</strong> \t<br>\t\t\t\t\t\t\t\t\t</li></ul>"
      },
      "mac_requirements": {
        "minimum": "<h2 class=\"bb_tag\"><strong>REQUIRED</strong></h2><ul class=\"bb_ul\"><li><strong>OS: OSX 10.9.5 - 10.11.6</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Processor: 2.0 Ghz</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Memory: 2.5GB</strong><br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Hard Disk Space: 200MB </strong> \t<br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Video Card: 128mb Video Memory, capable of OpenGL 3.0+ support (2.1 with ARB extensions acceptable</strong> <br>\t\t\t\t\t\t\t\t\t</li></ul>",
        "recommended": "<h2 class=\"bb_tag\"><strong>RECOMMENDED</strong></h2><ul class=\"bb_ul\"><li><strong>OS: OSX 10.9.5 - 10.11.6</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Processor: Dual Core 3.0 Ghz</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Memory: 4GB</strong><br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Hard Disk Space: 200MB </strong> \t<br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Video Card: 256mb Video Memory, capable of OpenGL 3.0+ support (2.1 with ARB extensions acceptable</strong> <br>\t\t\t\t\t\t\t\t\t</li></ul>"
      },
      "linux_requirements": {
        "minimum": "<h2 class=\"bb_tag\"><strong>REQUIRED</strong></h2>LINUX<br><ul class=\"bb_ul\"><li><strong>OS: Ubuntu 14.04 LTS</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Processor: 2.0 Ghz</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Memory: 2.5GB</strong><br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Hard Disk Space: 200MB </strong> \t<br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Video Card: 128mb Video Memory, capable of OpenGL 3.0+ support (2.1 with ARB extensions acceptable</strong> <br>\t\t\t\t\t\t\t\t\t</li></ul>",
        "recommended": "<h2 class=\"bb_tag\"><strong>RECOMMENDED</strong></h2>LINUX<br><ul class=\"bb_ul\"><li><strong>OS: Ubuntu 14.04 LTS</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Processor: Dual Core 3.0 Ghz</strong> <br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Memory: 4GB</strong><br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Hard Disk Space: 200MB </strong> \t<br>\t\t\t\t\t\t\t\t\t\t</li><li><strong>Video Card: 256mb Video Memory, capable of OpenGL 3.0+ support (2.1 with ARB extensions acceptable</strong> <br>\t\t\t\t\t\t\t\t\t</li></ul>"
      }
    }
  }
}
```

### Getting user app stats

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")

steam = Steam(KEY)

# arguments: steam_id, app_id
user = steam.apps.get_user_stats("<steam_id>", "<app_id>")
```

### Getting user app achievements

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")


steam = Steam(KEY)

# arguments: steam_id, app_id
user = steam.apps.get_user_achievements("<steam_id>", "<app_id>")
```

### Getting user ban status

```python
import os
from steam_web_api import Steam

KEY = os.environ.get("STEAM_API_KEY")


steam = Steam(KEY)

# arguments: steam_id
user = steam.users.get_player_bans("<steam_id>")
```

```json
{
  "players": [
    {
      "SteamId": "76561198079362196",
      "CommunityBanned": false,
      "VACBanned": false,
      "NumberOfVACBans": 0,
      "DaysSinceLastBan": 0,
      "NumberOfGameBans": 0,
      "EconomyBan": "none"
    }
  ]
}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "python-steam-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Mathieu Scheltienne <mathieu.scheltienne@fcbg.ch>",
    "keywords": "api, python, steam community, steam, steamapi",
    "author": null,
    "author_email": "David Salazar <david.asal@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/80/3e/fe9a61f649fc463e970bb1c9a4d2f0899af9734b5d6b4e65796389f43cb7/python-steam-api-2.0.tar.gz",
    "platform": null,
    "description": "# Get Started\n\n## Installation\n\n`pip install python-steam-api`\n\n## Create Steam API web key\n\n[Steam API Web key](https://steamcommunity.com/dev/apikey)\n\nFollow instructions to get API Key\n\n# Set up your environment variable\n\nTo create an environment variable in Python, you can utilize the os module. Use os.environ to access and modify environment variables. To accommodate different operating systems, check the documentation or resources specific to each OS for instructions on setting environment variables. For example, on Windows, you can use the Command Prompt or PowerShell, while on Unix-based systems like Linux or macOS, you can modify configuration files or use terminal commands like export.\n\n# Basic Usage\n\n### Searching for a user\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\nsteam = Steam(KEY)\n\nsteam.users.search_user(\"the12thchairman\")\n```\n\nResponse\n\n```json\n{\n  \"player\": {\n    \"steamid\": \"76561198995017863\",\n    \"communityvisibilitystate\": 3,\n    \"profilestate\": 1,\n    \"personaname\": \"The12thChairman\",\n    \"profileurl\": \"https://steamcommunity.com/id/the12thchairman/\",\n    \"avatar\": \"https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6.jpg\",\n    \"avatarmedium\": \"https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6_medium.jpg\",\n    \"avatarfull\": \"https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6_full.jpg\",\n    \"avatarhash\": \"427ef7d5f8ad7b21678f69bc8afc95786cf38fe6\",\n    \"lastlogoff\": 1659923870,\n    \"personastate\": 1,\n    \"primaryclanid\": \"103582791429521408\",\n    \"timecreated\": 1570311509,\n    \"personastateflags\": 0,\n    \"loccountrycode\": \"US\"\n  }\n}\n```\n\n### Getting User details by steam id\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\nsteam = Steam(KEY)\n\n# arguments: steamid\nuser = steam.users.get_user_details(\"76561198995017863\")\n```\n\nResponse\n\n```json\n{\n  \"player\": {\n    \"steamid\": \"76561198995017863\",\n    \"communityvisibilitystate\": 3,\n    \"profilestate\": 1,\n    \"personaname\": \"The12thChairman\",\n    \"profileurl\": \"https://steamcommunity.com/id/the12thchairman/\",\n    \"avatar\": \"https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6.jpg\",\n    \"avatarmedium\": \"https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6_medium.jpg\",\n    \"avatarfull\": \"https://avatars.akamai.steamstatic.com/427ef7d5f8ad7b21678f69bc8afc95786cf38fe6_full.jpg\",\n    \"avatarhash\": \"427ef7d5f8ad7b21678f69bc8afc95786cf38fe6\",\n    \"lastlogoff\": 1659923870,\n    \"personastate\": 1,\n    \"primaryclanid\": \"103582791429521408\",\n    \"timecreated\": 1570311509,\n    \"personastateflags\": 0,\n    \"loccountrycode\": \"US\"\n  }\n}\n```\n\n### Getting Friends List\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\n\nsteam = Steam(KEY)\n\n# arguments: steamid\nuser = steam.users.get_user_friends_list(\"76561198995017863\")\n```\n\nResponse\n\n```json\n{\n  \"friends\": [\n    {\n      \"steamid\": \"76561198164668273\",\n      \"communityvisibilitystate\": 3,\n      \"profilestate\": 1,\n      \"personaname\": \"ProToType\",\n      \"profileurl\": \"https://steamcommunity.com/id/bruuitssam/\",\n      \"avatar\": \"https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb.jpg\",\n      \"avatarmedium\": \"https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_medium.jpg\",\n      \"avatarfull\": \"https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_full.jpg\",\n      \"avatarhash\": \"fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb\",\n      \"lastlogoff\": 1659791200,\n      \"personastate\": 3,\n      \"realname\": \"Samuel chance\",\n      \"primaryclanid\": \"103582791429521408\",\n      \"timecreated\": 1416698360,\n      \"personastateflags\": 0,\n      \"loccountrycode\": \"US\",\n      \"relationship\": \"friend\",\n      \"friend_since\": 1634692088\n    },\n    {\n      \"steamid\": \"76561198040366189\",\n      \"communityvisibilitystate\": 3,\n      \"profilestate\": 1,\n      \"personaname\": \"\\u2654 Regular Tetragon\",\n      \"commentpermission\": 1,\n      \"profileurl\": \"https://steamcommunity.com/id/regulartetragon/\",\n      \"avatar\": \"https://avatars.akamai.steamstatic.com/85ee384bec86399cc79728cbde046516fa704b23.jpg\",\n      \"avatarmedium\": \"https://avatars.akamai.steamstatic.com/85ee384bec86399cc79728cbde046516fa704b23_medium.jpg\",\n      \"avatarfull\": \"https://avatars.akamai.steamstatic.com/85ee384bec86399cc79728cbde046516fa704b23_full.jpg\",\n      \"avatarhash\": \"85ee384bec86399cc79728cbde046516fa704b23\",\n      \"lastlogoff\": 1659834670,\n      \"personastate\": 0,\n      \"realname\": \"Vincent Mattingly\",\n      \"primaryclanid\": \"103582791435763797\",\n      \"timecreated\": 1302294837,\n      \"personastateflags\": 0,\n      \"relationship\": \"friend\",\n      \"friend_since\": 1649989273\n    },\n    {\n      \"steamid\": \"76561198030124562\",\n      \"communityvisibilitystate\": 3,\n      \"profilestate\": 1,\n      \"personaname\": \"Robz\",\n      \"profileurl\": \"https://steamcommunity.com/profiles/76561198030124562/\",\n      \"avatar\": \"https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb.jpg\",\n      \"avatarmedium\": \"https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_medium.jpg\",\n      \"avatarfull\": \"https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb_full.jpg\",\n      \"avatarhash\": \"fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb\",\n      \"lastlogoff\": 1659320144,\n      \"personastate\": 1,\n      \"primaryclanid\": \"103582791429521408\",\n      \"timecreated\": 1283739538,\n      \"personastateflags\": 0,\n      \"relationship\": \"friend\",\n      \"friend_since\": 1634692171\n    }\n  ]\n}\n```\n\n### Getting Users Recently Played Games\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\nsteam = Steam(KEY)\n\n# arguments: steamid\nuser = steam.users.get_user_recently_played_games(\"76561198995017863\")\n```\n\n### Getting User Owned Games\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\nsteam = Steam()\n\n# arguments: steamid\nuser = steam.users.get_owned_games(\"76561198995017863\")\n```\n\n### Getting User Steam Level\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\nsteam = Steam(KEY)\n\n# arguments: steamid\nuser = steam.users.get_user_steam_level(\"76561198995017863\")\n```\n\n### Getting User Badges\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\nsteam = Steam(KEY)\n\n# arguments: steamid\nuser = steam.users.get_user_badges(\"76561198995017863\")\n```\n\n### Getting Community Badge Progress\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\nsteam = Steam(KEY)\n\n# arguments: steamid, badgeid\nuser = steam.users.get_community_badge_progress(\"<steam_id>\", \"<badge_id>\")\n```\n\n### Getting User Public Account\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\nsteam = Steam(KEY)\n\n# arguments: steamid\nuser = steam.users.get_account_public_info(\"<steam_id>\")\n```\n\n### Searching for Games\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\n\nsteam = Steam(KEY)\n\n# arguments: search\nuser = steam.apps.search_games(\"terr\")\n```\n\nResponse\n\n```json\n{\n  \"apps\": [\n    {\n      \"id\": 105600,\n      \"link\": \"https://store.steampowered.com/app/105600/Terraria/?snr=1_7_15__13\",\n      \"name\": \"Terraria\",\n      \"img\": \"https://cdn.akamai.steamstatic.com/steam/apps/105600/capsule_sm_120.jpg?t=1590092560\",\n      \"price\": \"$9.99\"\n    },\n    {\n      \"id\": 1202130,\n      \"link\": \"https://store.steampowered.com/app/1202130/Starship_Troopers_Terran_Command/?snr=1_7_15__13\",\n      \"name\": \"Starship Troopers: Terran Command\",\n      \"img\": \"https://cdn.akamai.steamstatic.com/steam/apps/1202130/capsule_sm_120.jpg?t=1657104501\",\n      \"price\": \"$29.99\"\n    },\n    {\n      \"id\": 1176470,\n      \"link\": \"https://store.steampowered.com/app/1176470/Terra_Invicta/?snr=1_7_15__13\",\n      \"name\": \"Terra Invicta\",\n      \"img\": \"https://cdn.akamai.steamstatic.com/steam/apps/1176470/capsule_sm_120.jpg?t=1659933796\",\n      \"price\": \"\"\n    },\n    {\n      \"id\": 1945600,\n      \"link\": \"https://store.steampowered.com/app/1945600/The_Riftbreaker_Metal_Terror/?snr=1_7_15__13\",\n      \"name\": \"The Riftbreaker: Metal Terror\",\n      \"img\": \"https://cdn.akamai.steamstatic.com/steam/apps/1945600/capsule_sm_120.jpg?t=1659109312\",\n      \"price\": \"$9.99\"\n    },\n    {\n      \"id\": 285920,\n      \"link\": \"https://store.steampowered.com/app/285920/TerraTech/?snr=1_7_15__13\",\n      \"name\": \"TerraTech\",\n      \"img\": \"https://cdn.akamai.steamstatic.com/steam/apps/285920/capsule_sm_120.jpg?t=1644900341\",\n      \"price\": \"$24.99\"\n    }\n  ]\n}\n```\n\n### App/Game details\n\n#### Parameters:\n\n- `app_id` (int): The unique App ID of the app you want to retrieve details for. For example, 105600 corresponds to \"Terraria\"\n  i\n- `country` (str): An optional parameter representing the ISO Country Code. The default value is \"US.\"\n\n- `filters` (str): An optional parameter that allows you to specify a list of keys to return in the app details. If not provided, it defaults to \"basic.\" The available filter options include:\n\n- `basic` (Default): Returns essential information like type, name, steam_appid, required_age, is_free, dlc, detailed_description, short_description, about_the_game, supported_languages, header_image, website, pc_requirements, mac_requirements, and linux_requirements.\n\n- Optional filters (Specify one or more of these as a comma-separated string):\n  - controller_support\n  - dlc\n  - fullgame\n  - legal_notice\n  - developers\n  - demos\n  - price_overview\n  - metacritic\n  - categories\n  - genres\n  - screenshots\n  - movies\n  - recommendations\n  - achievements\n    Response\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\nterraria_app_id = 105600\nsteam = Steam(KEY)\n\n# arguments: app_id\nuser = steam.apps.get_app_details(terraria_app_id)\n\n```\n\n```json\n{\n  \"105600\": {\n    \"success\": true,\n    \"data\": {\n      \"type\": \"game\",\n      \"name\": \"Terraria\",\n      \"steam_appid\": 105600,\n      \"required_age\": 0,\n      \"is_free\": false,\n      \"controller_support\": \"full\",\n      \"dlc\": [409210, 1323320],\n      \"detailed_description\": \"Dig, Fight, Explore, Build:  The very world is at your fingertips as you fight for survival, fortune, and glory.   Will you delve deep into cavernous expanses in search of treasure and raw materials with which to craft ever-evolving gear, machinery, and aesthetics?   Perhaps you will choose instead to seek out ever-greater foes to test your mettle in combat?   Maybe you will decide to construct your own city to house the host of mysterious allies you may encounter along your travels? <br><br>In the World of Terraria, the choice is yours!<br><br>Blending elements of classic action games with the freedom of sandbox-style creativity, Terraria is a unique gaming experience where both the journey and the destination are completely in the player\u2019s control.   The Terraria adventure is truly as unique as the players themselves!  <br><br>Are you up for the monumental task of exploring, creating, and defending a world of your own?  <br><br>\\t\\t\\t\\t\\t\\t\\t<strong>Key features:</strong><br>\\t\\t\\t\\t\\t\\t\\t<ul class=\\\"bb_ul\\\"><li>Sandbox Play<br>\\t\\t\\t\\t\\t\\t\\t</li><li> Randomly generated worlds<br>\\t\\t\\t\\t\\t\\t\\t</li><li>Free Content Updates<br>\\t\\t\\t\\t\\t\\t\\t</li></ul>\",\n      \"about_the_game\": \"Dig, Fight, Explore, Build:  The very world is at your fingertips as you fight for survival, fortune, and glory.   Will you delve deep into cavernous expanses in search of treasure and raw materials with which to craft ever-evolving gear, machinery, and aesthetics?   Perhaps you will choose instead to seek out ever-greater foes to test your mettle in combat?   Maybe you will decide to construct your own city to house the host of mysterious allies you may encounter along your travels? <br><br>In the World of Terraria, the choice is yours!<br><br>Blending elements of classic action games with the freedom of sandbox-style creativity, Terraria is a unique gaming experience where both the journey and the destination are completely in the player\u2019s control.   The Terraria adventure is truly as unique as the players themselves!  <br><br>Are you up for the monumental task of exploring, creating, and defending a world of your own?  <br><br>\\t\\t\\t\\t\\t\\t\\t<strong>Key features:</strong><br>\\t\\t\\t\\t\\t\\t\\t<ul class=\\\"bb_ul\\\"><li>Sandbox Play<br>\\t\\t\\t\\t\\t\\t\\t</li><li> Randomly generated worlds<br>\\t\\t\\t\\t\\t\\t\\t</li><li>Free Content Updates<br>\\t\\t\\t\\t\\t\\t\\t</li></ul>\",\n      \"short_description\": \"Dig, fight, explore, build! Nothing is impossible in this action-packed adventure game. Four Pack also available!\",\n      \"supported_languages\": \"English, French, Italian, German, Spanish - Spain, Polish, Portuguese - Brazil, Russian, Simplified Chinese\",\n      \"header_image\": \"https://cdn.akamai.steamstatic.com/steam/apps/105600/header.jpg?t=1666290860\",\n      \"capsule_image\": \"https://cdn.akamai.steamstatic.com/steam/apps/105600/capsule_231x87.jpg?t=1666290860\",\n      \"capsule_imagev5\": \"https://cdn.akamai.steamstatic.com/steam/apps/105600/capsule_184x69.jpg?t=1666290860\",\n      \"website\": \"http://www.terraria.org/\",\n      \"pc_requirements\": {\n        \"minimum\": \"<h2 class=\\\"bb_tag\\\"><strong>REQUIRED</strong></h2><ul class=\\\"bb_ul\\\"><li><strong>OS: Windows Xp, Vista, 7, 8/8.1, 10</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Processor: 2.0 Ghz</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Memory: 2.5GB</strong><br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Hard Disk Space: 200MB </strong> \\t<br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Video Card: 128mb Video Memory, capable of Shader Model 2.0+</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>DirectX\u00ae: 9.0c or Greater</strong> \\t<br>\\t\\t\\t\\t\\t\\t\\t\\t\\t</li></ul>\",\n        \"recommended\": \"<h2 class=\\\"bb_tag\\\"><strong>RECOMMENDED</strong></h2><ul class=\\\"bb_ul\\\"><li><strong>OS: Windows 7, 8/8.1, 10</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Processor: Dual Core 3.0 Ghz</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Memory: 4GB</strong><br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Hard Disk Space: 200MB </strong> \\t<br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Video Card: 256mb Video Memory, capable of Shader Model 2.0+</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>DirectX\u00ae: 9.0c or Greater</strong> \\t<br>\\t\\t\\t\\t\\t\\t\\t\\t\\t</li></ul>\"\n      },\n      \"mac_requirements\": {\n        \"minimum\": \"<h2 class=\\\"bb_tag\\\"><strong>REQUIRED</strong></h2><ul class=\\\"bb_ul\\\"><li><strong>OS: OSX 10.9.5 - 10.11.6</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Processor: 2.0 Ghz</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Memory: 2.5GB</strong><br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Hard Disk Space: 200MB </strong> \\t<br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Video Card: 128mb Video Memory, capable of OpenGL 3.0+ support (2.1 with ARB extensions acceptable</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t</li></ul>\",\n        \"recommended\": \"<h2 class=\\\"bb_tag\\\"><strong>RECOMMENDED</strong></h2><ul class=\\\"bb_ul\\\"><li><strong>OS: OSX 10.9.5 - 10.11.6</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Processor: Dual Core 3.0 Ghz</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Memory: 4GB</strong><br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Hard Disk Space: 200MB </strong> \\t<br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Video Card: 256mb Video Memory, capable of OpenGL 3.0+ support (2.1 with ARB extensions acceptable</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t</li></ul>\"\n      },\n      \"linux_requirements\": {\n        \"minimum\": \"<h2 class=\\\"bb_tag\\\"><strong>REQUIRED</strong></h2>LINUX<br><ul class=\\\"bb_ul\\\"><li><strong>OS: Ubuntu 14.04 LTS</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Processor: 2.0 Ghz</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Memory: 2.5GB</strong><br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Hard Disk Space: 200MB </strong> \\t<br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Video Card: 128mb Video Memory, capable of OpenGL 3.0+ support (2.1 with ARB extensions acceptable</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t</li></ul>\",\n        \"recommended\": \"<h2 class=\\\"bb_tag\\\"><strong>RECOMMENDED</strong></h2>LINUX<br><ul class=\\\"bb_ul\\\"><li><strong>OS: Ubuntu 14.04 LTS</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Processor: Dual Core 3.0 Ghz</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Memory: 4GB</strong><br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Hard Disk Space: 200MB </strong> \\t<br>\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</li><li><strong>Video Card: 256mb Video Memory, capable of OpenGL 3.0+ support (2.1 with ARB extensions acceptable</strong> <br>\\t\\t\\t\\t\\t\\t\\t\\t\\t</li></ul>\"\n      }\n    }\n  }\n}\n```\n\n### Getting user app stats\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\nsteam = Steam(KEY)\n\n# arguments: steam_id, app_id\nuser = steam.apps.get_user_stats(\"<steam_id>\", \"<app_id>\")\n```\n\n### Getting user app achievements\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\n\nsteam = Steam(KEY)\n\n# arguments: steam_id, app_id\nuser = steam.apps.get_user_achievements(\"<steam_id>\", \"<app_id>\")\n```\n\n### Getting user ban status\n\n```python\nimport os\nfrom steam_web_api import Steam\n\nKEY = os.environ.get(\"STEAM_API_KEY\")\n\n\nsteam = Steam(KEY)\n\n# arguments: steam_id\nuser = steam.users.get_player_bans(\"<steam_id>\")\n```\n\n```json\n{\n  \"players\": [\n    {\n      \"SteamId\": \"76561198079362196\",\n      \"CommunityBanned\": false,\n      \"VACBanned\": false,\n      \"NumberOfVACBans\": 0,\n      \"DaysSinceLastBan\": 0,\n      \"NumberOfGameBans\": 0,\n      \"EconomyBan\": \"none\"\n    }\n  ]\n}\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python Client wrapper for Steam API.",
    "version": "2.0",
    "project_urls": {
        "source": "https://github.com/deivit24/python-steam-api",
        "tracker": "https://github.com/deivit24/python-steam-api/issues"
    },
    "split_keywords": [
        "api",
        " python",
        " steam community",
        " steam",
        " steamapi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed5fa214e4368ca610681c6b00a0f5fcd7fddf9139eab95805b6b5981e786a47",
                "md5": "12699afda24364f3fdc077f1fd6c6ff1",
                "sha256": "f201760a765e1b264fd07d111389ebe3efcfc22099a4b0bf4ce1925a21b71e48"
            },
            "downloads": -1,
            "filename": "python_steam_api-2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "12699afda24364f3fdc077f1fd6c6ff1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 12412,
            "upload_time": "2024-04-06T16:13:09",
            "upload_time_iso_8601": "2024-04-06T16:13:09.898045Z",
            "url": "https://files.pythonhosted.org/packages/ed/5f/a214e4368ca610681c6b00a0f5fcd7fddf9139eab95805b6b5981e786a47/python_steam_api-2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "803efe9a61f649fc463e970bb1c9a4d2f0899af9734b5d6b4e65796389f43cb7",
                "md5": "0118b1b486a4ac839876e2c9d84890f2",
                "sha256": "4532b742215efc4a39206381ad6fc9b181042c245a63cefdc30e4d5bc26f67bb"
            },
            "downloads": -1,
            "filename": "python-steam-api-2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0118b1b486a4ac839876e2c9d84890f2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 13318,
            "upload_time": "2024-04-06T16:13:11",
            "upload_time_iso_8601": "2024-04-06T16:13:11.556478Z",
            "url": "https://files.pythonhosted.org/packages/80/3e/fe9a61f649fc463e970bb1c9a4d2f0899af9734b5d6b4e65796389f43cb7/python-steam-api-2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-06 16:13:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "deivit24",
    "github_project": "python-steam-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "python-steam-api"
}
        
Elapsed time: 0.21319s