This repository contains Python code to download every Steam review for the games of your choice.
- Install the latest version of Python 3.X (at least version 3.11).
The code is packaged for PyPI, so that the installation consists in running:
pip install steamreviews
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.
import steamreviews
app_ids = [329070, 573170]
steamreviews.download_reviews_for_app_id_batch(app_ids)
- 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()
import steamreviews
app_id = 329070
review_dict = steamreviews.load_review_dict(app_id)
import steamreviews
app_id = 573170
review_dict, query_count = steamreviews.download_reviews_for_app_id(app_id)
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)
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)
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)
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)