Returns aggregated statistics showing how all players performed on a specific daily game, including total players, winners, win rate, and the distribution of guesses needed to win.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/igorek05m/daily-geogame/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Query parameters
The game date in YYYY-MM-DD format to retrieve statistics for.
Response
Total number of players who played the game on this date
Number of players who successfully guessed the country
Percentage of players who won (0-100), rounded to nearest integer
Object mapping the number of guesses to the count of winners who won with that many guesses.Keys are strings representing guess counts (“1”, “2”, “3”, etc.)
Values are the number of players who won with that many guesses.
Aggregation logic
The guess distribution is calculated using MongoDB aggregation:app/api/stats/route.ts:18-23
This pipeline:
- Filters to only games on the specified date that were won
- Calculates the number of guesses for each game
- Groups by guess count and counts occurrences
- Sorts by guess count ascending
Example request
Example response
- 150 players attempted the game
- 98 players won (65% win rate)
- 5 players guessed correctly on their first try
- 32 players needed 3 guesses to win
- 52 players (150 - 98) did not win
The
guessDistribution only includes winners. Players who exhausted all 6 guesses without winning are counted in totalPlayers but not in the distribution.Error responses
Missing date parameter:400
Server error:
500
Code example
Use cases
This endpoint is used to:- Display global leaderboard statistics
- Show how the user’s performance compares to others
- Generate histogram visualizations of guess distributions
- Calculate difficulty metrics for daily games
- Show engagement metrics (total player count)