Toss effect
On each planFree keyNot includedMatch WeekNot includedArchiveNot includedProNot includedAnalyst ProIn full
How often the toss winner bats, and how often they win after batting or fielding.
GET
https://api.cricketdatabase.com/v1/analytics/venues/{venue}/tossTry it
Kept in this browser and filled in on every docs page.
Parameters
| Name | Type | Required | Description | Values |
|---|---|---|---|---|
venue | string | yes | In the address: the venue's address name | sophia-gardens |
Returns
| Field | Type | What it holds |
|---|---|---|
data | object | |
data.venue | string | The ground's address name |
data.name | string | The name as shown |
data.by_format | object | |
data.by_format.odi | object | |
data.by_format.odi.matches | integer | |
data.by_format.odi.chose_bat_pct | number | |
data.by_format.odi.toss_winner_won_pct | number | |
data.by_format.odi.won_when_chose_bat_pct | number | |
data.by_format.odi.won_when_chose_field_pct | number | |
data.by_format.test | object | |
data.by_format.test.matches | integer | |
data.by_format.test.chose_bat_pct | number | |
data.by_format.test.toss_winner_won_pct | number | |
data.by_format.test.won_when_chose_bat_pct | number | |
data.by_format.test.won_when_chose_field_pct | string or null | |
data.by_format.t20i | object | |
data.by_format.t20i.matches | integer | |
data.by_format.t20i.chose_bat_pct | number | |
data.by_format.t20i.toss_winner_won_pct | number | |
data.by_format.t20i.won_when_chose_bat_pct | number | |
data.by_format.t20i.won_when_chose_field_pct | number | |
data.by_format.multi-day | object | |
data.by_format.multi-day.matches | integer | |
data.by_format.multi-day.chose_bat_pct | number | |
data.by_format.multi-day.toss_winner_won_pct | number | |
data.by_format.multi-day.won_when_chose_bat_pct | number | |
data.by_format.multi-day.won_when_chose_field_pct | number | |
data.by_format.t20 | object | |
data.by_format.t20.matches | integer | |
data.by_format.t20.chose_bat_pct | number | |
data.by_format.t20.toss_winner_won_pct | number | |
data.by_format.t20.won_when_chose_bat_pct | number | |
data.by_format.t20.won_when_chose_field_pct | number | |
data.by_format.one-day | object | |
data.by_format.one-day.matches | integer | |
data.by_format.one-day.chose_bat_pct | number | |
data.by_format.one-day.toss_winner_won_pct | number | |
data.by_format.one-day.won_when_chose_bat_pct | number | |
data.by_format.one-day.won_when_chose_field_pct | number | |
meta | object | |
meta.plan | string | The plan the key is on |
Example answer
A real answer for /v1/analytics/venues/sophia-gardens/toss, lists cut to their first two items.
{
"data": {
"venue": "sophia-gardens",
"name": "Sophia Gardens, Cardiff",
"by_format": {
"odi": {
"matches": 30,
"chose_bat_pct": 13.3,
"toss_winner_won_pct": 53.8,
"won_when_chose_bat_pct": 0,
"won_when_chose_field_pct": 63.6
},
"test": {
"matches": 3,
"chose_bat_pct": 100,
"toss_winner_won_pct": 50,
"won_when_chose_bat_pct": 50,
"won_when_chose_field_pct": null
},
"t20i": {
"matches": 13,
"chose_bat_pct": 30.8,
"toss_winner_won_pct": 38.5,
"won_when_chose_bat_pct": 0,
"won_when_chose_field_pct": 55.6
},
"multi-day": {
"matches": 74,
"chose_bat_pct": 31.1,
"toss_winner_won_pct": 65.9,
"won_when_chose_bat_pct": 53.8,
"won_when_chose_field_pct": 71.4
},
"t20": {
"matches": 132,
"chose_bat_pct": 29.5,
"toss_winner_won_pct": 57.6,
"won_when_chose_bat_pct": 61.5,
"won_when_chose_field_pct": 55.8
},
"one-day": {
"matches": 35,
"chose_bat_pct": 40,
"toss_winner_won_pct": 45.5,
"won_when_chose_bat_pct": 41.7,
"won_when_chose_field_pct": 47.6
}
}
},
"meta": {
"plan": "plus"
}
}
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | A value is not one this parameter takes, or the key was sent in the address |
| 401 | unauthorized | No key, or one that is unknown or revoked |
| 403 | upgrade_required | The plan does not reach it; the answer names the plan that does |
| 404 | not_found | Nothing at that address |
| 422 | unknown_parameter | A parameter this endpoint does not take |
| 429 | rate_limited | Too fast: wait for Retry-After |
| 429 | quota_exceeded | The day's calls are used: they reset at midnight UTC |