# Football Studio live results in real time, in your code

> Football Studio live results, free on the table page and in your program through /stream: every round with both cards, the moment it closes.

Source: https://lynxmetrics.com/en/blog/football-studio/football-studio-live-results · Published on 2026-11-23, updated on 2026-11-23

**Football Studio live results** are free on the [public table page](https://lynxmetrics.com/live/football-studio), which refreshes on its
own: the latest rounds with the Home card, the Away card and the winner. For a program (a bot, a dashboard, a
spreadsheet that fills itself), the way in is `/stream` on the [Football Studio API](https://lynxmetrics.com/apis/football-studio): every
round arrives the moment it is stored, together with the time of each delivery step, so you can measure the real delay.

## The round and its timestamps

Each `round` event on `/stream` carries the round in `data` and, in `timing`, when the API received the round
and when it sent it to you:

```text
event: round
id: f1795468246633
data: {"data":{"id":"f1795468246633","game":"football-studio","startedAt":"2026-11-23T21:10:44.426Z",
data:   "settledAt":"2026-11-23T21:10:46.633Z","outcome":"home",
data:   "data":{"home":{"card":"TD","value":10},"away":{"card":"8S","value":8},"difference":2}},
data:  "timing":{"receivedAt":"2026-11-23T21:10:46.790Z","sentAt":"2026-11-23T21:10:46.797Z"}}
```

(The `rank`, `suit` and `color` fields of each card were cut here to fit the line; in the event they come in
full, just like in `/latest`.)

Three timestamps tell the story of the round: `startedAt` is when the Home card came out, `settledAt` is when the
round closed, and `receivedAt` is when it reached the API. The gap between the last two is the time from the table to
the API; `sentAt` shows when it left for you.

## Receiving it in JavaScript

The browser's `EventSource` does not send headers, and the key goes in `x-api-key`. So the simplest way, on Node 18
or newer, is to read `/stream` with `fetch` and split the events by hand:

```js
const URL = "https://api.lynxmetrics.com/v1/football-studio/stream";
const response = await fetch(URL, { headers: { "x-api-key": "YOUR_KEY" } });
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();

let buffer = "";
for (;;) {
  const { value, done } = await reader.read();
  if (done) break;
  buffer += value;
  let end;
  while ((end = buffer.indexOf("\n\n")) >= 0) {
    const block = buffer.slice(0, end);
    buffer = buffer.slice(end + 2);
    const lines = block.split("\n");
    const event = lines.find((l) => l.startsWith("event:"))?.slice(6).trim();
    const payload = lines.filter((l) => l.startsWith("data:")).map((l) => l.slice(5)).join("");
    if (event !== "round" || !payload) continue;

    const { data: round } = JSON.parse(payload);
    const delay = (Date.now() - Date.parse(round.settledAt)) / 1000;
    console.log(round.data.home.card, "x", round.data.away.card, round.outcome, delay.toFixed(2) + "s");
  }
}
```

A delay measured this way includes your computer's clock: if it runs fast or slow, the number comes out skewed. A
server with a synchronized clock (NTP) gives the right measure.

## When the connection drops

Every long connection drops someday: your network, your server, an update. Keep the `id` of the last round you
received and, when reconnecting, ask for `/results?after=<that id>` before going back to `/stream`: the API returns
only the rounds you missed, in order. That way your record never has a gap or a repeated round. The step by step is in
[Football Studio history](https://lynxmetrics.com/blog/football-studio/football-studio-history).

## Without an open connection

If your environment can't hold a connection (some function hosts cut it after seconds), use `/latest?wait=20`: it
waits up to 20 seconds for the next round and answers the instant it comes out. With a round every 22 seconds, almost
every request comes back with a new round. Where to keep that program running is in
[where to host a bot](https://lynxmetrics.com/blog/where-to-host-a-bot).

## Ideas for live results

- A bot that posts every round to your group, with both cards and the score of the day.
- A dashboard with the current streak of Home, Away and draw, fed by
  [/stats](https://lynxmetrics.com/blog/football-studio/football-studio-statistics).
- A file with the whole day, kept in sync through `/results`, to study at your own pace.

> Live results show what just happened. Every round is independent, and no earlier result predicts the next one.

## Frequently asked questions

### Where can I see Football Studio live results for free?

On the public LynxMetrics Football Studio results page, with the latest rounds, no sign-up and refreshing on its own.

### How do I get Football Studio results in real time in a program?

Through /stream on the Football Studio API: an open connection that receives every round the moment it is stored, with both cards, the winner and the delivery timestamps.

### What should I do if the /stream connection drops?

Keep the id of the last round received and, when reconnecting, request /results with after set to that id. The API returns only the missed rounds, in order.
