Skip to content

Commit 71d9219

Browse files
Mlaz-codeclaude
andcommitted
docs(odds/events): fix schemas, params, and response formats
- odds: add has_score param, live game state fields, fix event-grouped format - odds-best: add has_score/min_odds/max_odds params, stale odds callout - odds-batch: fix field name to event_ids, Sharp limit to 50, event-grouped response - events: fix live default, limit max (500), add has_score, external_ids, game_state, markets, books fields Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4f68883 commit 71d9219

4 files changed

Lines changed: 193 additions & 159 deletions

File tree

content/api-reference/events.mdx

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ Requires API key via `X-API-Key` header, `Authorization: Bearer` header, or `api
2323
| `sport` | string | all | Filter by sport. Comma-separated for multiple (e.g., `basketball,football`) |
2424
| `league` | string | all | Filter by league. Comma-separated for multiple (e.g., `nba,nfl`) |
2525
| `sportsbook` | string | all | Filter by sportsbook (e.g., `draftkings,pinnacle`) |
26-
| `live` | boolean | false | When `true`, return only live/in-play events |
26+
| `live` | boolean || `true` = live only, `false` = prematch only, omit = both |
27+
| `has_score` | boolean || `true` = only events with live game state/scores |
2728
| `date` | string || Filter by date in `YYYY-MM-DD` format |
28-
| `team` | string || Filter by exact team name |
29+
| `team` | string || Filter by team name (partial match, case-insensitive, supports aliases like `lakers`) |
2930
| `q` | string || Search query matching team names or event names |
30-
| `limit` | integer | 50 | Results per page (max 200) |
31-
| `offset` | integer | 0 | Pagination offset |
31+
| `limit` | integer | 50 | Results per page (max 500) |
32+
| `offset` | integer | 0 | Pagination offset (max 5000) |
3233

3334
<Callout type="warning">
3435
Query parameters use **singular form** and comma-separated values for multiples: `sport=basketball,football`, not `sports=basketball&sports=football`.
@@ -52,15 +53,34 @@ All responses include standard rate limit and metadata headers:
5253
| Field | Type | Description |
5354
|-------|------|-------------|
5455
| `id` | string | Unique event identifier |
56+
| `external_ids` | object | Map of sportsbook ID to external event ID (e.g., `{"draftkings": "33483153"}`) |
5557
| `sport` | string | Sport identifier (e.g., `basketball`, `football`) |
56-
| `league` | string | League name (e.g., `NBA`, `NFL`) |
58+
| `league` | string | League slug (e.g., `nba`, `nfl`) |
5759
| `home_team` | string | Home team name |
5860
| `away_team` | string | Away team name |
5961
| `start_time` | string | ISO 8601 event start time |
60-
| `status` | string | Event status: `scheduled`, `live`, `final`, `postponed`, `cancelled` |
62+
| `status` | string | Event status: `upcoming` or `live` |
6163
| `is_live` | boolean | Whether the event is currently live |
62-
| `odds_count` | integer | Total number of odds lines available for this event |
63-
| `sportsbook_count` | integer | Number of sportsbooks with odds for this event |
64+
| `book_count` | integer | Number of sportsbooks with odds for this event |
65+
| `markets` | string[] | Sorted array of available market types (e.g., `["moneyline", "point_spread", "total_points"]`) |
66+
| `books` | string[] | Sorted array of sportsbook IDs with odds for this event |
67+
| `game_state` | object \| undefined | Live game state (only present for live events with scores) |
68+
69+
#### Game State Object
70+
71+
Included when the event is live and has score data:
72+
73+
| Field | Type | Description |
74+
|-------|------|-------------|
75+
| `home_score` | number | Home team score |
76+
| `away_score` | number \| null | Away team score |
77+
| `period` | string \| null | Current period (e.g., `Q3`, `2nd`, `3rd Period`) |
78+
| `clock` | string \| null | Time remaining (e.g., `5:42`) |
79+
| `score_type` | string | Score type (e.g., `game_points`, `match`) |
80+
| `possession` | string \| null | Team with possession (`home` or `away`) |
81+
| `is_timeout` | boolean \| null | Whether a timeout is in progress |
82+
| `power_play` | string \| null | Power play info (`home` or `away`, hockey) |
83+
| `last_play` | string \| null | Description of last play |
6484

6585
## Example Requests
6686

@@ -211,27 +231,36 @@ data = response.json()
211231
"data": [
212232
{
213233
"id": "evt_nba_bos_lal_20260208",
234+
"external_ids": {
235+
"draftkings": "33483200",
236+
"fanduel": "nba-bos-lal-20260208"
237+
},
214238
"sport": "basketball",
215-
"league": "NBA",
239+
"league": "nba",
216240
"home_team": "Boston Celtics",
217241
"away_team": "Los Angeles Lakers",
218242
"start_time": "2026-02-08T19:30:00Z",
219-
"status": "scheduled",
243+
"status": "upcoming",
220244
"is_live": false,
221-
"odds_count": 48,
222-
"sportsbook_count": 6
245+
"book_count": 6,
246+
"markets": ["moneyline", "point_spread", "total_points"],
247+
"books": ["betmgm", "caesars", "draftkings", "fanduel"]
223248
},
224249
{
225250
"id": "evt_nba_gsw_mia_20260208",
251+
"external_ids": {
252+
"draftkings": "33483205"
253+
},
226254
"sport": "basketball",
227-
"league": "NBA",
255+
"league": "nba",
228256
"home_team": "Golden State Warriors",
229257
"away_team": "Miami Heat",
230258
"start_time": "2026-02-08T22:00:00Z",
231-
"status": "scheduled",
259+
"status": "upcoming",
232260
"is_live": false,
233-
"odds_count": 36,
234-
"sportsbook_count": 5
261+
"book_count": 5,
262+
"markets": ["moneyline", "point_spread", "total_points"],
263+
"books": ["betmgm", "draftkings", "fanduel"]
235264
}
236265
],
237266
"meta": {
@@ -246,8 +275,7 @@ data = response.json()
246275
"updated_at": "2026-02-08T12:00:00Z",
247276
"filters": {
248277
"sport": ["basketball"],
249-
"league": ["nba"],
250-
"live": false
278+
"league": ["nba"]
251279
}
252280
}
253281
}
@@ -300,7 +328,7 @@ This endpoint consolidates four previous endpoints into one:
300328
| `GET /events/search?q=celtics` | `GET /events?q=celtics` |
301329

302330
<Callout type="warning">
303-
The previous endpoints used **camelCase** field names (`homeTeam`, `awayTeam`, `isLive`, `bookCount`). The v1 API uses **snake_case** exclusively (`home_team`, `away_team`, `is_live`, `sportsbook_count`). Update your client code accordingly.
331+
The previous endpoints used **camelCase** field names (`homeTeam`, `awayTeam`, `isLive`, `bookCount`). The v1 API uses **snake_case** exclusively (`home_team`, `away_team`, `is_live`, `book_count`). Update your client code accordingly.
304332
</Callout>
305333

306334
### Key changes from previous versions

0 commit comments

Comments
 (0)