API example
NFL endpoints
All NFL endpoints live under https://api.balldontlie.io/stories/nfl. Every request requires a Bearer API key in the Authorization header.
List games
Returns all NFL games scheduled on a given date. Use this endpoint first to discover game IDs, then pass those IDs to the story endpoints below.
/stories/nfl/gamesQuery parameters
| Name | Type | Required | Description |
|---|---|---|---|
| date | string | Yes | ISO-8601 calendar date in YYYY-MM-DD format (e.g. 2026-04-12). |
| timezone | string | No | IANA timezone name used to resolve the date boundary. Defaults to UTC. |
Example request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.balldontlie.io/stories/nfl/games?date=2025-11-16&timezone=America/New_York"Example response
{
"data": [
{
"id": 424095,
"home_team": {
"id": 5,
"conference": "AFC",
"division": "East",
"location": "Miami",
"name": "Dolphins",
"full_name": "Miami Dolphins",
"abbreviation": "MIA"
},
"away_team": {
"id": 21,
"conference": "NFC",
"division": "East",
"location": "Washington",
"name": "Commanders",
"full_name": "Washington Commanders",
"abbreviation": "WSH"
},
"start_time": "2025-11-16T09:30:00.000-05:00"
}
]
}Response schema
data
Games scheduled on the requested date, ordered by start_time ascending.
| Field | Type | Description |
|---|---|---|
| id | integer | Game identifier. Pass this value as :game_id to the story endpoints below. |
| home_team | object | Home team. See Team below. |
| away_team | object | Away team. See Team below. |
| start_time | string (date-time) | Scheduled tipoff in RFC 3339 format. The UTC offset reflects the timezone query parameter (UTC when omitted). |
Team
Returned on both home_team and away_team for every NFL game.
| Field | Type | Description |
|---|---|---|
| id | integer | Stable BallDontLie team identifier. Joins to the NFL teams endpoint. |
| abbreviation | string | Three-letter team code (e.g. MIA). |
| full_name | string | Full display name (e.g. Miami Dolphins). |
| name | string | Team nickname (e.g. Dolphins). |
| location | string | Home market (e.g. Miami). |
| conference | string | Conference abbreviation (AFC or NFC). |
| division | string | Division name (e.g. East). |
Get pregame story
Returns a single aggregated pregame story. Generated within 1 hour before the scheduled start time. Returns 404 if the story has not been generated yet (game is more than 1 hour away).
/stories/nfl/games/{game_id}/pregameQuery parameters
| Name | Type | Required | Description |
|---|---|---|---|
| audience | string | No | Either betting or stats. Defaults to betting. |
| tone | string | No | Either editorial or humor. Defaults to editorial. |
Example request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.balldontlie.io/stories/nfl/games/424095/pregame?audience=betting&tone=editorial"Example response
{
"game": { "id": 424095 },
"story": {
"id": 1454,
"created_at": "2026-08-01T15:55:39.467Z",
"content": "MIA is a small favorite at -2.5 (-121 Caesars) and -148 on the moneyline at DraftKings, while FanDuel lists WSH +126. The total is 47.5, and Zach Ertz’s catch line is 3.5 at FanDuel/BetRivers vs 4.5 at most books.",
"entity_tags": {
"teams": [
{ "id": 5, "name": "Miami Dolphins", "abbreviation": "MIA" },
{ "id": 21, "name": "Washington Commanders", "abbreviation": "WSH" }
],
"players": [
{ "id": 1011, "name": "Zach Ertz", "team": "WSH" }
]
}
}
}Response schema
game
Compact reference to the game this response is scoped to. Echoes the :game_id path parameter.
| Field | Type | Description |
|---|---|---|
| id | integer | Game identifier matching the one supplied in the request path. |
story
The single narrative object for this phase. Deterministic for a given (game_id, audience, tone) tuple.
| Field | Type | Description |
|---|---|---|
| id | integer | Stable story identifier. Safe to use as an idempotency key. |
| created_at | string (date-time) | RFC 3339 timestamp (UTC) marking when the narrative was written. |
| content | string| null | Tweet-length narrative body (≤280 characters). Null only in the rare case that the requested tone has not yet been rendered for this story. |
| entity_tags | object | Teams and players referenced in content. See entity_tags below. |
entity_tags
Structured list of the teams and players referenced in the narrative. Use the IDs to join to the corresponding BallDontLie sport APIs.
| Field | Type | Description |
|---|---|---|
| teams | array<object> | Teams mentioned in the story. Each element is { id: integer, name: string, abbreviation: string }. |
| players | array<object> | Players mentioned in the story. Each element is { id: integer, name: string, team?: string }, where team is the abbreviation when known. |
Get live stories
Returns event-driven stories for a live game, sorted oldest to newest by created_at. Live games produce guaranteed period-end checkpoints plus conditional stories triggered by momentum shifts, prop breaches, and milestones. Returns an empty array if no live stories have been generated yet.
/stories/nfl/games/{game_id}/liveQuery parameters
| Name | Type | Required | Description |
|---|---|---|---|
| audience | string | No | Either betting or stats. Defaults to betting. |
| tone | string | No | Either editorial or humor. Defaults to editorial. |
Example request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.balldontlie.io/stories/nfl/games/424095/live?audience=betting&tone=editorial"Example response
{
"game": { "id": 424095 },
"data": [
{
"id": 1457,
"created_at": "2026-08-01T15:55:51.920Z",
"type": "score_update",
"content": "R. Patterson’s 46-yard FG gives MIA a 3-0 lead at 10:35 of Q1. In the pre-kickoff snapshot, the Dolphins were -2.5 and are covering by 0.5; the 3-point start is well under 47.5.",
"entity_tags": {
"teams": [
{ "id": 5, "name": "Miami Dolphins", "abbreviation": "MIA" },
{ "id": 21, "name": "Washington Commanders", "abbreviation": "WSH" }
],
"players": []
},
"game_snapshot": {
"period": 1,
"home_score": 3,
"away_score": 0,
"minutes_remaining": 10
}
}
]
}Response schema
game
Compact reference to the game this response is scoped to. Echoes the :game_id path parameter.
| Field | Type | Description |
|---|---|---|
| id | integer | Game identifier matching the one supplied in the request path. |
data
Array of live stories for the game, ordered oldest to newest by created_at. Empty if no live stories have fired yet.
| Field | Type | Description |
|---|---|---|
| id | integer | Stable story identifier. Safe to use as an idempotency key. |
| created_at | string (date-time) | RFC 3339 timestamp (UTC) marking when the narrative was written. |
| type | string | Detection module that produced this story (e.g. game_over, close_game, prop_exceeded, batter_breakout). Useful for routing stories into downstream product surfaces. |
| content | string| null | Tweet-length narrative body (≤280 characters). Null only in the rare case that the requested tone has not yet been rendered for this story. |
| entity_tags | object | Teams and players referenced in content. See entity_tags below. |
| game_snapshot | object | Score and clock at the moment the story fired. See game_snapshot below. |
entity_tags
Structured list of the teams and players referenced in the narrative. Use the IDs to join to the corresponding BallDontLie sport APIs.
| Field | Type | Description |
|---|---|---|
| teams | array<object> | Teams mentioned in the story. Each element is { id: integer, name: string, abbreviation: string }. |
| players | array<object> | Players mentioned in the story. Each element is { id: integer, name: string, team?: string }, where team is the abbreviation when known. |
game_snapshot
Point-in-time state of the game when the story was generated. Useful for rendering a score banner alongside the narrative.
| Field | Type | Description |
|---|---|---|
| home_score | integer | Home team score at the moment the story fired. |
| away_score | integer | Away team score at the moment the story fired. |
| period | integer | Quarter number. 1–4 for regulation; 5+ for overtime in regular-season and postseason games. Preseason games end after Q4. |
| minutes_remaining | integer | Whole minutes remaining in the current period. |
| clock | string| null | Raw game-clock string when available (e.g. "6:22"). Present on most live triggers; may be absent on period-boundary events. |
Get postgame story
Returns the most recent postgame story, generated immediately after the game goes final. Evaluates the pregame narrative against actual results. Returns 404 if no postgame story has been generated yet.
/stories/nfl/games/{game_id}/postgameQuery parameters
| Name | Type | Required | Description |
|---|---|---|---|
| audience | string | No | Either betting or stats. Defaults to betting. |
| tone | string | No | Either editorial or humor. Defaults to editorial. |
Example request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.balldontlie.io/stories/nfl/games/424095/postgame?audience=betting&tone=editorial"Example response
{
"game": { "id": 424095 },
"story": {
"id": 1496,
"created_at": "2026-08-01T15:58:34.553Z",
"content": "MIA won the moneyline, covered -2.5, and stayed under 47.5 in a 16-13 OT win. Zach Ertz went under 46.5 rec yds and under 0.5 anytime TD, but over 3.5 receptions; Robbie Chosen also stayed under 0.5 TD.",
"entity_tags": {
"teams": [
{ "id": 5, "name": "Miami Dolphins", "abbreviation": "MIA" },
{ "id": 21, "name": "Washington Commanders", "abbreviation": "WSH" }
],
"players": [
{ "id": 1011, "name": "Zach Ertz", "team": "WSH" },
{ "id": 1060, "name": "Robbie Chosen", "team": "WSH" }
]
}
}
}Response schema
game
Compact reference to the game this response is scoped to. Echoes the :game_id path parameter.
| Field | Type | Description |
|---|---|---|
| id | integer | Game identifier matching the one supplied in the request path. |
story
The single narrative object for this phase. Deterministic for a given (game_id, audience, tone) tuple.
| Field | Type | Description |
|---|---|---|
| id | integer | Stable story identifier. Safe to use as an idempotency key. |
| created_at | string (date-time) | RFC 3339 timestamp (UTC) marking when the narrative was written. |
| content | string| null | Tweet-length narrative body (≤280 characters). Null only in the rare case that the requested tone has not yet been rendered for this story. |
| entity_tags | object | Teams and players referenced in content. See entity_tags below. |
entity_tags
Structured list of the teams and players referenced in the narrative. Use the IDs to join to the corresponding BallDontLie sport APIs.
| Field | Type | Description |
|---|---|---|
| teams | array<object> | Teams mentioned in the story. Each element is { id: integer, name: string, abbreviation: string }. |
| players | array<object> | Players mentioned in the story. Each element is { id: integer, name: string, team?: string }, where team is the abbreviation when known. |