- What is advanced football statistics xG, xA, PPDA, xT and why is it needed
- How to calculate and interpret xG and xA in football in simple terms
- The PPDA metric in football: what it is, the formula, and how to use it in analysis
- The xT (expected threat) indicator in football: how it is calculated and what it shows
- Where to find advanced football statistics: popular services and football APIs
- How to obtain xG, xA, PPDA, xT through sports event APIs: examples of requests
- Using football API with xG and xA for match analytics, predictions, and betting
What is advanced football statistics xG, xA, PPDA, xT and why is it needed
Advanced football statistics emerged as a response to the limitations of classic metrics like shots, possession, and scoreboard. Metrics xG (expected goals), xA (expected assists), PPDA, and xT (expected threat) attempt to measure not only the quantity of actions but also their quality, context, and impact on the likelihood of scoring a goal. They are built on large datasets of historical data and machine learning models that assess how dangerous a specific attack is or how aggressively a team presses.
For clubs and analysts, such indicators allow for a deeper understanding of the actual level of play. A team may win 1:0 but lose on xG 0.5 against 2.0, which indicates defensive problems and a fortunate turn of events. This is especially important for betting and predictions: the results of individual matches are highly noisy, while advanced metrics better reflect the true strength of opponents over time. xT shows how teams advance the ball into dangerous areas, xA describes the quality of created chances, and PPDA provides a numerical assessment of pressing.
Developers, media owners, and betting services need convenient data sources to avoid collecting statistics manually. Here, sports event APIs come to the forefront. With the help of API for sports statistics for football and other sports you can automatically obtain detailed data about matches, teams, players, and bookmaker odds, and based on this, build your own xG, xA, PPDA, and xT models. This approach provides flexibility (you control the formulas and weights), scalability (data from thousands of tournaments), and the ability to quickly add new metrics as your products evolve.
How to calculate and interpret xG and xA in football in simple terms
xG (expected goals) is the probability that a specific shot will result in a goal. For each shot in past matches, dozens of features are considered: distance to the goal, angle, type of pass, body part, goalkeeper position, type of situation (penalty, set piece, open play). Based on this data, statistical models estimate how often similar shots turned into goals in the past. If a similar shot was scored in 10 out of 100 cases, its xG will be 0.10. Penalties usually have an xG of about 0.75–0.80, while shots from outside the penalty area have an xG of 0.02–0.05.
The sum of xG for all shots by a team in a match shows how many goals it debería haber should score based on the quality of chances, not the actual outcome. If a team created 2.4 xG and scored one goal, it indicates missed opportunities, while if it scored three goals with 0.5 xG, it indicates high luck or overachievement. Over several matches, xG smooths out the influence of randomness and helps to assess offense and defense more objectively.
xA (expected assists) is built on the same logic but relates to passes that lead to shots. Each potential goal assist receives an xA value equal to the xG of the shot that followed it. If a player regularly makes passes leading to shots with high xG, their xA will be high, even if their teammates convert chances poorly and actual assists (A) are few. For analytics and scouting, this is a powerful tool: it separates chance creation from finishing. With detailed shot and pass statistics obtained through a football API, a developer can implement both a simple xG model (for example, by zones and types of shots) and complex ML models that consider dozens of features.
The PPDA metric in football: what it is, the formula, and how to use it in analysis
PPDA (Passes Allowed Per Defensive Action) is one of the basic metrics describing a team’s pressing intensity. It shows how many passes the opponent is allowed to make before the team makes one defensive action (tackle, interception, foul in an attempt to tackle, etc.) in a given area of the field. In the classic version, it counts the opponent’s passes in their half of the field or in the first 60% of the field length, where attacks are built.
The simplified formula for PPDA looks like this: PPDA = (opponent’s passes in the attacking build-up zone) / (your team’s defensive actions in the same zone). The lower the PPDA, the more aggressively and higher the team presses. Values below 7–8 are usually characteristic of teams with intense high pressing, while a PPDA of 12–15 and above indicates a more passive or low defensive model. It is important to calculate the metric over a distance (across the tournament, segments of the season), rather than for a single match, to avoid noise.
To calculate PPDA through a football API, at least two types of data are needed: the number of opponent passes and the number of defensive actions (tackles, interceptions, fouls) by halves or periods of the match, and for an advanced version, also the coordinates or zones where these actions occur. Detailed groupings in the field are available in the responses from the Sport Events API estadísticasDelPartido, including passes, tackles, interceptions, fouls, and duels. Based on this, you can implement a basic version of PPDA by halves, and by adding events with coordinates, move on to more accurate calculations by field zones and compare the pressing styles of different teams in your analytical dashboards.
The xT (expected threat) indicator in football: how it is calculated and what it shows
xT (expected threat, ожидаемая угроза) is a metric that evaluates not only shots on goal but also all actions that increase the likelihood that the team will create a dangerous moment or score a goal in the near future. The field is divided into a grid of zones, and for each zone, historical data is used to calculate how often ball possession in that zone led to a shot or goal during the subsequent attacking moves. This is the «value» of the xT zone.
When a player performs an action (pass, dribble, ball clearance) and moves the ball from one zone to another, the change in threat can be calculated: xT(new zone) − xT(old zone). If the difference is positive, the action increased the likelihood of scoring a goal in the near future; if negative, it decreased it. The sum of such increments across all actions of a player or team gives their overall contribution to creating a threat to the opponent’s goal, even if no shots or goals occurred in the episode.
Unlike xG, which evaluates only the moment of the shot, xT describes the entire process of preparing attacks and advancing the ball. To calculate it through a football API, detailed events with coordinates are required: passes, dribbling, ball receptions, clearances, flank changes, etc. Based on such data, a zone value matrix is built, and threat increments are recalculated. Within the infrastructure of sports event APIs, it is convenient to first obtain «raw» events and statistics, and then implement your own xT model optimized for your style of analysis, visualization, or product (applications for analysts, media, betting, or coaching education).
Where to find advanced football statistics: popular services and football APIs
There are several sources of advanced football data on the market. Major global providers supply clubs and leagues with detailed event feeds with coordinates for each action and already calculated metrics like xG or PPDA. This provides high accuracy but is usually accompanied by complex contracts and high costs. For media, betting startups, and small analytical teams, this option is often excessive.
An alternative approach is to use football APIs that provide structured data about matches, teams, lineups, detailed statistics, and bookmaker odds. Such a service allows you to obtain data on thousands of tournaments through a single interface and implement your own models for xG, xA, PPDA, and xT, independent of others’ formulas. This approach is implemented in sports event APIs for football, basketball, tennis, and other sports, where extended match statistics (shots, passes, duels, tackles, possession, free kicks, corners), live events, and basic betting markets are available.
An additional advantage of such an API is the flexibility of scaling. You can start with simple metrics (xG by shot zones, basic PPDA by halves), and as the product grows, add your own ML models, combine football statistics with bookmaker APIs, and build complex dashboards. In the ecosystem of api-sport.ru, new opportunities are constantly emerging: sports types are expanding, work with odds is developing, support for WebSocket subscriptions for live data is planned, and integration of AI models is particularly important for projects that build forecasts and automated reports on matches.
How to obtain xG, xA, PPDA, xT through sports event APIs: examples of requests
The metrics xG, xA, PPDA, and xT themselves are derivatives and are usually not provided as «ready-made» in universal APIs. Instead, the developer receives the most detailed statistics and match events, based on which they build their models. In the Sport Events API, the key endpoints for this are /v2/fútbol/partidos и /v2/fútbol/partidos/{matchId}, where, in addition to the score and lineups, the field is available. estadísticasDelPartido with grouping («Shots», «Attack», «Passes», «Defending», «Duels», etc.), as well as live events eventosEnVivo. This provides a basis for calculating xG (based on the number and types of shots), xA (based on key passes), PPDA (based on passes and defensive actions), and more complex metrics.
Connecting to the API is standard: you register and receive a key in the developer’s personal account, after which you add the authorization header to HTTP requests. An example of a simple request for football matches on a specific date followed by extracting the statistics block might look like this:
fetch('https://api.api-sport.ru/v2/football/matches?date=2025-09-03', {
headers: {
'Authorization': 'ВАШ_API_КЛЮЧ'
}
})
.then(res => res.json())
.then(data => {
const match = data.matches[0];
const statsAll = match.matchStatistics.find(s => s.period === 'ALL');
const shotsGroup = statsAll.groups.find(g => g.groupName === 'Shots');
// Пример: достаем количество ударов из штрафной и из-за штрафной
const shotsInside = shotsGroup.statisticsItems.find(i => i.key === 'totalShotsInsideBox').homeValue;
const shotsOutside = shotsGroup.statisticsItems.find(i => i.key === 'totalShotsOutsideBox').homeValue;
// Далее по вашим коэффициентам можно посчитать простую модель xG
});
Similarly, through the endpoint /v2/fútbol/partidos/{matchId} you get complete statistics for a specific match, including events and bookmaker odds. Based on this, you can implement your own xG and xA calculation functions (by zones, types of shots and passes), assess PPDA based on the ratio of the opponent’s passes to your defensive actions, and when there are coordinate events — build xT maps. In the future, the api-sport.ru ecosystem plans to introduce WebSocket streams for live statistics updates and ready-made AI models, which will simplify online calculations of advanced metrics in your applications.
Using football API with xG and xA for match analytics, predictions, and betting
When you have a stable data channel through the football API and have implemented your own xG, xA, PPDA, and xT calculations, a wide range of practical scenarios opens up. For club and media analytics, you can build interactive dashboards: show the dynamics of xG during the match, compare the quality of teams’ chances over the season, highlight players with high xA and xT, visualize the zones through which the team creates the greatest threat. Such panels help coaches and analysts make decisions, while media can create deeper and more visual content.
In betting, advanced metrics allow you to look for discrepancies between actual play and market expectations. For example, a team that creates 1.8–2.0 xG per match for several rounds in a row but scores little is likely to start converting chances better than the odds suggest. Using the field oddsBase from the response /v2/fútbol/partidos, you can automate the comparison of your probabilities (based on the xG/xT model) with the bookmaker’s line and select value bets. An example of a basic request in Python:
import requests
resp = requests.get(
'https://api.api-sport.ru/v2/football/matches',
params={'ids': '14570728'},
headers={'Authorization': 'ВАШ_API_КЛЮЧ'}
)
match = resp.json()['matches'][0]
odds_markets = match.get('oddsBase', [])
# Далее вы объединяете odds_markets с вашими метриками xG/xT и находите недооцененные исходы
Another important scenario is live analysis.




