Endpoint
live_scores_statistics
Authentication
Pass your API key as a?key= query parameter or an X-API-Key header. The query parameter is the most convenient option for WebSocket clients that cannot set custom headers:
live_scores_statistics scope.
Keepalive (ping/pong)
The server sends a WebSocket ping control frame every 30 seconds to keep idle connections alive — for example between matches, or when nothing is changing on a quiet match. This prevents proxies and clients from closing the connection on a read/idle timeout.- No client action is required. Most WebSocket libraries (browser
WebSocket, Pythonwebsockets,websocket-client, Gogorilla/websocket, etc.) reply with a pong automatically. You do not need to send anything yourself. - Set your read/idle timeout above 30 seconds. 60 seconds is a safe value. Because the ping is a received frame, it resets your read deadline and prevents premature disconnects.
- Do not set a read timeout below 30 seconds, or you’ll close the connection between pings. There is no application-level
pingmessage to send from the client — the protocol-level ping/pong is handled by your WebSocket library.
Library examples
How it works
- Connect to the endpoint with your API key.
- Send a subscribe message with the
match_idof the match you want to follow (the same id returned by the REST/matchesendpoints). - Receive a snapshot immediately after subscribing, then receive update frames whenever the match state changes.
- Send an unsubscribe message when you no longer need updates for a match.
match_id field so you can demultiplex frames from different matches on the same connection.
Subscribe and unsubscribe
Send JSON control messages to the server:Only matches in your enabled sports can be subscribed. Attempting to subscribe to a match outside your sport allowlist returns an
error frame instead of a snapshot.Python example
Always branch on
data["sport"] — the snapshot schema is sport-specific (soccer carries clock/phase/stats/events; cricket carries score/over/batsmen/bowler/scorecard). See the live snapshot reference for both shapes.