> ## Documentation Index
> Fetch the complete documentation index at: https://cs2-data-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Game States

> Per-player state (position, view angles, hp, weapons, money, flash, ...) for one round, or a tick range of at
most one round's length. Costs 5 units.



## OpenAPI

````yaml /openapi.json get /v1/games/{game}/states
openapi: 3.1.0
info:
  title: Granuleux
  description: >-
    Pro CS2 match data: matches, rounds, kills, per-hit damage, grenades, bomb
    events, sub-second player state and tick-level parquet downloads. Guides:
    see the docs site.
  version: 1.0.0
servers:
  - url: https://api.granuleux.com
security:
  - bearerAuth: []
paths:
  /v1/games/{game}/states:
    get:
      tags:
        - state
      summary: Game States
      description: >-
        Per-player state (position, view angles, hp, weapons, money, flash, ...)
        for one round, or a tick range of at

        most one round's length. Costs 5 units.
      operationId: game_states_v1_games__game__states_get
      parameters:
        - name: game
          in: path
          required: true
          schema:
            type: string
            title: Game
        - name: round
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Round
        - name: tick_from
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Tick From
        - name: tick_to
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Tick To
        - name: player_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Player Id
        - name: fields
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: comma-separated subset of the state columns
            title: Fields
          description: comma-separated subset of the state columns
        - name: format
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^(json|csv)$
              - type: 'null'
            description: json (default) or csv
            title: Format
          description: json (default) or csv
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Many_State_'
        '400':
          description: Bad or unknown parameter
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Missing or invalid key
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '413':
          description: Tick range longer than 240 s
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Rate limit or daily quota reached; see Retry-After
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    Many_State_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/State'
          type: array
          title: Data
        meta:
          $ref: '#/components/schemas/Meta'
      type: object
      required:
        - data
        - meta
      title: Many[State]
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          example: about:blank
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          anyOf:
            - type: string
            - type: 'null'
    State:
      properties:
        round_no:
          type: integer
          title: Round No
        tick:
          type: integer
          title: Tick
        steamid:
          type: string
          title: Steamid
        t_round:
          anyOf:
            - type: number
            - type: 'null'
          title: T Round
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        side:
          anyOf:
            - type: string
            - type: 'null'
          title: Side
        alive:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Alive
        x:
          anyOf:
            - type: number
            - type: 'null'
          title: X
        'y':
          anyOf:
            - type: number
            - type: 'null'
          title: 'Y'
        z:
          anyOf:
            - type: number
            - type: 'null'
          title: Z
        vx:
          anyOf:
            - type: number
            - type: 'null'
          title: Vx
        vy:
          anyOf:
            - type: number
            - type: 'null'
          title: Vy
        pitch:
          anyOf:
            - type: number
            - type: 'null'
          title: Pitch
        yaw:
          anyOf:
            - type: number
            - type: 'null'
          title: Yaw
        hp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Hp
        armor:
          anyOf:
            - type: integer
            - type: 'null'
          title: Armor
        helmet:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Helmet
        kit:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Kit
        weapon:
          anyOf:
            - type: string
            - type: 'null'
          title: Weapon
        inventory:
          anyOf:
            - type: string
            - type: 'null'
          title: Inventory
        cash:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cash
        equip:
          anyOf:
            - type: integer
            - type: 'null'
          title: Equip
        flash:
          anyOf:
            - type: number
            - type: 'null'
          title: Flash
        scoped:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Scoped
        defusing:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Defusing
        walking:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Walking
        ducking:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ducking
        airborne:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Airborne
        in_bomb_zone:
          anyOf:
            - type: boolean
            - type: 'null'
          title: In Bomb Zone
        spotted:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Spotted
        spotted_by:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Spotted By
        place:
          anyOf:
            - type: string
            - type: 'null'
          title: Place
        clip:
          anyOf:
            - type: integer
            - type: 'null'
          title: Clip
        ammo:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ammo
      type: object
      required:
        - round_no
        - tick
        - steamid
      title: State
      description: >-
        One player at one state sample. With `fields`, only the requested
        columns (plus round_no, tick, steamid) are sent.
    Meta:
      properties:
        data_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Data Version
      type: object
      title: Meta
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `Authorization: Bearer <key>`'

````

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