The BasedBall Public API provides read-only access to game data. All endpoints are free to use and require no authentication.
All endpoints are GET requests only
10 req/min per IP, 30 req/hr per address
Use from any domain
GET https://www.databaseball.fun/api/public/team-games/[address]| Parameter | Type | Description |
|---|---|---|
| address | string | Ethereum wallet address (0x...) |
curl https://www.databaseball.fun/api/public/team-games/0x1234567890abcdef1234567890abcdef12345678{
"success": true,
"address": "0x1234567890abcdef1234567890abcdef12345678",
"games": [
{
"gameId": "abc123def456",
"tier": "MLB",
"playedAt": "2024-03-15T10:30:00Z",
"winner": {
"address": "0x1234567890abcdef1234567890abcdef12345678",
"teamName": "8liens",
"score": 8
},
"loser": {
"address": "0xabcdef1234567890abcdef1234567890abcdef12",
"teamName": "Weed Dolphins",
"score": 3
},
"gameData": {
"events": [
{
"inning": 1,
"half": "top",
"outs": 0,
"batter": "Mike Trout",
"pitcher": "Justin Verlander",
"result": "Single",
"runners": [...],
"score": {"away": 0, "home": 0}
}
// ... full play-by-play continues
]
}
}
// ... up to 4 games total
],
"count": 4,
"timestamp": "2024-03-15T12:00:00Z"
}Note: The gameData field contains the complete play-by-play JSON with all innings, at-bats, and game events.
/api/public/player/[tokenId]- Get player details and stats/api/public/leaderboard- Get top players and teams/api/public/season-stats- Get current season statisticsQuestions or feedback? Contact us on Farcaster