Skip to content

Obtain the review of the most popular games from the steam and make a concise resume of the sentiment of game

Notifications You must be signed in to change notification settings

Dafloresdiaz/Steam_Reviews_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steam Reviews Sentiment Analysis API

API to analyze sentiment of Steam game reviews using Large Language Models.

How it works:

  • We use the Steam API to obtain game reviews
  • We process reviews with Llama 3.1-70B via HuggingFace
  • We return a concise sentiment analysis summary

API Endpoints

Health Check

GET /

Returns system status to verify the server is running.

Response:

{
  "status": "system ok",
  "message": "Steam Reviews API is running"
}

Sentiment Analysis

GET /sentiments?game_id={game_id}&limit={limit}

Analyzes sentiment for Steam game reviews.

Query Parameters:

  • game_id (optional): Steam game ID. If not provided, uses default game (2592160)
  • limit (optional): Maximum number of reviews to analyze. Default is 200

Examples:

# Default game with default limit
GET /sentiments

# Specific game (CS:GO) with default limit
GET /sentiments?game_id=730

# Specific game with custom limit
GET /sentiments?game_id=730&limit=100

Response:

{
  "game_id": 730,
  "sentiment": "The reviews for this game are generally positive...",
  "reviews_count": 100,
  "success": true
}

Setup

Prerequisites

  • Python 3.11+
  • Docker Compose
  • HuggingFace API key

Installation

pip install -r requirements.txt

Environment Variables

export HUGGINGFACE_API_KEY="your_huggingface_api_key_here"

Running the Server

uvicorn main:app --reload --host 0.0.0.0 --port 8000

Running with Docker Compose

# Run the application with Docker Compose with no logs, remove the -d for logs
docker-compose up -d --build

# Stop the application (keeps containers for quick restart)
docker-compose stop

# For complete removal (stops and removes containers)
docker-compose down

Note: Ensure your docker-compose.yaml includes the service definition and environment variables (e.g., via env_file: .env or environment).

Documentation

Testing-TBD

Example Usage

# Health check
curl http://localhost:8000/

# Analyze CS:GO reviews
curl "http://localhost:8000/sentiments?game_id=730&limit=50"

About

Obtain the review of the most popular games from the steam and make a concise resume of the sentiment of game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published