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."

Python
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.

Python
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:

JSON
{"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.

Python
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 needUse
Only the current player countValve's GetNumberOfCurrentPlayers
The price too, and an undocumented address is acceptableThe official method, and the store's appdetails address
Count, price, discount and the game's details in one JSON answerAn 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.

Every source

YouTube

Instagram

Websites

TikTok

Facebook

Google

Threads

LinkedIn

App stores

X

Pinterest

Airbnb

Real estate

Keywords

Job boards

Eventbrite

Shopify stores

Public tenders

All guides