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

# List Game Segments

> Returns every phase of play, team possession, player possession, key moment, overload and dead ball in the game in one response.

> [!WARNING]
>
> The Game Data API is in preview. Endpoints, fields and limits may change before release, and it is not yet available to call.


## OpenAPI

````yaml api-reference/game-data/openapi.json GET /games/{game_id}/segments
openapi: 3.0.0
info:
  title: Uplift Game Data API (Preview)
  version: v1
  description: >-
    Events, phases, possessions, physical summaries and tracking from match
    video. In preview: not yet available.
servers:
  - url: https://api.uplift.ai/v1
security: []
paths:
  /games/{game_id}/segments:
    get:
      tags:
        - Game Data
      summary: List Game Segments
      description: >-
        Returns every phase of play, team possession, player possession, key
        moment, overload and dead ball in the game in one response.
      parameters:
        - name: game_id
          in: path
          required: true
          description: Game identifier. The game must belong to your organization.
          schema:
            type: string
            format: uuid
        - name: segment_type
          in: query
          required: false
          description: One or more segment types, comma-separated.
          schema:
            type: string
        - name: team_id
          in: query
          required: false
          description: Only this team, by `team_id`.
          schema:
            type: string
        - name: player_id
          in: query
          required: false
          description: Only this roster entry.
          schema:
            type: string
        - name: period
          in: query
          required: false
          description: >-
            Only this period: 1 and 2 for halves, 3 and 4 for extra time, 5 for
            a penalty shootout.
          schema:
            type: integer
            minimum: 1
            maximum: 5
      responses:
        '200':
          description: All matching segments in the game.
          content:
            application/json:
              schema:
                type: object
                properties:
                  game_id:
                    type: string
                    format: uuid
                  run_id:
                    type: string
                    format: uuid
                  segment_count:
                    type: integer
                  segments:
                    type: array
                    items:
                      $ref: '#/components/schemas/GameSegment'
              example:
                game_id: 6b1e0c2a-7d8f-4a51-9b0e-2f3c1d4e5a6b
                run_id: f2a91c3e-0b47-4d6a-8e15-7c9d2b3a4e5f
                segment_count: 412
                segments:
                  - segment_id: ph-0417
                    segment_type: phase_of_play
                    segment_subtype: null
                    team_id: t-0451
                    team_side: home
                    player_id: null
                    period: 1
                    time_start_s: 58.2
                    time_end_s: 66.9
                    frame_start: 1746
                    frame_end: 2007
                    confidence: 0.74
                    confidence_tier: medium
                    layer: ball
                    attributes:
                      team_in_possession_phase_type: create
                      team_out_of_possession_phase_type: medium_block
                      previous_phase: build_up
                      ended_with: phase_change
                      team_possession_lead_to_shot: true
                      team_possession_lead_to_goal: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: NotFound
                message: The specified game_id was not found.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    GameSegment:
      type: object
      description: >-
        A span of time: a phase of play, a team or player possession, a key
        moment, an overload or a dead ball.
      properties:
        segment_id:
          type: string
        segment_type:
          type: string
          enum:
            - phase_of_play
            - team_possession
            - player_possession
            - key_moment
            - overload
            - dead_ball
        segment_subtype:
          type: string
          nullable: true
          description: For example the kind of key moment.
        team_id:
          type: string
          nullable: true
          description: Stable team identifier. For a phase of play, the team in possession.
        team_side:
          type: string
          enum:
            - home
            - away
          nullable: true
        player_id:
          type: string
          nullable: true
        period:
          type: integer
        time_start_s:
          type: number
        time_end_s:
          type: number
        frame_start:
          type: integer
        frame_end:
          type: integer
        confidence:
          type: number
          minimum: 0
          maximum: 1
        confidence_tier:
          type: string
          enum:
            - high
            - medium
            - low
          description: '`confidence` as a band, for review.'
        layer:
          type: string
          enum:
            - position
            - ball
            - skeleton
          description: >-
            What the segment needs: player positions only (`position`), the ball
            as well (`ball`), or 3D skeletons (`skeleton`).
        attributes:
          type: object
          additionalProperties: true
          description: Type-specific fields, as listed in the event catalogue.
    Error:
      type: object
      properties:
        error:
          type: string
          description: A short error code representing the type of error.
        message:
          type: string
          description: A detailed message explaining the error.
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: BadRequest
            message: >-
              The request parameters are invalid. Please review the request and
              try again.
    Unauthorized:
      description: Unauthorized. Bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
            message: Bearer token is missing or invalid.
    Forbidden:
      description: Forbidden. You do not have permission to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Forbidden
            message: You do not have permission to access this resource.
    TooManyRequests:
      description: Too Many Requests. The rate limit has been exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: TooManyRequests
            message: The rate limit has been exceeded. Please wait and try again later.
    InternalServerError:
      description: Internal Server Error. Something went wrong on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: InternalServerError
            message: >-
              An unexpected error occurred on the server. Please try again
              later.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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