SnookerAPI
GET /streamFree key, archive on paid

Snooker API: The live feed as Server-Sent Events, sent as it happens: one connection holds for five minutes, then reconnects by itself from the last event

The live feed as Server-Sent Events, sent as it happens: one connection holds for five minutes, then reconnects by itself from the last event.

GEThttps://api.snookerapi.net/v1/stream

Try it

Get a key

Parameters

NameTypeWhat it is
match_ididOnly this match (mt_ id).
typesstringOnly these event types, comma separated: match.started, frame.won, match.finished, century.made.
sinceidReplay from after this le_ id. EventSource sends Last-Event-ID by itself on reconnecting.
tokenstringA token from GET /v1/stream/token, for a browser. Elsewhere send the key in a header as usual.

Returns

FieldTypeWhat it holds
idstringThe record's own id: stable, and the same in every call.
typestringmatch.started, frame.won, match.finished or century.made.
atstringWhen we had it (UTC).
eventobjectThe event: id, name and season.
matchobject or nullThe match: id, stage, round and both players; null for a century.
dataobjectWhat changed: the scores and best of, the frames won, the winner, or the century's player and points.

Example answer

A real answer, read from the data within the last hour: GET /v1/stream?types=frame.won,match.finished

{
    "content_type": "text/event-stream",
    "one_event": "id: le_7qk3m2xa\nevent: frame.won\ndata: {\"id\":\"le_7qk3m2xa\",\"type\":\"frame.won\",\"at\":\"...\",\"event\":{...},\"match\":{...},\"data\":{\"score_one\":4,\"score_two\":3,\"best_of\":11,\"frames_won\":1}}"
}

Errors

StatusCodeWhen
401unauthorizedNo key, or a key that is not valid. Errors
400bad_requestA parameter has the wrong shape. Errors
422unknown_parameterA parameter this call does not take. Errors
429rate_limitedToo many calls this minute; wait for Retry-After. Errors