> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://statpad.dev/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://statpad.dev/docs/_mcp/server.

# Get a game's box score

GET https://api.statpad.dev/v1/{league}/games/{game_id}/boxscore

Reference: https://statpad.dev/docs/api-reference/statistics/get-box-score

## Authentication

- `Authorization` header (bearer token, required) — An API key, sent as `Authorization: Bearer <key>`.

## Request

### Path parameters

- `league` (string, required) — The league's alias.
- `game_id` (string, required)

### Headers

- `If-None-Match` (string, optional) — An `ETag` from an earlier response. When it still matches, the response is 304 with no body.

## Response

### 200

Scores by period, and team and player stats.

- `game_id` (string, required)
- `period_scores` (list of PeriodScore, required)
- `teams` (list of TeamGameStats, required)
- `players` (list of PlayerGameStats, required)
- `seq` (long, required) — A position in a stream. 0 is before the first change.

## Errors

### 400 Bad Request Error

A parameter is missing or invalid (`bad_request`).

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 401 Unauthorized Error

The API key is missing, unknown or revoked (`unauthorized`).

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 403 Forbidden Error

The plan doesn't include this league or feature (`forbidden`).

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 404 Not Found Error

No such league or entity (`not_found`).

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 429 Too Many Requests Error

The account's request rate (`rate_limited`) or period allowance (`quota_exhausted`, with `resets_at`) is used up. No data is served.

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 500 Internal Server Error

Something failed on our side (`internal`). Retry with backoff.

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

### 503 Service Unavailable Error

Account access or its limits could not be checked because a dependency is unavailable (`unavailable`). No data is served.

- `type` (string, required) — Identifies the problem type.
- `title` (string, required)
- `status` (integer, required)
- `code` (enum, required) — `bad_request` a malformed request or message. `unauthorized` a missing or invalid API key. `forbidden` the plan doesn't include the league or feature. `not_found`. `rate_limited`. `resync_required` the requested position is older than the retained history, so subscribe again without `resume` for a fresh snapshot (for a game stream, a REST game read with its `seq` also works). `invalid_resume` a resume seq beyond the stream's head. `slow_consumer` the client fell too far behind and was dropped from a stream, so resume from `resume_from`. `too_many_subscriptions`. `unknown_stream`. `internal`. `unavailable`. `quota_exhausted` the account has used its request allowance for the current period.
  - Allowed values: `bad_request`, `unauthorized`, `forbidden`, `not_found`, `rate_limited`, `resync_required`, `invalid_resume`, `slow_consumer`, `too_many_subscriptions`, `unknown_stream`, `internal`, `unavailable`, `quota_exhausted`
- `detail` (string, optional)
- `request_id` (string, optional)
- `min_seq` (long, optional) — With `resync_required`, the oldest seq the stream still holds.
- `resets_at` (datetime, optional) — With `quota_exhausted`, when the next period's allowance starts.

## Types

### PeriodScore

- `team_id` (string, required)
- `period` (integer, required)
- `period_type` (enum, required)
  - Allowed values: `regular`, `overtime`, `shootout`
- `points` (integer, required)

### TeamGameStats

- `game_id` (string, required)
- `team_id` (string, required)
- `stats` (map from string to StatLine, required) — Stat lines keyed by category (`passing`, `rushing`, `defense`).
- `version` (integer, required) — Bumps on every change to the entity, deletions included. A client holding a version can ignore any state with a lower one.

### PlayerGameStats

One player's stats in one game, every category together.

- `game_id` (string, required)
- `player_id` (string, required)
- `team_id` (string, required)
- `stats` (map from string to StatLine, required) — Stat lines keyed by category (`passing`, `rushing`, `defense`).
- `version` (integer, required) — Bumps on every change to the entity, deletions included. A client holding a version can ignore any state with a lower one.

### StatLine

- double
- string

## Examples

**Response**

```json
{
  "game_id": "01a1b987-644f-7459-b8e0-810b314f71da",
  "period_scores": [
    {
      "team_id": "01a1b987-6450-7c2a-898a-4dfae5a45300",
      "period": 1,
      "period_type": "regular",
      "points": 3
    },
    {
      "team_id": "01a1b987-6450-7c2a-898a-4dfae5a45300",
      "period": 2,
      "period_type": "regular",
      "points": 0
    },
    {
      "team_id": "01a1b987-6450-7c2a-898a-4dfae5a45300",
      "period": 3,
      "period_type": "regular",
      "points": 0
    },
    {
      "team_id": "01a1b987-6450-7c2a-898a-4dfae5a45300",
      "period": 4,
      "period_type": "regular",
      "points": 7
    },
    {
      "team_id": "01a1b987-6452-7f29-ac56-aab66006a3f5",
      "period": 1,
      "period_type": "regular",
      "points": 10
    },
    {
      "team_id": "01a1b987-6452-7f29-ac56-aab66006a3f5",
      "period": 2,
      "period_type": "regular",
      "points": 7
    },
    {
      "team_id": "01a1b987-6452-7f29-ac56-aab66006a3f5",
      "period": 3,
      "period_type": "regular",
      "points": 3
    },
    {
      "team_id": "01a1b987-6452-7f29-ac56-aab66006a3f5",
      "period": 4,
      "period_type": "regular",
      "points": 13
    }
  ],
  "teams": [
    {
      "game_id": "01a1b987-644f-7459-b8e0-810b314f71da",
      "team_id": "01a1b987-6452-7f29-ac56-aab66006a3f5",
      "stats": {
        "efficiency": {
          "fourth_down_att": 0,
          "fourth_down_conv": 0,
          "third_down_att": 12,
          "third_down_conv": 4
        },
        "offense": {
          "first_downs": 16,
          "plays": 56,
          "yards": 319
        }
      },
      "version": 1
    },
    {
      "game_id": "01a1b987-644f-7459-b8e0-810b314f71da",
      "team_id": "01a1b987-6450-7c2a-898a-4dfae5a45300",
      "stats": {
        "efficiency": {
          "fourth_down_att": 2,
          "fourth_down_conv": 1,
          "third_down_att": 14,
          "third_down_conv": 4
        },
        "offense": {
          "first_downs": 10,
          "plays": 54,
          "yards": 227
        }
      },
      "version": 1
    }
  ],
  "players": [
    {
      "game_id": "01a1b987-644f-7459-b8e0-810b314f71da",
      "player_id": "01a1b987-645b-7732-8647-a8d05695b4c2",
      "team_id": "01a1b987-6452-7f29-ac56-aab66006a3f5",
      "stats": {
        "passing": {
          "att": 26,
          "cmp": 16,
          "int": 0,
          "rating": 105,
          "sack_yds": 0,
          "sacks": 0,
          "td": 1,
          "yds": 242
        }
      },
      "version": 1
    },
    {
      "game_id": "01a1b987-644f-7459-b8e0-810b314f71da",
      "player_id": "01a1b987-646a-76dc-bd0a-afc758df2911",
      "team_id": "01a1b987-6450-7c2a-898a-4dfae5a45300",
      "stats": {
        "rushing": {
          "att": 9,
          "long": 65,
          "td": 1,
          "yds": 85
        }
      },
      "version": 1
    }
  ],
  "seq": 331
}
```

**SDK Code**

```python Jacksonville 33, Baltimore 10
import requests

url = "https://api.statpad.dev/v1/nfl/games/game_id/boxscore"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Jacksonville 33, Baltimore 10
const url = 'https://api.statpad.dev/v1/nfl/games/game_id/boxscore';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Jacksonville 33, Baltimore 10
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.statpad.dev/v1/nfl/games/game_id/boxscore"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Jacksonville 33, Baltimore 10
require 'uri'
require 'net/http'

url = URI("https://api.statpad.dev/v1/nfl/games/game_id/boxscore")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Jacksonville 33, Baltimore 10
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.statpad.dev/v1/nfl/games/game_id/boxscore")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Jacksonville 33, Baltimore 10
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.statpad.dev/v1/nfl/games/game_id/boxscore', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Jacksonville 33, Baltimore 10
using RestSharp;

var client = new RestClient("https://api.statpad.dev/v1/nfl/games/game_id/boxscore");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Jacksonville 33, Baltimore 10
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.statpad.dev/v1/nfl/games/game_id/boxscore")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```