> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NFL & college football box score & player stats API

> Get 1 NFL or college football game's box score from X, with team totals & each player's passing, rushing, receiving, defense & kicking stats. 1 credit.

**200**

```json theme={null}
{
  "id": "2055084502741811200",
  "league": "nfl",
  "home": {
    "teamId": "689566294702555136",
    "totals": null,
    "players": []
  },
  "away": {
    "teamId": "689566304366292992",
    "totals": null,
    "players": []
  },
  "teams": {},
  "players": {}
}
```

**400**

```json theme={null}
{
  "error": "invalid_input",
  "message": "Invalid input. Check the request body."
}
```

**401**

```json theme={null}
{
  "error": "unauthenticated",
  "message": "Authentication required. Provide a valid API key or bearer token."
}
```

**402**

```json theme={null}
{
  "error": "insufficient_credits",
  "message": "Insufficient credits. Top up or subscribe to continue."
}
```

**404**

```json theme={null}
{
  "error": "not_found",
  "message": "Resource not found."
}
```

**424**

```json theme={null}
{
  "error": "x_api_unavailable",
  "message": "X data source temporarily unavailable. Try again later."
}
```

**429**

```json theme={null}
{
  "error": "rate_limit_exceeded",
  "message": "Too many requests. Try again later.",
  "retryAfter": 60
}
```

**502**

```json theme={null}
{
  "error": "x_api_unavailable",
  "message": "X data source temporarily unavailable. Try again later."
}
```

**503**

```json theme={null}
{
  "error": "x_api_unavailable",
  "message": "Xquik is busy right now. Retry shortly."
}
```

> For the complete documentation index, see [llms.txt](/llms.txt).

**1 credit per request** · [All plans](https://xquik.com/#pricing) from \$0.00012/credit · Direct [MPP](/mpp/machine-payments-protocol.md) at USD 0.00015 per call · Supports [guest paid reads](/guides/guest-wallets.md)

```bash cURL theme={null}
curl "https://xquik.com/api/v1/x/sports/nfl/games/2055084502741811200/box-score" \
  -H "x-api-key: xq_your_api_key_here" | jq
```

```javascript Node.js theme={null}
const gameId = "2055084502741811200";
const response = await fetch(`https://xquik.com/api/v1/x/sports/nfl/games/${gameId}/box-score`, {
  headers: { "x-api-key": "xq_your_api_key_here" },
});
const game = await response.json();
if (!response.ok) throw new Error(JSON.stringify(game));

for (const side of [game.home, game.away]) {
  for (const entry of side.players) {
    if (entry.passing === undefined) continue;
    const player = game.players[entry.playerId];
    console.log(`${player?.name} ${entry.passing.completions}/${entry.passing.attempts}`);
  }
}
```

```python Python theme={null}
import requests

game_id = "2055084502741811200"
response = requests.get(
    f"https://xquik.com/api/v1/x/sports/nfl/games/{game_id}/box-score",
    headers={"x-api-key": "xq_your_api_key_here"},
)
game = response.json()
if not response.ok:
    raise RuntimeError(game)

for side in (game["home"], game["away"]):
    for entry in side["players"]:
        passing = entry.get("passing")
        if passing is None:
            continue
        player = game["players"].get(entry["playerId"], {})
        print(player.get("name"), f"{passing['completions']}/{passing['attempts']}")
```

## Read team totals & player stats

Use `GET /x/sports/{league}/games/{id}/box-score` for a game's stats. Find the game ID with
[List football games](/api-reference/x/sports-games.md).

* `home` & `away` hold each team's `totals` & a `players` list.
* `totals` has first downs, third downs, passing, rushing, penalties, turnovers & time of possession.
* Each `players` entry has a `playerId` & the stat groups X sent for that player.
* `players` at the top holds each player once, keyed by ID, with name, position & photos.

A stat group X did not send is left out, so a kicker has no `passing`. A game that has not started
has no stats yet, so `totals` is null.

## Path parameters

**league** `string` *required*

`nfl` for the NFL or `ncaafb` for college football, in any case. Another value gets a free
`400 invalid_league`.

**id** `string` *required*

Game ID, a number up to 19 digits, such as `2055084502741811200`.
[List football games](/api-reference/x/sports-games.md) returns it as `id`. Another value gets a free
`400 invalid_game_id`.

## Query parameters

**fields** `string`

Fields to keep in each row, comma-separated, such as `id,text,author.username`. Use dots for nested fields. Case & underscores do not matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics always stay. An unknown name returns `400 unknown_field` with the valid names, before any read. The price stays the same.

**omit** `string`

Fields to drop from each row, comma-separated, such as `entities,media`. It takes the same names as `fields`. With `fields`, it drops from the kept fields.

## Headers

**x-api-key** `string`

Full account key. Sessions and OAuth also work.

**Authorization** `string`

`Bearer xq_your_guest_key_here` for `paid_reads`.

## Response

### 200 OK

**id** `string`

The game ID from your request.

**league** `string`

The league from your request, `nfl` or `ncaafb`.

**home** `object`

The home team's totals & player stats.

**teamId** `string`

The team, a key of `teams`.

**totals** `object`

The team's totals, or null before kickoff.

**firstDowns** `number`

First downs.

**thirdDowns** `object`

Third downs tried in `attempts` & converted in `successes`.

**fumbles** `object`

The team's fumbles, with the fields of a player's `fumbles`.

**passing** `object`

The team's passing, with the fields of a player's `passing`.

**penalties** `object`

Penalties against the team, as `count` & `yards`.

**rushing** `object`

The team's rushing, with the fields of a player's `rushing`.

**timeOfPossessionSeconds** `number`

Time with the ball, in seconds.

**totalYards** `number`

Total yards.

**turnovers** `number`

Turnovers.

**players** `object[]`

Each player with stats, 1 entry per player. Only the stat groups X sent are present.

**playerId** `string`

The player, a key of `players`.

**passing** `object`

`attempts`, `completions`, `yards`, `netYards` after sacks, `avgYards`, `touchdowns`,
`interceptions`, `sacks`, `sackYards` & the passer `rating`.

**rushing** `object`

`attempts`, `yards`, `avgYards`, `longest` & `touchdowns`.

**receiving** `object`

`targets`, `receptions`, `yards`, `avgYards` per catch, `longest` & `touchdowns`.

**defense** `object`

`tackles` solo, `combined` solo & assisted, `tacklesForLoss`, `sacks` with a shared sack as 0.5,
`interceptions`, `passesDefended` & `forcedFumbles`.

**fumbles** `object`

`lost` to the other team, `ownRecoveryTouchdowns` & `opponentRecoveryTouchdowns`.

**kickReturns** `object`

`returns`, `yards`, `avgYards`, `longest` & `touchdowns`.

**puntReturns** `object`

Punt returns, with the fields of `kickReturns`.

**interceptionReturns** `object`

Interception returns, with the fields of `kickReturns`.

**punts** `object`

`attempts`, `yards`, `avgYards`, `avgNetYards` after returns, `inside20` & `longest`.

**fieldGoals** `object`

`attempts`, `made` & the `longest` made, in yards.

**extraPoints** `object`

Extra point kicks, as `attempts` & `made`.

**conversions** `object`

2-point conversions by `passSuccesses`, `rushSuccesses`, `turnoverSuccesses` & `defenseSuccesses`.

**away** `object`

The away team's totals & player stats, with the fields of `home`.

**teams** `object`

The teams this answer names, keyed by team ID.

**id** `string`

The team ID that games & players refer to.

**name** `string`

The team's full name, such as `San Francisco 49ers`.

**shortName** `string`

The team's short name.

**abbreviation** `string`

The team's abbreviation, such as `SF`.

**alternateId** `string`

Another ID X keeps for the team. College plays & drives name a side by it.

**location** `string`

The school or place a college team plays for. X sends it only in college schedules.

**colors** `object[]`

The team's colors. Each has `r`, `g` & `b`, from 0 to 255.

**logos** `object`

The team's logo links. `default` is the one X shows. `light` & `dark` suit light or dark
backgrounds.

**xUserId** `string`

The user ID of the team's X account. Pass it to [Get
user](/api-reference/x/twitter-profile-lookup.md).

**players** `object`

The players this answer names, keyed by player ID.

**id** `string`

The player ID that plays & stats refer to.

**teamId** `string`

The player's team, a key of `teams`.

**name** `string`

The player's full name.

**shortName** `string`

The name play descriptions use, such as `B.Purdy`.

**jersey** `string`

The jersey number, as text.

**position** `string`

The position, such as `QB` or `DE`.

**college** `string`

The college the player came from.

**birthPlace** `string`

Where the player was born.

**birthDate** `string`

The birth date, as `YYYY-MM-DD`.

**headshots** `object`

Photo links in `original`, `large`, `medium` & `small`. Any of them can be null.

**xUser** `object`

The player's X account, with `id`, `username` & `blueVerified`. Null when the player has none.

### 400 Invalid game ID

```json theme={null}
{
  "error": "invalid_game_id",
  "message": "Send a numeric game ID, such as 2055084502741811200."
}
```

The game ID is not a number. A league other than `nfl` or `ncaafb` gets `invalid_league`. Both
answers are free.

### 404 Game not found

```json theme={null}
{
  "error": "game_not_found",
  "message": "Game not found. Find game IDs with GET /x/sports/nfl/games."
}
```

X knows no game with this ID in the league. This answer is free.

### 401 Unauthenticated

Anonymous requests get `WWW-Authenticate: Bearer` and a guest wallet checkout action. This is not a Payment challenge.

```json theme={null}
{ "error": "unauthenticated" }
```

### 402 Payment required

Account keys get account options. Guest keys get guest top-up only.
No checkout starts automatically. Confirm any payment action.

### 502 X API unavailable

```json theme={null}
{ "error": "x_api_unavailable" }
```

The read service returned an error. Retry after a short delay.

> [!NOTE]
>
> **Related.** [List football games](/api-reference/x/sports-games.md) · [Get football scoreboard](/api-reference/x/sports-game.md) · [Get football plays](/api-reference/x/sports-game-plays.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.