Leaderboard API
In-memory leaderboard system for the Bean Catcher game. Submit scores, retrieve top players, and track rankings.
Endpoints
Retrieve the top 10 scores sorted by score descending
Submit a new score to the leaderboard
POST Request Body
Response Schema (Entry)
🧪 Try It Live
Fetch the current top 10 scores from the leaderboard.
Submit a new score to the leaderboard.
Example Requests
# GET top scores curl https://beanola.com/api/leaderboard
# POST new score
curl -X POST https://beanola.com/api/leaderboard \
-H "Content-Type: application/json" \
-d '{"playerName": "BunMaster", "score": 2500}'Example Response (GET)
[
{
"id": "1706180400000-abc123",
"playerName": "BunMaster",
"score": 2500,
"timestamp": "2025-01-25T12:00:00.000Z"
},
{
"id": "1706180300000-def456",
"playerName": "CoffeeBean",
"score": 2100,
"timestamp": "2025-01-25T11:58:20.000Z"
}
]Want to earn a real score?
Play Bean Catcher