> 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.

# List a game's drives or at-bats

GET https://api.statpad.dev/v1/{league}/games/{game_id}/play-groups

Groups in game order, (`sequence`, `id`). Deleted groups are left out.

Reference: https://statpad.dev/docs/api-reference/play-by-play/list-play-groups

## 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)

### Query parameters

- `cursor` (string, optional) — `next_cursor` from the previous page. Omit it for the first page.
- `limit` (integer, optional, default: 100) — Page size.

### 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

A page of play groups.

- `data` (list of PlayGroup, required)
- `next_cursor` (string, required, nullable) — Pass as `cursor` for the next page; null on the last page.
- `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

### PlayGroup

A drive (football), an at-bat (baseball) or a possession. Ordered by `sequence`, which a provider can renumber, so identify groups by id.

- `id` (string, required)
- `game_id` (string, required)
- `kind` (enum, required)
  - Allowed values: `drive`, `at_bat`, `possession`
- `sequence` (integer, required)
- `period` (integer, required)
- `period_half` (enum, required, nullable) — Top or bottom of an inning. Other sports have no halves, so the field is null.
  - Allowed values: `top`, `bottom`
- `team_id` (string, required, nullable) — The team with the ball or at bat.
- `result` (string, required, nullable)
- `football` (FootballDrive, required, nullable)
- `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.
- `updated_at` (datetime, required)

### FootballDrive

- `start_clock` (integer, required, nullable)
- `end_clock` (integer, required, nullable)
- `start_yardline` (integer, required, nullable)
- `end_yardline` (integer, required, nullable)
- `play_count` (integer, required, nullable)
- `yards` (integer, required, nullable)
- `first_downs` (integer, required, nullable)
- `duration_seconds` (integer, required, nullable)
- `points` (integer, required, nullable)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "01a1b987-6473-7931-9855-a6ebb6a17a4e",
      "game_id": "01a1b987-644f-7459-b8e0-810b314f71da",
      "kind": "drive",
      "sequence": 1,
      "period": 1,
      "period_half": null,
      "team_id": "01a1b987-6452-7f29-ac56-aab66006a3f5",
      "result": "Touchdown",
      "football": {
        "start_clock": 900,
        "end_clock": 680,
        "start_yardline": 23,
        "end_yardline": 100,
        "play_count": 7,
        "yards": 77,
        "first_downs": 2,
        "duration_seconds": 220,
        "points": 7
      },
      "version": 1,
      "updated_at": "2026-11-08T05:00:20.428452Z"
    },
    {
      "id": "01a1b987-6476-7cf7-9cfd-647d59a7f8f3",
      "game_id": "01a1b987-644f-7459-b8e0-810b314f71da",
      "kind": "drive",
      "sequence": 2,
      "period": 1,
      "period_half": null,
      "team_id": "01a1b987-6450-7c2a-898a-4dfae5a45300",
      "result": "Field Goal",
      "football": {
        "start_clock": 680,
        "end_clock": 391,
        "start_yardline": 35,
        "end_yardline": 65,
        "play_count": 8,
        "yards": 30,
        "first_downs": 2,
        "duration_seconds": 289,
        "points": 3
      },
      "version": 1,
      "updated_at": "2026-11-08T05:00:20.428452Z"
    }
  ],
  "next_cursor": "eyJzIjoyLCJpIjoiMDFhMWI5ODctNjQ3Ni03Y2Y3LTljZmQtNjQ3ZDU5YTdmOGYzIn0",
  "seq": 331
}
```

**SDK Code**

```python The first two drives of Jacksonville at Baltimore
import requests

url = "https://api.statpad.dev/v1/nfl/games/game_id/play-groups"

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

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

print(response.json())
```

```javascript The first two drives of Jacksonville at Baltimore
const url = 'https://api.statpad.dev/v1/nfl/games/game_id/play-groups';
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 The first two drives of Jacksonville at Baltimore
package main

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

func main() {

	url := "https://api.statpad.dev/v1/nfl/games/game_id/play-groups"

	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 The first two drives of Jacksonville at Baltimore
require 'uri'
require 'net/http'

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

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 The first two drives of Jacksonville at Baltimore
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/play-groups")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php The first two drives of Jacksonville at Baltimore
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp The first two drives of Jacksonville at Baltimore
using RestSharp;

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

```swift The first two drives of Jacksonville at Baltimore
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.statpad.dev/v1/nfl/games/game_id/play-groups")! 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()
```