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

# Match Prematch Bundle

> Single-request bundle for the match-preview UI — fixture, teams, veto pool, deep team-map stats, roster player stats, H2H, recent form

## What it returns

Eight blocks in one round-trip — saves you stitching `/matches/{id}`, `/teams/{id}`, `/players/{id}`, `/teams/{id}/h2h/{opp}`, `/maps`, and the recent-form lookup yourself.

### `team_a` / `team_b`

HltvTeam profile — `hltv_id`, `name`, `logo_url`, `country_code`, `world_ranking`, `valve_ranking`, `weeks_in_top30`, `region`, `is_active`. Falls back to the names/logos on the match record when no HLTV row exists.

### `veto` + `picked_maps`

Raw veto JSON (every pick/ban/decider in order) and a deduped list of just the picked map names — what the series will actually be played on.

### `global_map_stats`

Per-map analytics for picked maps from the global HLTV dataset: CT/T win %, pistol %, round-2 conversion, post-first-kill conversion, total maps in dataset, scraped\_at. Falls back to the full dataset if no veto yet.

### `team_a_map_stats` / `team_b_map_stats`

**Per-team `TeamMapStats` rows** for each picked map plus the `"all"` aggregate. Same shape as [Get Team](/api-reference/teams/get-team)'s `map_stats` — wins/losses, K/D, rating, CT/T splits, pistol %, opening-kill leaders, pick/ban %.

### `team_a_roster_stats` / `team_b_roster_stats`

**Per-player `PlayerMapStats` for each roster member** of the corresponding team, scoped to the picked maps. Each entry has the player's identity (nickname, country, age, avatar, dominant role) and the full per-map stats array (rating/K/D/HS%/ADR/KAST/clutch/multikill — same shape as [Get Player](/api-reference/players/get-player)'s `map_stats`).

### `h2h`

Same payload as [Team H2H](/api-reference/teams/h2h): `summary`, `aggregated`, `recent_fixtures`. `null` if either team has no `hltv_id`.

### `team_a_recent_form` / `team_b_recent_form`

Last 5 finished matches per team in compact form (opponent, score, won, event, finished\_at).

## Required scope

* **Minimum:** `cs2:matches:detail`

## Query

| Param         | Default | Description                                                                               |
| ------------- | ------- | ----------------------------------------------------------------------------------------- |
| `time_filter` | `3m`    | Window for `team_*_map_stats` and `team_*_roster_stats`. Accepts `3m`, `6m`, `1y`, `all`. |

## Example

```bash theme={null}
curl -H "X-API-Key: $TT_KEY" \
  "https://ticktock.bet/cs2/v1/matches/52ef…/prematch?time_filter=6m"
```

## Use cases

* **Match-preview screen** — render the entire pre-match UI from one request.
* **Pre-match modelling** — feed `team_*_map_stats` + `team_*_roster_stats` + `h2h.aggregated` + `global_map_stats` straight into your features.
* **Player-prop pricing** — `team_*_roster_stats` carries every per-side and per-map metric you need.


## OpenAPI

````yaml openapi/cs2-api.json GET /cs2/v1/matches/{match_id}/prematch
openapi: 3.1.0
info:
  title: TickTock B2B API
  description: >-
    Unified CS2 API (``/cs2/v1/*``) plus sport-agnostic ``/v1/*`` meta
    endpoints. Tenant-authenticated via ``X-API-Key`` or ``x-access-token``
    header (REST), or ``api_key`` query parameter (WebSocket). Field visibility
    is gated by per-key scopes — see ``docs/CS2_API_REFERENCE.md`` for the
    catalog and migration.
  version: 1.0.0
servers:
  - url: https://ticktock.bet
    description: Production (same-origin proxy)
  - url: https://feed.ticktock.bet
    description: Production (B2B subdomain)
security: []
paths:
  /cs2/v1/matches/{match_id}/prematch:
    get:
      tags:
        - CS2
      summary: Single-request bundle for the match-preview UI
      description: >-
        Pre-match bundle for one fixture — eight blocks in one round-trip:


        - Match identity (id, scheduled_at, bo_type, event)

        - ``team_a`` / ``team_b`` HltvTeam profile

        - ``veto`` raw + ``picked_maps``

        - ``global_map_stats`` for picked maps (CT/T %, pistol %, …)

        - ``team_a_map_stats`` / ``team_b_map_stats`` per-veto-map TeamMapStats
        + the ``"all"`` aggregate

        - ``team_a_roster_stats`` / ``team_b_roster_stats`` per-roster-player
        PlayerMapStats for the picked maps

        - ``h2h`` (full payload from /teams/{id}/h2h/{opp})

        - ``team_a_recent_form`` / ``team_b_recent_form`` last 5 each


        Designed for the match-preview screen — one round-trip instead of
        stitching together /matches/{id}, /teams/{id}, /players/{id},
        /teams/{id}/h2h/{opp}, /maps, and the recent-form lookup.
      operationId: get_match_prematch_cs2_v1_matches__match_id__prematch_get
      parameters:
        - name: match_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Match Id
        - name: time_filter
          in: query
          required: false
          schema:
            type: string
            description: 'Window for team/player map_stats: 3m, 6m, 1y, all.'
            default: 3m
            title: Time Filter
          description: 'Window for team/player map_stats: 3m, 6m, 1y, all.'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Get Match Prematch Cs2 V1 Matches  Match Id  Prematch
                  Get
              example:
                data:
                  id: 52ef0d9c-7c1f-4c4e-9b3a-4a5e2f8b1c10
                  team_a: Sashi
                  team_b: OG
                  team_a_logo: https://images.ticktock.bet/teams/sashi.png
                  team_b_logo: https://images.ticktock.bet/teams/og.png
                  hltv_event_id: 7438
                  team_a_hltv_id: 7187
                  team_b_hltv_id: 5995
                  event: ESL Pro League S20
                  bo_type: bo3
                  status: live
                  scheduled_at: '2026-05-10T17:00:00+00:00'
                  score_a: 1
                  score_b: 0
                  map_name: de_mirage
            application/xml: {}
        '401':
          description: >-
            Missing API key. Pass either `X-API-Key: <your-key>` or
            `$x$access-token: <your-key>` on REST calls (or `?api_key=` on
            WebSocket handshakes).
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
                required:
                  - detail
              example:
                detail: Missing X-API-Key or $x$access-token header
        '403':
          description: >-
            API key authenticated but lacks the scope required for this
            endpoint, or the path's sport is not in the key's `sport_allowlist`.
            Use `GET /v1/whoami` to inspect the granted scope set.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
                required:
                  - detail
              example:
                detail: >-
                  Required scope 'cs2:matches:detail' is not granted to this API
                  key. Contact your account manager to extend the key's scopes.
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
                required:
                  - detail
              example:
                detail: Match not found
        '422':
          description: >-
            Validation error — a query/path parameter failed validation. The
            body lists the offending fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - type: enum
                    loc:
                      - query
                      - time_filter
                    msg: 'Input should be one of: 3m, 6m, 1y, all'
                    input: 2w
        '429':
          description: >-
            Tenant rate limit exceeded. Default is 600 req/min per tenant;
            configurable per contract. WebSocket connections are not
            rate-limited at the request layer.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
                required:
                  - detail
              example:
                detail: Rate limit exceeded (600 req/min)
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                example: 30
      security:
        - XAPIKeyHeader: []
        - XAccessTokenHeader: []
        - UOFAccessTokenHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    XAPIKeyHeader:
      type: apiKey
      description: Tenant API key issued during onboarding
      in: header
      name: X-API-Key
    XAccessTokenHeader:
      type: apiKey
      description: UOF-standard alias for the tenant API key
      in: header
      name: x-access-token
    UOFAccessTokenHeader:
      type: apiKey
      description: Deprecated alias for x-access-token (backward compatibility)
      in: header
      name: $x$access-token

````