# Get complete challenge snapshot

```http
GET /api/public/v1/competitions/acc/discoveries/snapshot
```

**Scope**: `competition.read`. An API key is required. ACC enrollment and team membership are not required for this public read.

Returns the complete scored challenge pool and published progress in one consistent response. For filtering, pagination, or a single challenge, use [Get challenge progress](./get-challenge-progress.md).

## Query parameters

| Parameter | Type and rules |
| :--- | :--- |
| `problem` | Required exactly once: `ac` or `stable_ac`. |
| `include` | Optional, at most once: `initialRelators`. Adds the original words to every returned item. Omit for compact progress. |

Only `problem` and `include` are accepted. This operation has no filtering, pagination, or `snapshotId` selection. Unknown, empty, invalid, or repeated parameters return `400 E_MALFORMED`.

## Response fields

HTTP `200`, with the standard [JSON envelope](../../../conventions.md#envelope).

| Field             | Type and meaning                                                                                                                                                                                                 |
| :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `competitionId`   | `"acc"`.                                                                                                                                                                                                         |
| `contractVersion` | `string` — ACC API contract identifier for reference. Clients should not depend on a fixed value. |
| `problem`         | `"ac"` or `"stable_ac"` — The selected problem. All rows and counts belong to it.                                                                                                                                |
| `published`       | `boolean` — Whether the public challenge pool and progress may be shown.                                                                                                                                         |
| `generatedAt`     | UTC ISO 8601 `string` or `null` — Generation time of the selected scoring snapshot, not the HTTP request time. Null before a scoring run or when unpublished. Fractional seconds may be present.                 |
| `totalCount`      | Non-negative `integer` — Exactly `items.length`. When published, the number of all scored challenges for the selected problem: 10,115 in the official pool. The two problems together contain 20,230 challenges. |
| `items`           | [`SnapshotDiscovery[]`](#snapshotdiscovery) — Complete pool, ordered by `challengeId` ascending, with unique IDs. Includes solved and unsolved challenges; excludes training challenges.                         |

When published but no scoring run exists, the response still includes the entire frozen pool, all items are `unsolved`, and `generatedAt` is `null`. When unpublished, `items` is empty, `totalCount` is `0`, and `generatedAt` is `null`. An unpublished result is not evidence that nobody has submitted. Submission opening and closing dates do not independently hide published progress.

### SnapshotDiscovery

| Field               | Type and meaning                                                                                                                                                                                   |
| :------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `challengeId`       | Non-empty `string` — Exact ID from the frozen scored manifest.                                                                                                                                     |
| `problem`           | `"ac"` or `"stable_ac"`.                                                                                                                                                                           |
| `status`            | `"solved"` or `"unsolved"`.                                                                                                                                                                        |
| `currentBestLength` | Non-negative `integer` or `null` — Current shortest verified move count. **Zero is a valid solution length.**                                                                                      |
| `kTeams`            | Non-negative `integer` — Distinct teams tied at the current minimum; not all teams that have ever solved the challenge.                                                                            |
| `initialRelators` | `[number[], number[]]` — Present only with `include=initialRelators`: the two original words as ordered arrays of signed integers. |

For an unsolved challenge, `currentBestLength` is `null` and `kTeams` is `0`. For a solved challenge, the length is non-null and `kTeams` is at least `1`; `kTeams > 1` means teams share the minimum. Missing or inconsistent challenge data returns `503 ACC_NOT_READY`. Responses do not disclose moves, original submissions, notes, team membership, private account IDs, or a full list of tied teams.

The expansion includes original words for both solved and unsolved challenges. In the official rank-2 pool, `1` and `2` represent `x` and `y`; `-1` and `-2` represent their inverses. An empty word is an empty array. Preserve word order and signs; do not reduce or reorder the original words. Without `include`, `initialRelators` is omitted, not returned as null. Expansion does not add `targetRelators` or submitted solution paths.

Initial total word length is `initialRelators[0].length + initialRelators[1].length`. It is distinct from the verified move count in `currentBestLength`.

## Consistency and rate limits

Each response uses one consistent snapshot; later requests may return updated progress. A request consumes one read against each applicable API limit and no team submission quota. See [Rate limiting](../../../rate-limiting.md).

## Example request

```bash
export SAIR_API_BASE="https://api.sair.foundation/api/public/v1"

curl "$SAIR_API_BASE/competitions/acc/discoveries/snapshot?problem=ac" \
  -H "Authorization: Bearer $SAIR_API_KEY" \
  -o acc-discoveries-snapshot.json
```

Use `problem=stable_ac` for Stable AC.

To download the full pool with original words, add `include=initialRelators`:

```bash
curl "$SAIR_API_BASE/competitions/acc/discoveries/snapshot?problem=ac&include=initialRelators" \
  -H "Authorization: Bearer $SAIR_API_KEY" \
  -o acc-challenges-with-relators.json
```

## Example response

This is the complete response when public results are unpublished:

```json
{
  "ok": true,
  "data": {
    "competitionId": "acc",
    "contractVersion": "acc-discovery-v1",
    "problem": "ac",
    "published": false,
    "generatedAt": null,
    "totalCount": 0,
    "items": []
  }
}
```

The following illustrates one unsolved `SnapshotDiscovery` item with `include=initialRelators`. These values illustrate the response shape, not current progress. A published snapshot includes every scored challenge.

```json
{
  "challengeId": "ac-08491",
  "problem": "ac",
  "status": "unsolved",
  "currentBestLength": null,
  "kTeams": 0,
  "initialRelators": [
    [-2, -1],
    [-2, -2, -1, -1, 2, 2, 1]
  ]
}
```

## Errors

| HTTP  | Code                                                                        | Meaning                                                                                                                       |
| :---: | :-------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------- |
| `400` | `E_MALFORMED` | Missing `problem`, or empty, invalid, repeated, or unsupported query parameters. |
| `401` | `API_KEY_REQUIRED`, `INVALID_API_KEY`, `API_KEY_REVOKED`, `API_KEY_EXPIRED` | Missing or unusable API key.                                                                                                  |
| `403` | `API_KEY_SCOPE_DENIED`                                                      | The key lacks `competition.read`.                                                                                             |
| `404` | `NOT_FOUND`                                                                 | The ACC competition is unavailable.                                                                                           |
| `429` | `rate_limited`, `ACCOUNT_RATE_LIMIT_EXCEEDED`, `AUTH_RATE_LIMIT_EXCEEDED`   | Applicable shared request, account-read, or authentication limits. Preserve the returned `Retry-After`, message, and details. |
| `503` | `ACC_NOT_READY`                                                             | Challenge data or progress is temporarily unavailable. Retry later; an error is not an empty or unpublished snapshot.         |

See [shared errors](../acc.md#shared-errors) and [authentication](../../../authentication.md) for the response envelope and key requirements.
