> For the complete documentation index, see [llms.txt](https://info.soccerfootball.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://info.soccerfootball.info/xg-expected-goals.md).

# xG (Expected Goals)

The xG statistic, or Expected Goals, is a measure used in soccer to evaluate the quality of goal-scoring opportunities created during a match. This index is based on a series of factors, such as the position of the shot, the angle of the shot, the pressure of the defender, and others, to calculate the probability that a shot will turn into a goal. In this way, the xG index provides a more accurate measure of a team's offensive performance compared to simply counting the goals scored.

We are pleased to announce that, starting with version 1.50 of our APIs, the xG statistic is now available for all matches starting from 2024-03-15.&#x20;

This means that developers can now access this valuable information through our endpoints and use it to enrich their applications and analyses.

In contrast to many other services, we offer the **xG data at the moment of kickoff and update it live during the match**. This means that you can access the most up-to-date information in real-time, giving you an edge in your analysis and decision-making. Additionally, it is possible to perform backtests of past matches using the matchprogressive call, allowing you to analyze historical data and gain even deeper insights.

Thank you for choosing our APIs for your soccer data. We are committed to providing you with the most accurate and timely information, and we will continue to work to improve our service and offer you even more valuable features.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://info.soccerfootball.info/xg-expected-goals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
