Steam Review Analyzer Week 6

    Steam Review Analyzer Week 6

    Week 6 content of Steam Review Analyzer

    By AI Club on 11/4/2025
    0

    Week 6: Fetching Steam Reviews with Chrome Extension

    Week 6 Goals

    • Build a complete Chrome extension structure

    • Fetch real Steam reviews using the API

    • Extract and display review data

    Introduction

    We've learned sentiment analysis in Python and created a basic Chrome extension. Now it's time to bring them together!

    This week, we'll:

    1. Review Chrome extension structure

    2. Learn to use the Steam Reviews API

    3. Fetch real review data from Steam

    4. Prepare for sentiment analysis integration (next week)

    Part 1: Chrome Extension Structure Review

    A Chrome extension needs three core files:

    Required Files

    1. manifest.json - Configuration and permissions

    2. content.js - Runs on Steam game pages

    3. background.js - Handles background tasks and API calls

    4. popup.js - Handles the popup HTML code

    5. popup.html - front end of the extension

    Part 2: Understanding the Steam Reviews API

    Steam provides a free API to fetch game reviews without authentication!

    API Endpoint

    Base URL: store.steampowered.com/appreviews/<appid>?json=1

    Important Parameters

    Based on the Steam API documentation, here are the key parameters we'll use:

    filter (string, required)

    • Controls how reviews are sorted

    • Options: recent, updated, or all (default)

    • recent - sorted by creation time (newest first)

    • all - sorted by helpfulness with sliding windows

    language (string, required)

    • Specifies which language reviews to return

    • Use english for English reviews

    • Or pass all for reviews in all languages

    num_per_page (string, required)

    • Number of reviews to return per request

    • Default: 20 reviews

    • Maximum: 100 reviews

    • For our extension, we'll use 50 reviews

    review_type (string, required)

    • Filter by review sentiment

    • Options: all, positive, negative

    • all - returns all reviews (default)

    • positive - only positive recommendations

    • negative - only negative recommendations

    Example API Request

    For the game Hades (App ID: 1145360), here's how to fetch 50 recent English reviews:

    GET https://store.steampowered.com/appreviews/1145360?json=1&filter=recent&language=english&num_per_page=50&review_type=all

    Please play around with the parameters and look at the output JSON to see how it all looks. You can get all the info on this page: https://partner.steamgames.com/doc/store/getreviews.

    Look through the page for the entire list of parameters and the output structure.

    Putting it together into an extension

    So now we will include the files you need to build the extension.

    https://drive.google.com/file/d/14kUNhfOHODrNR62Fsbh_fqZA7f3Uv5ch/view?usp=sharing

    https://drive.google.com/file/d/18FD4KqEvuBnF7TvKkc4iurPWmZy7WhYf/view?usp=sharing

    https://drive.google.com/file/d/1DbuT1AS9njet1k7LtzqFXoDVPJqeMnNf/view?usp=sharing

    https://drive.google.com/file/d/1ZMz9ACvuCQZOfD4h0UmwTuvxDYiwJE1K/view?usp=sharing

    https://drive.google.com/file/d/1wNoZ6JAzWnCBZWMTptNOjGyeK6TEESYF/view?usp=sharing

    All five files are provided as separate code files. See the individual files for:

    • manifest.json

    • content.js

    • background.js

    • popup.html

    • popup.js

    Part 6: Loading and Testing Your Extension

    Step-by-Step Loading Instructions

    1. Create the folder

      • Make a new folder called steam-sentiment-analyzer

      • Save all five files in this folder

    2. Open Chrome Extensions page

      • Open Chrome browser

      • Go to chrome://extensions/

      • Or click the three dots → Extensions → Manage Extensions

    3. Enable Developer Mode

      • Look for the toggle in the top-right corner

      • Turn on "Developer mode"

    4. Load your extension

      • Click "Load unpacked" button

      • Select your steam-sentiment-analyzer folder

      • Your extension should appear in the list!

    Testing Your Extension

    1. Visit a Steam game page

    2. Click the extension icon

      • Look for the extension icon in your toolbar

      • Click it to open the popup

    3. Check the popup

      • Should show game name and ID

      • "Analyze Reviews" button should be enabled

      • Status should say "Ready to analyze reviews"

    4. Verify success

    • Popup shows "Analysis Complete!"

    • Review statistics appear

    • Console shows review data

    What You Should See

    In the popup:

    • Game name (e.g., "Hades")

    • Game ID (e.g., "1145360")

    • Total reviews count

    • Positive and negative counts

    • Green success status

    Key Takeaways

    Steam Reviews API:

    • Free to use, no authentication needed

    • Returns up to 100 reviews per request

    • Includes review text, ratings, and metadata

    • Key parameters: num_per_page, language, filter, review_type

    Chrome Extensions:

    • Five core files for a complete extension

    • Popup provides clean UI for users

    • Content scripts interact with web pages

    • Background scripts handle data processing

    • All components communicate via messages

    Next Week Preview

    In Week 7 (our final week!), we'll:

    • Implement sentiment analysis in JavaScript

    • Analyze the fetched reviews in the browser

    • Display sentiment scores and percentages

    • Create a visual sentiment report on the popup

    • Complete the full extension!

    You now have a working extension with a popup that fetches real Steam reviews. Next week, we bring in the sentiment analysis to complete the project!

    Comments