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

# Live Stream (SSE)

> Server-Sent Events stream for live matches. Keeps a heartbeat until the game ends.



## OpenAPI

````yaml /openapi.json get /cricket/api/v2/match/{}/stream
openapi: 3.1.0
info:
  title: SportXAPI Cricket API
  version: 2.0.0
  description: >-
    SportXAPI is a low-latency cricket data API delivering realtime ball-by-ball
    commentary, live scores, detailed match scorecards, tournaments, team/player
    statistics, ICC rankings, and news.
servers:
  - url: https://apiv2.sportxapi.com
    description: Production API (Paid keys)
  - url: https://api.sportxapi.com
    description: Demo & Testing API (Free/Demo tier)
security: []
paths:
  /cricket/api/v2/match/{}/stream:
    get:
      tags:
        - Live Matches & Ball-by-Ball
      summary: Live Stream (SSE)
      description: >-
        Server-Sent Events stream for live matches. Keeps a heartbeat until the
        game ends.
      operationId: match_stream
      parameters:
        - name: matchId
          in: path
          required: true
          description: Match identifier.
          schema:
            type: string
            example: '100123'
      responses:
        '200':
          description: Successful Response (JSON)
          content:
            application/json:
              schema:
                type: object
              example: >-
                event: score\ndata:
                {"matchId":"98697","score":"168/4","overs":"18.0","updatedAt":"2026-09-05T19:47:39.948Z"}\n\nevent:
                heartbeat\ndata: {"ok":true}\n
        '401':
          description: Unauthorized - Missing or invalid X-API-Key header
          content:
            application/json:
              example:
                error: 'Unauthorized: Missing or invalid API key'
        '429':
          description: Too Many Requests - Rate limit or monthly quota exceeded
          content:
            application/json:
              example:
                error: Quota limit exceeded for current billing cycle
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your SportXAPI secret key from the customer dashboard.

````

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