Skip to main content

An API to download Steam reviews

Project description

Download Steam Reviews

PyPI status Build status Code coverage Code Quality

This repository contains Python code to download every Steam review for the games of your choice.

Requirements

  • Install the latest version of Python 3.X (at least version 3.11).

Installation

The code is packaged for PyPI, so that the installation consists in running:

pip install steamreviews

Usage

The Steam API is rate-limited so you should be able to download about 10 reviews per second.

NB: If you do not know the appID of a game, look for it on the Steam store. The appID is a unique number in the URL.

For instance, for SpyParty, the appID is 329070.

appID for SpyParty

Process a batch of appIDs

import steamreviews

app_ids = [329070, 573170]
steamreviews.download_reviews_for_app_id_batch(app_ids)

Process a batch of appIDs, written down in a text file

  • For every game of interest, write down its appID in a text file named idlist.txt. There should be an appID per line.
  • Then proceed as follows:
import steamreviews

steamreviews.download_reviews_for_app_id_batch()

Load reviews for one appID

import steamreviews

app_id = 329070
review_dict = steamreviews.load_review_dict(app_id)

Download reviews for one appID

import steamreviews

app_id = 573170
review_dict, query_count = steamreviews.download_reviews_for_app_id(app_id)

Download reviews for one appID, with specific request parameters (language, sentiment, store)

Caveat: the following parameters do not appear in the output filename, so make sure that you start the download from scratch (instead of updating existing JSON review data) if you ever decide to change them, e.g the value of the review_type (set to all, positive or negative).

Caveat²: if review_type is set to positive (or negative), then the value of total_reviews can be misleading. It is indeed arbitrarily set to total_positive (respectively total_negative). In this case, if you need the total number of reviews, compute it as the sum of total_positive and total_negative.

import steamreviews

request_params = dict()
# Reference: https://partner.steamgames.com/doc/store/localization#supported_languages
request_params['language'] = 'english'
# Reference: https://partner.steamgames.com/doc/store/getreviews
request_params['review_type'] = 'positive'
request_params['purchase_type'] = 'steam'

app_id = 573170
review_dict, query_count = steamreviews.download_reviews_for_app_id(app_id,
                                                                    chosen_request_params=request_params)

Download a few of the most helpful reviews for one appID, which were created in a time-window

Caveat: with filter set to all, you will only be able to download a few reviews within the specified time-window.

import steamreviews

request_params = dict()
# Reference: https://partner.steamgames.com/doc/store/getreviews
request_params['filter'] = 'all'  # reviews are sorted by helpfulness instead of chronology
request_params['day_range'] = '28'  # focus on reviews which were published during the past four weeks

app_id = 573170
review_dict, query_count = steamreviews.download_reviews_for_app_id(app_id,
                                                                    chosen_request_params=request_params)

Download reviews for one appID, which were created within a specific time-window

import steamreviews

request_params = dict()
request_params['filter'] = 'recent'
request_params['day_range'] = '28'

app_id = 573170
review_dict, query_count = steamreviews.download_reviews_for_app_id(app_id,
                                                                    chosen_request_params=request_params)

Download reviews for one appID, which were updated within a specific time-window

import steamreviews

request_params = dict()
request_params['filter'] = 'updated'
request_params['day_range'] = '28'

app_id = 573170
review_dict, query_count = steamreviews.download_reviews_for_app_id(app_id,
                                                                    chosen_request_params=request_params)

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steamreviews-0.9.6.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steamreviews-0.9.6-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file steamreviews-0.9.6.tar.gz.

File metadata

  • Download URL: steamreviews-0.9.6.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for steamreviews-0.9.6.tar.gz
Algorithm Hash digest
SHA256 8b0244bf75bea711e9357ecd1a96936a639e3df9157c434a49db70d8fd5ddb65
MD5 9a6374c0d86a31141c164ecff963a4b5
BLAKE2b-256 1dda7ee46b23330c69cf31502438b6e1412ce5a6503dd5705ee3933d96036a0c

See more details on using hashes here.

File details

Details for the file steamreviews-0.9.6-py3-none-any.whl.

File metadata

  • Download URL: steamreviews-0.9.6-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for steamreviews-0.9.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8aaec212e705147e60dd27944c1be495d47da0a8acf2c62898cbc876d6189b33
MD5 705dd2a529b6a3d1f52fd7fcc1f1525e
BLAKE2b-256 8f0781a4b8ff99f398314cbf035877aa41b95955678f3678598fec2219a3ac57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page