realtimesportsapi-com WebSocket API

Get a short-lived token for the WebSocket push stream

Operations 1

POST /websocket/auth Get a WebSocket token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/realtimesportsapi-com:realtimesportsapi-com-websocket-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

realtimesportsapi-com-websocket-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Realtimesportsapi Com WebSocket API
  version: 1.0.0
  contact:
    name: Realtime Sports API support
    email: austin@elcodev.com
    url: https://www.realtimesportsapi.com/?utm_source=openapi
  license:
    name: Proprietary
    url: https://www.realtimesportsapi.com/terms?utm_source=openapi
  termsOfService: https://www.realtimesportsapi.com/terms?utm_source=openapi
  description: 'Operations tagged WebSocket across 2 of this provider''s published API definitions: original.json, realtimesportsapi-com-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://www.realtimesportsapi.com/api/v1
  description: Production
security:
- BearerAuth: []
- ApiKeyHeader: []
tags:
- name: Websocket
  description: Get a short-lived token for the WebSocket push stream
paths:
  /websocket/auth:
    servers:
    - url: https://www.realtimesportsapi.com/api?utm_source=openapi
      description: Production (not under /v1)
    post:
      operationId: createWebSocketToken
      tags:
      - Websocket
      summary: Get a WebSocket token
      description: 'Returns the WebSocket URL and a token valid for one hour. Connect to `${url}?token=${token}`, then send `{"type":"subscribe","event":"event_score_change","filters":{"sport":"football","league":"nfl"}}`. Event types: event_score_change, event_live, event_status_change, event_play, event_play_corrected (opt-in: a play we already sent was revised; same payload as event_play plus corrected: true, original play id), event_final, event_odds_change. Each delivered message counts toward your quota.'
      parameters: []
      responses:
        '200':
          description: Token issued
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        example: wss://example.up.railway.app
                      token:
                        type: string
                      expiresIn:
                        type: integer
                        example: 3600
                      userId:
                        type: string
                      tier:
                        type: string
                        example: starter
                required:
                - success
                - data
        '401':
          description: Missing or invalid API key (UNAUTHORIZED, INVALID_API_KEY).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Subscription inactive or monthly quota exhausted (SUBSCRIPTION_INACTIVE, WEBSOCKET_QUOTA_EXCEEDED).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: MISSING_TOKEN
            message:
              type: string
              example: Authorization required
            hint:
              type: string
              example: 'Use Authorization: Bearer <your-api-key> or X-API-Key: <your-api-key>.'
          required:
          - code
          - message
      required:
      - success
      - error
  responses:
    ServerError:
      description: Unexpected error. Safe to retry with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key from the dashboard: `Authorization: Bearer <api key>`. Keys are opaque strings, not JWTs.'
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Alternative to the Authorization header (useful behind proxies that strip Authorization).
externalDocs:
  description: Guides, WebSocket and webhook docs
  url: https://www.realtimesportsapi.com/docs?utm_source=openapi
x-refined-from:
- original.json
- realtimesportsapi-com-openapi.json