An API to download Steam reviews
Project description
Download Steam Reviews
This repository contains Python code to download every Steam review for the games of your choice.
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.
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)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file steamreviews-0.9.5.tar.gz
.
File metadata
- Download URL: steamreviews-0.9.5.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0b1f6ac432e56b0ef15f7c34be88c4a10032b903fd8720a31dafc5acec6ba81 |
|
MD5 | c4a6b652c6e606d869239c8828843a4e |
|
BLAKE2b-256 | 48dc4dea779bab255c7a3b16bc007bc17a8de71a7c13e69e3a27e036ef83fca5 |
File details
Details for the file steamreviews-0.9.5-py3-none-any.whl
.
File metadata
- Download URL: steamreviews-0.9.5-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12dd96f19df1189131d951dbaff27133d7b3a8179b58feefcaecf42e19f60c7c |
|
MD5 | f84cbda0edbc6b83c78e8c00dedf6e61 |
|
BLAKE2b-256 | e6c0f0b6055cb2ea0f75b9a4ef33508888c7a25e098a32d365ccf8bb279129ab |