Game State
Get live game state (scores, clocks, periods) aggregated across all sportsbooks. Data is merged from multiple books using a “max score + priority fill” strategy for maximum accuracy.
GET /api/v1/gamestate
GET /api/v1/gamestate/{sport}Enterprise tier only. These endpoints require the gamestate feature which is exclusive to Enterprise plans.
Authentication
Requires API key via X-API-Key header, Authorization: Bearer header, or api_key query param. Enterprise tier required.
Endpoints
List Available Sports
GET /api/v1/gamestateReturns a summary of all sports with active live game state data, including event counts and TTLs.
Get Sport Game State
GET /api/v1/gamestate/{sport}Returns merged live game state for all events in the specified sport.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sport | string | Yes | Sport identifier (e.g., basketball, soccer, football, baseball, tennis, hockey) |
Query Parameters (Sport Endpoint)
| Parameter | Type | Default | Description |
|---|---|---|---|
league | string | all | Filter by league (e.g., nba, nfl, england_-_premier_league) |
live | boolean | all | Filter by live status (true for in-play only, false for pre-game only) |
Response Headers
All responses include standard rate limit and metadata headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per minute for your tier |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the rate limit window resets |
X-Request-Id | Unique request identifier for debugging |
Game State Object
Each event in the response contains merged state from multiple sportsbooks:
| Field | Type | Description |
|---|---|---|
isLive | boolean | Whether the event is currently in-play |
homeTeam | string | Home team name |
awayTeam | string | Away team name |
sport | string | Sport identifier |
league | string | League identifier |
homeScore | number | Home team score |
awayScore | number | Away team score |
gamePeriod | string | Current period (e.g., Q2, 1H, 2H, P3, 9th) |
gameClock | string | Game clock (e.g., 5:42, 82:15) |
primaryBook | string | Which sportsbook provided the primary state (highest score = most current) |
bookCount | number | How many sportsbooks have data for this event |
Sport-Specific Fields
Additional fields may be present depending on the sport:
| Field | Type | Sports | Description |
|---|---|---|---|
possession | string | Football, Basketball | home or away |
lastPlay | string | Football, Basketball | Description of the last play |
foulsHome | number | Basketball | Home team fouls |
foulsAway | number | Basketball | Away team fouls |
cornersHome | number | Soccer | Home team corners |
cornersAway | number | Soccer | Away team corners |
yellowCardsHome | number | Soccer | Home team yellow cards |
yellowCardsAway | number | Soccer | Away team yellow cards |
redCardsHome | number | Soccer | Home team red cards |
redCardsAway | number | Soccer | Away team red cards |
powerPlay | string | Hockey | home or away if on power play |
setsHome | number | Tennis | Home player sets won |
setsAway | number | Tennis | Away player sets won |
server | string | Tennis | Which player is serving (home or away) |
Example Requests
List available sports
cURL
curl -X GET "https://api.sharpapi.io/api/v1/gamestate" \
-H "X-API-Key: YOUR_API_KEY"Response
{
"success": true,
"data": {
"sports": [
{ "sport": "soccer", "event_count": 54, "ttl": 59 },
{ "sport": "basketball", "event_count": 23, "ttl": 59 },
{ "sport": "tennis", "event_count": 15, "ttl": 59 },
{ "sport": "baseball", "event_count": 9, "ttl": 59 },
{ "sport": "hockey", "event_count": 1, "ttl": 59 },
{ "sport": "golf", "event_count": 1, "ttl": 59 }
]
},
"meta": {
"sport_count": 6,
"total_events": 103,
"updated_at": "2026-03-08T18:07:44.733Z"
}
}Get basketball game state (NBA only)
cURL
curl -X GET "https://api.sharpapi.io/api/v1/gamestate/basketball?league=nba" \
-H "X-API-Key: YOUR_API_KEY"Response
{
"success": true,
"data": {
"nba_cavaliers_celtics_2026-03-08": {
"isLive": true,
"homeTeam": "CLE Cavaliers",
"awayTeam": "BOS Celtics",
"sport": "basketball",
"league": "nba",
"homeScore": 50,
"awayScore": 33,
"gamePeriod": "Q2",
"gameClock": "2:29",
"possession": "home",
"lastPlay": "REBOUND: Evan Mobley defensive rebound",
"foulsHome": 5,
"foulsAway": 3,
"primaryBook": "draftkings",
"bookCount": 4
}
},
"meta": {
"sport": "basketball",
"event_count": 1,
"filters": {
"league": "nba",
"live": null
},
"updated_at": "2026-03-08T18:07:54.694Z"
}
}Merge Strategy
Game state is aggregated from multiple sportsbooks using a “max score + priority fill” strategy:
- Primary book selection: The book with the highest total score (
homeScore + awayScore) is selected as primary. On tie, book priority order is used: DraftKings > FanDuel > BetRivers > Caesars > Bovada > Betway > Bet365 > Fliff > Kalshi > ProphetX. - All fields from primary: The primary book’s state becomes the base.
- Gap filling: Any
nullfields are filled from other books in priority order. - Metadata:
primaryBookandbookCountare added to indicate data provenance.
The score-based primary selection means the most up-to-date book is preferred. A book reporting 3-2 is more current than one still showing 2-2.
Data Freshness
Game state updates every 1-2 seconds via pub/sub-driven aggregation. The gamestate:{sport} keys have a 60-second TTL and are refreshed continuously while live events are in progress.
Error Responses
401 Unauthorized
{
"error": {
"code": "missing_api_key",
"message": "API key required",
"docs": "https://sharpapi.io/docs/authentication"
}
}403 Forbidden (Tier Insufficient)
{
"error": {
"code": "feature_not_available",
"message": "Live game state requires Enterprise tier"
}
}404 Not Found
{
"error": {
"code": "not_found",
"message": "No game state available for sport: cricket"
}
}Related Endpoints
- Events — List events with filtering
- Event Details — Get details for a specific event
- Odds Snapshot — Get odds with live game state fields
- SSE Stream — Real-time streaming (supports
?channel=gamestate)