winprob
A query to this endpoint without a date parameter will return recent ELO win probability forecasts for all games within the competition level. Passing a date parameter will return forecasts for that date if data is available. Passing a team parameter (in conjunction with season) will return forecasts for that team over the course of the season.
Please note that this endpoint can be used synonymously as winprobs.
GL Win Probabilities 2022
https://api.natstat.com/v2/winprob/GL/?key=XXXX-XXXXXX&format=xml&season=2022
Download sample
Parameters
Path
| Name | Required | Type | Description |
|---|---|---|---|
level |
required | string | The competition level to retrieve information for. A full glossary can be found in the Path Parameters section |
Query
| Name | Required | Type | Description |
|---|---|---|---|
key |
required | string | A valid key in XXXX-XXXXXX format |
format |
optional | string | The preferred data format: xml, json or php (presented as a SimpleXML object). The default is json |
max |
optional | number | The number of results per page to return. The default value is 100, and the maximum allowed parameter value is 1000. This value is echoed back as Max_Results in the meta block |
page |
optional | number | The pagination page number. This value is echoed back as Page in the meta block. The meta block also contains the Total_Results of the query. If there are further results, a fully-formed Next_Page URI containing a pre-filled &page=X value will be returned |
id |
optional | number | A valid game ID code, which returns details for that game (A list of available games can be retrieved from this endpoint by not passing an ID code.) |
sublevel |
optional | number | A valid sublevel (leagues, conferences) ID code. A list of sublevels can be retrieved from the glossary endpoint |
team |
optional | number | A valid team ID code. A list of teams can be retrieved from the teams endpoint |
limit |
optional | string | The two valid values for this filter are =inprogress and =today |
date |
optional | string | The date to limit matched results to. The API will attempt to translate the date, but YYYYMMDD or YYYY-MM-DD are preferred |
start |
optional | string | The start date from which to include matched results (inclusive). The API will attempt to translate the date, but YYYYMMDD or YYYY-MM-DD are preferred |
end |
optional | string | The end date to which to include matched results (inclusive). The API will attempt to translate the date, but YYYYMMDD or YYYY-MM-DD are preferred |
last |
optional | number | Number of days previous to today's date, to specify a date range from which to match results |
Response
| Name | Required | Type | Description |
|---|---|---|---|
ID |
number | The unique identifier for the record | |
Visitor |
string | The teams name of the visiting team | |
Visitor_ID |
number | The teams ID of the visting team | |
Home |
string | The teams name of the home team | |
Home_ID |
number | The teams ID of the home team | |
GameDay |
date | The date of this game, in YYYY-MM-DD format | |
GameNo |
number | Returns 2 if the second game of a doubleheader, otherwise 1 | |
ScoreVis |
number | The visiting team's score in the relevant game | |
ScoreHome |
number | The home team's score in the relevant game | |
GameStatus |
string | The period and time of the game, or Final. Returns empty value if game has not started | |
Overtime |
string | The number of extra innings or overtimes, when available | |
Winner_ID |
number | The teams ID of the winning team | |
Loser_ID |
string | The teams ID of the losing team | |
VenueName |
string | Name of arena or stadium | |
URL |
string | NatStat URL for this game | |
VELOBefore |
string | Visitor ELO rating before game | |
HELOBefore |
string | Home ELO rating before game | |
VELOAfter |
string | Visitor ELO rating after game | |
HELOAfter |
string | Home ELO rating after game | |
ELOK |
string | ELO K factor | |
ELOAdjust |
string | ELO standard algorithm adjustment | |
ELOPoints |
string | ELO points transfer | |
VELOChange |
string | Change in Visitor ELO rating after game | |
HELOChange |
string | Change in Home ELO rating after game | |
VELOWinExp |
string | Visitor win probability | |
HELOWinExp |
string | Home win probability | |
ELOCorrect |
string | ELO probability correct [Y/N] | |
season |
object | Object containing Season, Correct, Wrong, Percentage |