ANALYTICS MODULE

xG y mapas de tiros through one API

Team expected goals totals, shotmaps with coordinates and results for every shot, and momentum for detailed match analysis.

Documentation

What xG means and what the API returns

xG (expected goals) is the probability that a shot becomes a goal, based on position, body part, situation and goalkeeper position. Values range from 0 to 1: penalties have high xG; shots from tight angles have low xG.

Coordinates for every shot
Coordinates x, y, side, minute and result — shot_type: goal, save, miss, block, post
Team xG totals for the match
Home and away xG totals are included in match statistics. Compare them with the actual score to assess finishing efficiency
Momentum throughout the match
Minute-by-minute pressure — the momentum field in the event response shows when each team was creating pressure
Shot trajectory and goalmouth position
Each shot includes trajectory — its flight path, and goal_mouth_xy — its goalmouth position. Enough to visualise the full shot rather than just a dot
Russian Premier League, Round 2, 2 August 2026 match finished
KRA Krasnodar
3:2
Fakel Voronezh FAK
Shotmap, 24 shots
xG 0.8 xG 2.6
Krasnodar: 11 shots, 5 on target Fakel Voronezh: 13 shots, 3 on target dot colour = shot result

Calculated by the Scoraline xG model for match #11220580, Russian Premier League, 2 August 2026. Each shot receives an xg and xgot value based on coordinates, goalmouth angle, body part and situation.

When to use xG

Three product types where xG helps users understand matches.

Sports media

Context for your stories

Automatically display in the match card:
«xG 0.8:2.6 — Fakel Voronezh created more chances but lost 2:3» — match #11220580 from the Scoraline database.

Match centre Reports Previews
Analytics services

Historical models

Historical xG helps assess team quality beyond the final score. A foundation for rating models and recommendation systems.

Data science ML models
Betting / Affiliate

An indicator of team quality

xG reduces the effect of luck: in match #11220580 Fakel Voronezh created 2.6 xG versus 0.8 for Krasnodar, but lost 2:3 despite creating better chances. Use it to assess underpriced and overpriced outcomes over a longer period.

Value research Content
// ENDPOINT

Endpoint reference

Shotmaps have a dedicated endpoint. Team xG totals are included in match statistics in the full event response. Pass the key in a header; query-string keys are not accepted.

GET /v1/event/{id}/shotmap
Every match shot with coordinates, plus a totals summary for each side
GET /v1/event/{id}
Full event: statistics (including match and half-by-half xG), shotmap, momentum — a pressure curve, not xG
How to pass the key
x-api-keyrequired request header. Without it the response is 401

Neither endpoint requires additional parameters. The complete shotmap for both sides is returned, sorted by minute.

api.scoraline.com, real response, match 11220580
$ curl -H "x-api-key: …" \
    api.scoraline.com/v1/event/11220580/shotmap
{
  "event_id": 11220580, "available": true,
  "count": 24,
  "totals": {
    "home": { "shots": 11, "goals": 3, "xg": 0.80 },
    "away": { "shots": 13, "goals": 2, "xg": 2.60 }
  },
  "shots": [
    {
      "is_home": true, "player_name": "Jubal", "time": 4,
      "shot_type": "goal", "situation": "set-piece",
      "body_part": "head", "goal_mouth_location": "high-right",
      "xg": 0.10, "xgot": 0.15,
      "x": 9.9, "y": 54.9,
      "goal_mouth_y": 47.2, "goal_mouth_z": 24.7
    }
    // … another 23 shots
  ]
}
Production API response for match #11220580: Scoraline's model calculates xg and xgot for every shot and aggregates team totals.xg.

Add xG to your product

Free trial access. Open documentation and Soporte técnico directo.

Documentation
Coordinates, trajectory, goalmouth Totals for each side Minute-by-minute momentum