This API allows you to fetch statistics for Valorant, CS2 and TFT players, including current and all-time statistics. The API is built using FastAPI and utilizes web scraping to gather player data from Tracker.gg.
- Fetch current act statistics for a given Valorant player.
- Fetch all-time statistics across seasons for a given Valorant player.
- Fetch all player's statistics for CS2
- API key authentication for secure access.
- Python 3.7 or higher
- Clone the repository:
[email protected]:aydenjahola/tracker-gg-api.git
cd tracker-gg-api.git
- Create virtual environment
python3 -m venv vevn
- Actiave the virtual environemnt
source venv/bin/activate # For Linux
source venv/Scripts/Actiave # For Windows
- Install the required packages:
pip install -r requirements.txt
Create a .env
file in the root of the project directory and add your API keys:
API_KEYS=your_api_key,your_api_key2 # Create a new key using the openssl command
STEAM_API_KEY=your_steam_api_key
FLARESOLVERR_URL=your_flare_solver_url
Make sure to replace your_api_key1,your_api_key2
with your actual API keys.
Endpoint: GET /valorant/player/{username}/current
Description: Fetch the current act statistics for a given Valorant player.
Parameters:
username
: The Riot username of the player (eg. Shitter#1234).X-API-Key
: Your API key (header).
Endpoint: GET /valorant/player/{username}/all
Description: Fetch all seasons' statistics for a given Valorant player.
Parameters:
username
: The Riot username of the player (eg. Shitter#1234).X-API-Key
: Your API key (header).
Endpoint: GET /cs2/player/{steam_id}
Description: Fetch all player's stats for CS2.
Parameters:
steamid
: The steam id of the player.X-API-Key
: Your API key (header).
- 403 Forbidden: If the API key is invalid.
- 404 Not Found: If the player's stats cannot be found.
This project is licensed under the GPL-3.0 license . See the LICENSE file for details.
Feel free to reach out for any questions or contributions to the project!