### Install Steam Review Scraper using pip Source: https://github.com/zhihan-zhu/steam-review-scraper/blob/master/README.md Installs the steam-review-scaper package using pip. This is the initial step to use the library's functionalities. ```bash pip install steam-review-scaper ``` -------------------------------- ### Get Game Reviews Source: https://github.com/zhihan-zhu/steam-review-scraper/blob/master/README.md Collects all reviews for a specified game ID and language. Returns a DataFrame with detailed review information. ```APIDOC ## get_game_review(id, language='default') ### Description Collect all review for a given game. ### Method Not Applicable (Python function) ### Endpoint Not Applicable (Python function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python from steam_review_scraper import get_game_review reviews = get_game_review(730, language='english') ``` ### Response #### Success Response - **DataFrame** (object) - Dataframe for reviews with the following columns: `user`, `playtime`, `user_link`, `post_date`, `helpfulness`, `review`, `recommend`, `early_access_review`. #### Response Example ```json [ { "user": "steam_user_1", "playtime": 150.5, "user_link": "http://steamcommunity.com/profiles/user1", "post_date": "2023-10-27T10:00:00Z", "helpfulness": 10, "review": "Great game, highly recommend!", "recommend": true, "early_access_review": false } ] ``` ``` -------------------------------- ### Get Review Count Source: https://github.com/zhihan-zhu/steam-review-scraper/blob/master/README.md Retrieves the total number of reviews for a given game ID in the default language. ```APIDOC ## get_review_count(id) ### Description Return total number of reviews of default language. ### Method Not Applicable (Python function) ### Endpoint Not Applicable (Python function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python from steam_review_scraper import get_review_count get_review_count(730) ``` ### Response #### Success Response - **int** - Number of reviews. #### Response Example ```json 1646275 ``` ``` -------------------------------- ### Get Game IDs Source: https://github.com/zhihan-zhu/steam-review-scraper/blob/master/README.md Fetches a DataFrame containing game IDs for a specified number of games, with options to filter results. ```APIDOC ## get_game_ids(n, filter='topsellers') ### Description Return Dataframe of n games’ ids from Steam’s search result page. ### Method Not Applicable (Python function) ### Endpoint Not Applicable (Python function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python from steam_review_scraper import get_game_ids get_game_ids(5) ``` ### Response #### Success Response - **DataFrame** (object) - Dataframe with two columns `game` and `id`. #### Response Example ```json [ { "game": "BIOMUTANT", "id": 597820 }, { "game": "Mass Effect™ Legendary Edition", "id": 1328670 } ] ``` ``` -------------------------------- ### Get Game Reviews Source: https://github.com/zhihan-zhu/steam-review-scraper/blob/master/README.md Collects all reviews for a specified game ID and language. It returns a DataFrame with detailed review information including user, playtime, post date, and review content. Requires the 'steam_review_scraper' library. ```python from steam_review_scraper import get_game_review reviews = get_game_review(730, language='english') ``` -------------------------------- ### Get Review Count for a Game Source: https://github.com/zhihan-zhu/steam-review-scraper/blob/master/README.md Returns the total number of reviews for a given game ID in the default language. This is useful for understanding the popularity or community engagement of a game. Requires the 'steam_review_scraper' library. ```python from steam_review_scraper import get_review_count get_review_count(730) ``` -------------------------------- ### Get Multiple Game IDs Source: https://github.com/zhihan-zhu/steam-review-scraper/blob/master/README.md Fetches a DataFrame containing game IDs for a specified number of games based on a filter (defaulting to 'topsellers'). This function helps in collecting IDs for bulk operations. Requires the 'steam_review_scraper' library. ```python from steam_review_scraper import get_game_ids get_game_ids(5) ``` -------------------------------- ### Filter and Analyze Steam Reviews (Python) Source: https://context7.com/zhihan-zhu/steam-review-scraper/llms.txt Demonstrates filtering positive recommendations with high playtime and identifying the most helpful reviews using pandas. Assumes a DataFrame named 'reviews' with columns like 'playtime', 'recommend', 'helpfulness', and 'review'. Outputs filtered data counts and top reviews. ```python # Filter positive recommendations with high playtime experienced_players = reviews[ (reviews['playtime'] > 100) & (reviews['recommend'].str.contains('Recommended', na=False)) ] print(f"\nExperienced positive reviewers: {len(experienced_players)}") # Get most helpful reviews most_helpful = reviews.nlargest(10, 'helpfulness') print("\nTop 10 most helpful reviews:") for idx, row in most_helpful.iterrows(): print(f"User: {row['user']}, Playtime: {row['playtime']}h, Helpful: {row['helpfulness']}") print(f"Review snippet: {row['review'][:100]}...") print() ``` -------------------------------- ### Search Game ID Source: https://github.com/zhihan-zhu/steam-review-scraper/blob/master/README.md Retrieves a DataFrame of game IDs based on a search term. It can return all results or just the top one. ```APIDOC ## search_game_id(search_term, all_results=False) ### Description Return Dataframe of game ids of the search term from Steam’s search result page. ### Method Not Applicable (Python function) ### Endpoint Not Applicable (Python function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python from steam_review_scraper import search_game_id search_game_id("Counter-Strike: Global Offensive") ``` ### Response #### Success Response - **DataFrame** (object) - Dataframe with two columns `game` and `id`. #### Response Example ```json { "game": "Counter-Strike: Global Offensive", "id": 730 } ``` ``` -------------------------------- ### Scrape Complete Game Review Dataset - Python Source: https://context7.com/zhihan-zhu/steam-review-scraper/llms.txt Collects all available reviews for a specified game, including user details, playtime, review text, recommendation status, and helpfulness. The function returns a comprehensive pandas DataFrame, ideal for in-depth analysis, sentiment analysis, and data mining. Supports specifying the review language. ```python from steam_review_scraper import get_game_review import pandas as pd # Scrape English reviews for Counter-Strike: Global Offensive reviews = get_game_review(730, language='english') # Display basic information print(f"Total reviews scraped: {len(reviews)}") print(reviews.head()) # user playtime user_url post_date helpfulness \ # 0 PlayerName 1234.5 https://steamcommunity... May 15, 2025 42 # 1 GamerTag21 567.2 https://steamcommunity... June 3, 2025 8 # ... # Analyze review columns print("\nDataFrame structure:") print(reviews.info()) # ``` -------------------------------- ### Retrieve Top Games by Popularity - Python Source: https://context7.com/zhihan-zhu/steam-review-scraper/llms.txt Fetches a specified number of games from Steam's search results, allowing filtering by criteria like 'topsellers', 'trending', or 'new releases'. It returns a DataFrame containing game names and their corresponding Steam IDs, useful for bulk analysis or selecting games. ```python from steam_review_scraper import get_game_ids # Get top 5 best-selling games on Steam top_games = get_game_ids(5, filter='topsellers') print(top_games) # game id # 0 BIOMUTANT 597820 # 1 Mass Effect™ Legendary Edition 1328670 # 2 Destiny 2 1085660 # 3 Counter-Strike: Global Offensive 730 # 4 Apex Legends™ 1172470 # Get more games for bulk analysis bulk_games = get_game_ids(50, filter='topsellers') print(f"Retrieved {len(bulk_games)} games") # Retrieved 50 games # Access specific game information for idx, row in top_games.iterrows(): print(f"{row['game']}: ID {row['id']}") ``` -------------------------------- ### Search for Game IDs Source: https://github.com/zhihan-zhu/steam-review-scraper/blob/master/README.md Retrieves a DataFrame of game IDs matching a search term from Steam's search results. Optionally, it can return all results or just the top one. Requires the 'steam_review_scraper' library. ```python from steam_review_scraper import search_game_id search_game_id("Counter-Strike: Global Offensive") ``` -------------------------------- ### Export Steam Reviews to CSV (Python) Source: https://context7.com/zhihan-zhu/steam-review-scraper/llms.txt Exports a pandas DataFrame containing Steam reviews to a CSV file named 'csgo_reviews.csv'. The 'index=False' argument prevents writing the DataFrame index to the CSV. This is useful for persistent storage and further analysis outside of the current session. ```python # Export to CSV for further analysis reviews.to_csv('csgo_reviews.csv', index=False) print("Reviews exported to csgo_reviews.csv") ``` -------------------------------- ### Count Total Reviews for a Game - Python Source: https://context7.com/zhihan-zhu/steam-review-scraper/llms.txt Returns the total number of reviews available for a specific game, identified by its Steam ID. This function is useful for understanding the scale of review data before initiating a full scrape and can help estimate scraping time. It handles potential errors during fetching. ```python from steam_review_scraper import get_review_count # Get review count for CS:GO (game ID 730) count = get_review_count(730) print(f"Total reviews: {count:,}") # Total reviews: 1,646,275 # Check review counts for multiple games game_ids = [730, 1085660, 1172470] # CS:GO, Destiny 2, Apex Legends for game_id in game_ids: try: review_count = get_review_count(game_id) print(f"Game {game_id}: {review_count:,} reviews") except Exception as e: print(f"Error fetching reviews for game {game_id}: {e}") # Use count to estimate scraping time if count > 10000: print(f"Warning: This game has {count:,} reviews. Scraping may take considerable time.") ``` -------------------------------- ### Search Game IDs by Name - Python Source: https://context7.com/zhihan-zhu/steam-review-scraper/llms.txt Searches Steam's catalog for games by name to retrieve their unique application IDs. It can return the top matching game or all results across multiple pages. This function is useful for obtaining game IDs needed for other scraping operations. ```python from steam_review_scraper import search_game_id # Get the top matching game for a search term result = search_game_id("Counter-Strike: Global Offensive") print(result) # game id # 0 Counter-Strike: Global Offensive 730 # Get all matching games for a broader search all_results = search_game_id("Dark Souls", all_results=True) print(all_results) # game id # 0 DARK SOULS™ III 374320 # 1 DARK SOULS™: REMASTERED 570940 # 2 DARK SOULS™ II 236430 # 3 DARK SOULS™ II: Scholar of the First Sin 335300 # ... # Extract the game ID for further operations game_id = result['id'].iloc[0] print(f"Game ID: {game_id}") # Game ID: 730 ``` -------------------------------- ### Scrape Steam Reviews in Chinese (Python) Source: https://context7.com/zhihan-zhu/steam-review-scraper/llms.txt Collects Steam game reviews for a specific game ID (730) in the Simplified Chinese language. It utilizes a function `get_game_review` which takes the game ID and language code as parameters. The function returns a collection of reviews, likely as a list or DataFrame. ```python # Scrape reviews in a different language chinese_reviews = get_game_review(730, language='schinese') print(f"\nChinese reviews collected: {len(chinese_reviews)}") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.