Skip to content
datasportsAPI

AI match analysis · football

Every minute, a number. Every moment, a sentence.

Two football endpoints built on our own match data: a win-probability model that moves with the game, and AI commentary that writes up the moments that matter. Scrub through the sample match below to see what the pair returns together.

Pro + BusinessModel in trainingFootball fixtures only
Most frequent recompute while in play
15 s
Points on the curve, plus one per key event
1 / min
Typical wait for a commentary entry
< 1 min

Sample replay

Ninety-five minutes on one slider.

A fictional match with generated numbers, so you can see how the curve and the commentary move together. It shows the shape of the data, not the accuracy of the model.

In development

The production model is still being trained and tested on past seasons. The replay runs on a small stand-in, not on API output. New model versions will be announced in the changelog before they ship.

Sample replay

HBS2–1KMAFT

Harbourside FC v Kingsmoor Athletic · fictional fixture

Harbourside win
100%
Draw
0%
Kingsmoor win
0%
0%50%100%0'15'30'HT60'75'90'FT
90+5'

Press play, drag the slider, or tap the chart or a marker to jump to a minute.

AI commentary

13 / 13 written
  1. FTFull timewritten 26 seconds after the moment

    Full time: Harbourside 2-1 Kingsmoor. Lindqvist and Mensah score either side of Okafor's equaliser, and Hale's saved penalty does not cost them. The curve ends at 1 / 0 / 0.

  2. 88'Big chancewritten 44 seconds after the moment

    Varga is through one on one but shoots straight at the keeper. Kingsmoor's best chance to level, gone.

  3. 81'Goalwritten 31 seconds after the moment

    Mensah drives in from the edge of the area. 2-1 Harbourside with nine minutes left, and the curve swings hard: 87% for the home side, up from 20%.

  4. 72'Momentumwritten 55 seconds after the moment

    Kingsmoor have had most of the ball for ten minutes and are pinning Harbourside back. Win chances: 25% home, 20% away.

  5. 67'Missed penaltywritten 39 seconds after the moment

    Hale's penalty is saved low to the keeper's left. Harbourside stay level, and with time running down the draw climbs to 50%.

  6. 58'Goalwritten 33 seconds after the moment

    Okafor makes up for that early miss, glancing in Varga's free kick. 1-1, and the draw is now the likeliest single result at 44%, with Harbourside down to 34%.

  7. 52'VARwritten 47 seconds after the moment

    VAR looks at a Kingsmoor penalty claim after Brennan goes down in the box. The on-field call stands: no penalty.

  8. 46'Second halfwritten 19 seconds after the moment

    The second half is under way. Kingsmoor need a goal and start higher up the pitch; they are given 6% to win it from here.

  9. 45'Half-timewritten 28 seconds after the moment

    Half-time: Harbourside 1-0 Kingsmoor. Lindqvist's finish is the difference; Kingsmoor had the better early chance and little after it. Our model has it 77% home, 18% draw, 6% away.

  10. 34'Momentumwritten 50 seconds after the moment

    Ten minutes of Harbourside pressure, with Kingsmoor barely out of their own half. The curve leans a little further their way: 77%.

  11. 23'Goalwritten 35 seconds after the moment

    Lindqvist sweeps a low cross from the left into the far corner and Harbourside lead 1-0. Their win chance jumps to 75%, from 43% a minute earlier.

  12. 11'Big chancewritten 41 seconds after the moment

    Okafor meets a corner unmarked six yards out and heads over. Kingsmoor's clearest opening so far, and a warning about their set pieces.

  13. 0'Kick-offwritten 22 seconds after the moment

    Harbourside get the game going. Before a ball is kicked our model makes them the likelier winners at 47%, with Kingsmoor on 27% and the draw on 26%.

The curve as a table
Sample win probability for Harbourside FC v Kingsmoor Athletic every 15 minutes and after each goal
MinuteScoreHarbourside winDrawKingsmoor win
0'0–047%26%27%
15'0–043%29%28%
23'1–0goal75%17%8%
30'1–076%17%7%
45'1–077%18%6%
58'1–1goal34%44%22%
60'1–133%46%22%
75'1–123%58%19%
81'2–1goal87%12%1%
90'2–193%7%0%
FT2–1100%0%0%

01The model

A forecast that only reads the match.

The win-probability model is ours from end to end. It starts from what the two teams have actually done, then follows the score and the clock as the game unfolds. Bookmaker prices play no part, so it never just echoes the market.

Left out on purpose

  • Bookmaker odds
  • Betting-exchange prices
  • Tips or opinions from anyone

It is an analysis indicator that describes how a match is going. It is not betting advice.

  1. Phase 1 · before 0'

    The pre-match estimate

    • Expected goals for each side, built from both teams' recent results in every competition and weighed by the strength of each opponent.
    • Domestic league tables, pulled towards the league average while the sample is still small.
    • League-strength coefficients, so a cup tie between clubs from different leagues is measured on one scale.
    • The last few results and home advantage, which drops out at a neutral-venue final.

    Locked

    Fixed at kick-off. The first point on the curve is this estimate, and it never moves afterwards.

  2. Phase 2 · 0' to the final whistle

    The in-play update

    • The goals each side can still expect in the time that is left, added time included, with scoring a little likelier late on.
    • Red cards: a side down to ten men has its chances cut and its opponent's raised.
    • Sustained attacking pressure, which tilts the next stretch of the match towards the side applying it.
    • The score and the clock, read from our own live feed.

    Cadence

    Recomputed at most every 15 seconds while the ball is in play.

When a point is added to the curve

Sample data

Every point carries at, the instant of the match it describes. Points are frozen when they turn two minutes old and are never edited afterwards, so a finished curve records what the model believed in the moment, not a cleaned-up version written with hindsight.

Home + draw + away always sum to 1. A draw means the scores are level at the end, including extra time but not a shoot-out.

0'15'30'HT60'75'90'
Kick-off
Equal to the pre-match estimateIn the sample: 0'
Every minute
The end of each minute, added time tooIn the sample: 1' to 90+4'
Goal
Right after the ball goes inIn the sample: 23' · 58' · 81'
Red card
None in this sample
Period start and end
Each whistle that opens or closes a halfIn the sample: 45' · 46'
Big chance
A clear opening that was missedIn the sample: 11' · 88'
Final whistle
Settles at 1 / 0 / 0In the sample: FT

02AI commentary

A few lines for every moment that matters.

DataSportsAPI AI turns our own match data into short written entries as the game goes on. Goals, cards and turning points get a sentence or two; the breaks get a summary.

  1. Our data, nothing else

    The writer sees the events, score, clock, shot map, statistics and win-probability curve of the match. That is the whole brief.

  2. Usually within a minute

    An entry follows its moment by seconds rather than minutes. Things that happen within a few seconds of each other share one entry.

  3. Written once, shared by all

    Every client reads the same text, and an entry's seq never changes, so you can store entries and append new ones safely.

  4. Written for followed matches

    The writer stays on a match while someone calls the endpoint or holds the fixture's WebSocket channel. If nobody followed a match, it has no commentary.

  5. No betting language

    No tips, prices or odds talk. Entries are plain English text: one or two sentences, up to three for a summary.

What gets an entry

  • Goalgoal

    Who scored, how it was made, and what it did to the win chances.

  • Red cardredCard

    The sending-off and what a man down means for the rest of the match.

  • Missed penaltymissedPenalty

    Saved, wide or off the woodwork, and the score it left in place.

  • VAR decisionvarDecision

    What the officials reviewed and which way the call went.

  • Big chancebigChance

    A clear opening that stayed out, and who it fell to.

  • Momentummomentum

    A spell of sustained pressure, not one lively attack.

  • Period whistlesperiodStart · periodEnd

    The start and end of each half and of any extra time.

  • SummarieshalfTime · fullTime

    The story so far at the break and at the end, in up to three sentences.

A kick-off entry opens every match. The full list of kind values is on the commentary endpoint page.

03In the API

Two endpoints, one fixture id.

The curve and the commentary are separate calls on the same football fixture. Both answer with the usual data and meta envelope, so they slot in next to the lineups and statistics you already fetch.

The answers below were generated for the sample match and trimmed with comments. Real answers carry every point and every entry.

GET/v2/fixtures/{id}/win-probability

Win probability

The estimate from before kick-off, the live home/draw/away chances, and the whole curve, each point with its reason.

Pro + BusinessEndpoint reference

Response · HBS v KMA

Sample data
win-probability.json
{
  "data": {
    "fixtureId": 486204,
    "model": "v3",
    "updatedAt": "2026-11-08T16:50:04.000Z",
    "prematch": {"home": 0.4661, "draw": 0.2602, "away": 0.2737, "homeExpectedGoals": 1.48, "awayExpectedGoals": 1.07, "standings": true, "form": true, "allCompetitions": true, "domesticTables": true},
    "current": {"home": 1, "draw": 0, "away": 0, "minute": 90, "addedMinute": 5, "homeScore": 2, "awayScore": 1, "at": "2026-11-08T16:50:00.000Z"},
    "series": [
      {"home": 0.4661, "draw": 0.2602, "away": 0.2737, "minute": 0, "addedMinute": null, "homeScore": 0, "awayScore": 0, "at": "2026-11-08T15:00:00.000Z", "reason": "kickoff"},
      {"home": 0.4613, "draw": 0.265, "away": 0.2737, "minute": 1, "addedMinute": null, "homeScore": 0, "awayScore": 0, "at": "2026-11-08T15:01:00.000Z", "reason": "minute"},
      // … one point a minute …
      {"home": 0.7459, "draw": 0.1733, "away": 0.0809, "minute": 23, "addedMinute": null, "homeScore": 1, "awayScore": 0, "at": "2026-11-08T15:23:00.000Z", "reason": "goal"},
      // … every goal, red card, period change and big chance …
      {"home": 1, "draw": 0, "away": 0, "minute": 90, "addedMinute": 5, "homeScore": 2, "awayScore": 1, "at": "2026-11-08T16:50:00.000Z", "reason": "final"}
    ],
    "inputs": { "shotmap": true, "momentum": true, "events": true }
  },
  "meta": { "count": 96 }
}
GET/v2/fixtures/{id}/commentary

AI commentary

Every entry written for the match so far, oldest first, each with its kind, minute, sequence number and the time it was written.

Pro + BusinessEndpoint reference

Response · HBS v KMA

Sample data
commentary.json
{
  "data": {
    "fixtureId": 486204,
    "entries": [
      // … oldest first …
      { "seq": 3, "kind": "goal", "minute": 23, "addedMinute": null, "model": "datasportsapi-ai", "createdAt": "2026-11-08T15:23:35.000Z",
        "text": "Lindqvist sweeps a low cross from the left into the far corner and Harbourside lead 1-0. Their win chance jumps to 75%, from 43% a minute earlier." },
      { "seq": 5, "kind": "halfTime", "minute": 45, "addedMinute": null, "model": "datasportsapi-ai", "createdAt": "2026-11-08T15:45:28.000Z",
        "text": "Half-time: Harbourside 1-0 Kingsmoor. Lindqvist's finish is the difference; Kingsmoor had the better early chance and little after it. Our model has it 77% home, 18% draw, 6% away." }
    ]
  },
  "meta": { "count": 13, "generatedBy": "datasportsapi-ai" }
}

Call both

The same two requests in each client. The SDKs are not published yet; cURL works today.

$ curl -H "Authorization: Bearer dsa_live_…" \
    "https://api.datasportsapi.com/v2/fixtures/486204/win-probability"

$ curl -H "Authorization: Bearer dsa_live_…" \
    "https://api.datasportsapi.com/v2/fixtures/486204/commentary"

Keeping it current

  1. Poll

    Pro + Business

    Ask for win probability with since set to your newest point’s at minus two minutes, then swap in what comes back: the latest two minutes can still gain a late point. For commentary, append any entry whose seq you have not seen.

  2. Push

    Business

    Hold the fixture’s fixture:{id} channel on the WebSocket stream. A winProbability frame arrives when any outcome moves by a percentage point or more, and a commentary frame with every new entry. Stream reference.

  3. When it says no

    Errors

    403 endpoint_not_in_plan for Free and Starter keys, 404 not_supported for any fixture that is not football.

poll.ts
// Ask only for what is new: your newest point's at, minus two minutes
const since = new Date(Date.parse(newestAt) - 120_000).toISOString();
const { data } = await client.fixtures.winProbability(fixtureId, { since });

// Keep what is older than since, take the rest from the answer
points = [...points.filter((p) => p.at <= since), ...data.series];

04Plans

On Pro, and live on Business.

Both endpoints come with the Pro and Business plans. Each call counts as one request, like any other endpoint.

Pro

$199 / month

Both endpoints over REST. Poll the curve with since and read new commentary as it is written.

Business

$999 / month

Everything in Pro, plus winProbability and commentary frames pushed down the WebSocket stream.

Compare every plan

Where the model stands

Still in training
The production model is being trained and tested on past seasons. The numbers on this page come from a small stand-in.
Football only
Other sports answer 404 not_supported on both endpoints.
Versioned
Every answer names its model. A fixture keeps the version its pre-match estimate was fixed with.

New model versions are announced in the changelog before they ship.

Put the curve in your match centre.

Start on the free plan with the rest of the API, then move to Pro when win probability and commentary are ready to ship.