How to get a Steam game's current player count in Python
Checked on 2026-11-19.
Steam's official Web API has a method for exactly this, GetNumberOfCurrentPlayers, and it needs no API key: one GET request returns the number of people in a game right now. The price is another matter. The address people read it from belongs to the store and is not in Valve's API reference.
1. The official method: no key, one request
Valve documents GetNumberOfCurrentPlayers in the ISteamUserStats interface with a single parameter, appid. Methods that need a key list a key parameter on that page, and this one does not. Valve's page on Web API keys says so in general: "Some Web API methods return publicly accessible data and do not require authorization when called."
import requests
res = requests.get(
"https://api.steampowered.com/ISteamUserStats/GetNumberOfCurrentPlayers/v1/",
params={"appid": 730}, # Counter-Strike 2
timeout=30,
)
if res.status_code == 404:
print("Steam has no player count for this app id")
else:
res.raise_for_status()
print(res.json()["response"]["player_count"])Called without a key on 19 November 2026, it answered {"response":{"player_count":958875,"result":1}} for app 730, and HTTP 404 with {"response":{"result":42}} for app id 1.
One thing in the documentation can mislead you. The request line on that page shows the host partner.steam-api.com. That host is for publishers: Valve's overview says every request to it needs a publisher key, "even requests which would ordinarily not need any key". The public Web API is at api.steampowered.com, as in the code above.
Where it stops: it returns the count of this moment and nothing else: no peak, no history, no name of the game. Valve describes it as "the total number of players currently active in the specified app on Steam", and notes that it leaves out people who play while not connected to Steam. The Steam Web API Terms of Use limit you to 100,000 calls a day.
2. The price: the store's own address
The method above knows nothing about prices. The address people use for the price is the store's own, store.steampowered.com/api/appdetails. It asked for no key either when this guide was checked, but it is not among the interfaces of Valve's Web API reference. So there is no documented list of parameters, no stated limit and no promise that it stays as it is. What follows is what it answered, not what Valve says it does.
import requests
app_id = "620" # Portal 2
res = requests.get(
"https://store.steampowered.com/api/appdetails",
params={"appids": app_id, "cc": "us", "filters": "price_overview"},
timeout=30,
)
res.raise_for_status()
entry = res.json()[app_id]
price = entry["data"]["price_overview"] if entry["success"] and entry["data"] else None
if price:
print(price["final"] / 100, price["currency"], "| discount", price["discount_percent"], "%")
else:
print("No price: a free game, or nothing for this id in this country")On 19 November 2026 the answer for Portal 2 with cc=us was:
{"620": {"success": true, "data": {"price_overview": {
"currency": "USD", "initial": 999, "final": 999, "discount_percent": 0,
"initial_formatted": "", "final_formatted": "$9.99"
}}}}The amounts are in cents: 999 is $9.99. For the free Counter-Strike 2 the same request returned "success": true with an empty list as data, which is why the code checks data before reading from it.
3. Count, price and details in one request
Pipefetch returns both in one answer, together with the name of the game, its developers, genres and release date.
import os
import requests
res = requests.get(
"https://pipefetch.com/v1/steam/game",
params={"app": "730", "country": "us"},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
timeout=90,
)
if res.status_code == 404:
print("Steam has no store page for this app id in this country") # not charged
else:
res.raise_for_status()
game = res.json()["data"]
print(game["name"], "|", game["currentPlayerCount"], "playing now")
if game["isFree"]:
print("Free to play")
else:
print(game["price"], game["currency"], "| discount", game["discountPercent"], "%")What it does not do matters as much. It has no history either: currentPlayerCount is the number at the moment of your request, and null for an app Steam reports no count for. It reads the storefront of one country per request, and the price comes in that storefront's own currency, never converted. A free game has isFree true, and its price and currency are null, not 0.
Do not count on review totals. The answer has the fields reviewSummary, reviewCount and positiveRate, but they are null whenever Steam returns no review summary to the request, as they are in the sample answer on the reference page. The texts of reviews are never included.
A request costs 1 credit, an app id without a store page answers 404 and costs nothing, and a new account has 100 free credits and needs no card. It is not Valve's API, and Pipefetch is not affiliated with Steam or Valve. The reference lists every field.
If the player count is all you need, use the official method. It is free, it needs no key and it comes from Valve itself.
Which one should you use?
| You need | Use |
|---|---|
| Only the current player count | Valve's GetNumberOfCurrentPlayers |
| The price too, and an undocumented address is acceptable | The official method, and the store's appdetails address |
| Count, price, discount and the game's details in one JSON answer | An HTTP API such as Pipefetch |
Player counts over time
None of these routes keeps a history. Each returns one reading, and one reading says little about a game. To see what a launch, an update or a sale did, take a reading at fixed times, store it with its timestamp, and compare readings taken at the same hour.
The count is also not a sales figure. It says how many people are in the game now, not how many own it.
Finding the app id
The app id is the number in the address of the game's store page: 730 in store.steampowered.com/app/730/CounterStrike_2/. The official method takes the number. Pipefetch takes the number or the whole address of the store page.
Try it with 100 free credits. No card needed. No scraper to build or maintain. Get an API key or read the docs.
APIs used in this guide
Guides for other sources
Every source
YouTube
- How to get a YouTube transcript in Python
- How to get a YouTube transcript in Node.js
- YouTube API quota exceeded: what the error means and how to fix it
- How to find a YouTube channel ID from a handle or URL
- How to download YouTube subtitles as SRT or VTT
- youtube-transcript-api RequestBlocked or IpBlocked: why it happens and how to fix it
- How to get YouTube comments in Python
- How to search YouTube from Python
- How to list a YouTube channel's videos in Python
- How to summarize a YouTube video with an LLM in Python
- How to get YouTube transcripts and video stats in Google Sheets
- How to get YouTube video views and likes in Python
- How to get YouTube transcripts in n8n, Make and Zapier
- LangChain YoutubeLoader fails on a server: why, and a loader that works
- How to get a YouTube channel's subscriber count in Python
- How to give Claude or Cursor access to YouTube (MCP server)
- How to get YouTube comments in Node.js
- How to analyze YouTube comments with an LLM in Python
- How to list a YouTube channel's Shorts in Python
- How to search YouTube from JavaScript
- How to get an Instagram follower count in Python
- Instagram Basic Display API alternatives: what to use after the shutdown
- Instaloader 401 Unauthorized, 429 and "Login required": what to do
- How to calculate an Instagram engagement rate in Python
- How to get an Instagram follower count in Node.js
- How to get Instagram follower counts in Google Sheets
- How to get Instagram Reel views in Python
Websites
- Clearbit Logo API alternatives: get a company logo from its domain
- How to extract email addresses from a website in Python
- How to turn a web page into Markdown in Python
- How to detect what a website is built with, in Python
- How to get the contact emails and phone numbers of websites in Google Sheets
- How to build a LangChain tool that reads web pages and searches Google
- How to turn a web page into Markdown in JavaScript for RAG
- How to extract social media links from a website in Python
- How to get a website's favicon in Python
- How to check robots.txt in Python before you fetch a page
TikTok
- How to get a TikTok video's views and likes in Python
- How to get the comments of a TikTok video in Python
- How to get a TikTok follower count in Python
- TikTok Research API: who can get access, and what to do if you cannot
- How to get TikTok video views, likes and shares in Node.js
- How to get TikTok views, likes and follower counts in Google Sheets
- How to get a Facebook Page's posts without app review
- Is there a Facebook Marketplace API?
- Facebook Groups API alternatives after its removal in 2024
- How to get a Facebook Page's follower count and contact details in Python
- How to get Google search results in Python
- pytrends 429 TooManyRequestsError: what it means and what to do
- How to get Google Trends data in Python
- Why is Wyoming first in Google Trends?
- How to get Google search results in Node.js
- How to get Google search results into Google Sheets
- How to give an LLM live Google results with tool calling
Threads
- How to get LinkedIn company data in Python
- How to search LinkedIn jobs from Python
- How to get a LinkedIn company page's latest posts in Python