Chapter 4 Adding useful information.
Just like we did in our previous blog, where we made of Kotlin, you can enrich your request with includes and filters. ‘Include’ is a powerful tool built into our Football API to improve the ease of retrieving additional information.
Among them are scores, participants, statistics.type, events, and line-ups. We shall add the scores for El Clásico in the next section using an include.
Chapter 4.1 Adding Results
We will have to modify our previous piece of code to include scores in our results. Here is our URL of interest.
https://api.sportmonks.com/v3/football/fixtures/19135354?api_token=API_Token&include=scores
using HTTP
using JSON3
# Define the API endpoint and token
api_token = "API Token" # Your valid API token
url = "https://api.sportmonks.com/v3/football/fixtures/19135354"
# Construct the query string with the API token and 'include=scores'
query_params = Dict("api_token" => api_token, "include" => "scores")
query_string = "?" * join(["$k=$v" for (k, v) in query_params], "&")
full_url = url * query_string
# Try-catch block for error handling
try
response = HTTP.get(full_url)
# Check the response status
if response.status == 200
# Parse JSON response
data = JSON3.read(String(response.body))
println("Data: ", data)
else
println("Request failed with status: ", response.status, " - ", String(response.body))
end
catch e
# Handle any errors
println("An error occurred: ", e)
end
Data: {
"data": {
"id": 19135354,
"sport_id": 1,
"league_id": 564,
"season_id": 23621,
"stage_id": 77471332,
"group_id": nothing,
"aggregate_id": nothing,
"round_id": 339304,
"state_id": 5,
"venue_id": 2020,
"name": "Real Madrid vs FC Barcelona",
"starting_at": "2024-10-26 19:00:00",
"result_info": "FC Barcelona won after full-time.",
"leg": "1/1",
"details": nothing,
"length": 90,
"placeholder": false,
"has_odds": true,
"has_premium_odds": true,
"starting_at_timestamp": 1729969200,
"scores": [
{
"id": 15105729,
"fixture_id": 19135354,
"type_id": 1,
"participant_id": 83,
"score": {
"goals": 0,
"participant": "away"
},
"description": "1ST_HALF"
},
{
"id": 15105728,
"fixture_id": 19135354,
"type_id": 1,
"participant_id": 3468,
"score": {
"goals": 0,
"participant": "home"
},
"description": "1ST_HALF"
},
{
"id": 15105732,
"fixture_id": 19135354,
"type_id": 1525,
"participant_id": 83,
"score": {
"goals": 4,
"participant": "away"
},
"description": "CURRENT"
},
{
"id": 15105838,
"fixture_id": 19135354,
"type_id": 2,
"participant_id": 3468,
"score": {
"goals": 0,
"participant": "home"
},
"description": "2ND_HALF"
},
{
"id": 15105839,
"fixture_id": 19135354,
"type_id": 2,
"participant_id": 83,
"score": {
"goals": 4,
"participant": "away"
},
"description": "2ND_HALF"
},
{
"id": 15105733,
"fixture_id": 19135354,
"type_id": 1525,
"participant_id": 3468,
"score": {
"goals": 0,
"participant": "home"
},
"description": "CURRENT"
}
]
},
"subscription": [
{
"meta": {
"trial_ends_at": "2024-10-16 14:50:45",
"ends_at": nothing,
"current_timestamp": 1734346151
},
"plans": [
{
"plan": "Enterprise plan (loyal)",
"sport": "Football",
"category": "Advanced"
},
{
"plan": "Enterprise Plan",
"sport": "Cricket",
"category": "Standard"
},
{
"plan": "Formula One",
"sport": "Formula One",
"category": "Standard"
}
],
"add_ons": [
{
"add_on": "All-in News API",
"sport": "Football",
"category": "News"
},
{
"add_on": "pressure index add-on",
"sport": "Football",
"category": "Default"
},
{
"add_on": "Enterprise Plan Predictions",
"sport": "Football",
"category": "Predictions"
},
{
"add_on": "xG Advanced",
"sport": "Football",
"category": "Expected"
}
],
"widgets": [
{
"widget": "Sportmonks Widgets",
"sport": "Football"
}
]
}
],
"rate_limit": {
"resets_in_seconds": 3600,
"remaining": 2999,
"requested_entity": "Fixture"
},
"timezone": "UTC"
}
Chapter 4.2 Add Other Statistics
Adding other statistics requires we use the type statistics.type in our url to replace scores.
using HTTP
using JSON3
# Define the API endpoint and token
api_token = "API Token" # Replace with your valid API token
url = "https://api.sportmonks.com/v3/football/fixtures/19135354"
# Construct the query string with the API token and 'include=scores'
query_params = Dict("api_token" => api_token, "include" => "statistics.type")
query_string = "?" * join(["$k=$v" for (k, v) in query_params], "&")
full_url = url * query_string
# Try-catch block for error handling
try
response = HTTP.get(full_url)
# Check the response status
if response.status == 200
# Parse JSON response
data = JSON3.read(String(response.body))
println("Data: ", data)
else
println("Request failed with status: ", response.status, " - ", String(response.body))
end
catch e
# Handle any errors
println("An error occurred: ", e)
end
{
"data": {
"id": 19135354,
"sport_id": 1,
"league_id": 564,
"season_id": 23621,
"stage_id": 77471332,
"group_id": null,
"aggregate_id": null,
"round_id": 339304,
"state_id": 5,
"venue_id": 2020,
"name": "Real Madrid vs FC Barcelona",
"starting_at": "2024-10-26 19:00:00",
"result_info": "FC Barcelona won after full-time.",
"leg": "1/1",
"details": null,
"length": 90,
"placeholder": false,
"has_odds": true,
"has_premium_odds": true,
"starting_at_timestamp": 1729969200,
"statistics": [
{
"id": 123987025,
"fixture_id": 19135354,
"type_id": 54,
"participant_id": 83,
"data": {
"value": 15
},
"location": "away",
"type": {
"id": 54,
"name": "Goal Attempts",
"code": "goal-attempts",
"developer_name": "GOAL_ATTEMPTS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123986987,
"fixture_id": 19135354,
"type_id": 46,
"participant_id": 3468,
"data": {
"value": 67
},
"location": "home",
"type": {
"id": 46,
"name": "Ball Safe",
"code": "ball-safe",
"developer_name": "BALL_SAFE",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123987022,
"fixture_id": 19135354,
"type_id": 87,
"participant_id": 83,
"data": {
"value": 2
},
"location": "away",
"type": {
"id": 87,
"name": "Injuries",
"code": "injuries",
"developer_name": "INJURIES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123986957,
"fixture_id": 19135354,
"type_id": 87,
"participant_id": 3468,
"data": {
"value": 0
},
"location": "home",
"type": {
"id": 87,
"name": "Injuries",
"code": "injuries",
"developer_name": "INJURIES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123987019,
"fixture_id": 19135354,
"type_id": 46,
"participant_id": 83,
"data": {
"value": 72
},
"location": "away",
"type": {
"id": 46,
"name": "Ball Safe",
"code": "ball-safe",
"developer_name": "BALL_SAFE",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123987017,
"fixture_id": 19135354,
"type_id": 54,
"participant_id": 3468,
"data": {
"value": 11
},
"location": "home",
"type": {
"id": 54,
"name": "Goal Attempts",
"code": "goal-attempts",
"developer_name": "GOAL_ATTEMPTS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775366,
"fixture_id": 19135354,
"type_id": 52,
"participant_id": 83,
"data": {
"value": 4
},
"location": "away",
"type": {
"id": 52,
"name": "Goals",
"code": "goals",
"developer_name": "GOALS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775343,
"fixture_id": 19135354,
"type_id": 43,
"participant_id": 3468,
"data": {
"value": 64
},
"location": "home",
"type": {
"id": 43,
"name": "Attacks",
"code": "attacks",
"developer_name": "ATTACKS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775779,
"fixture_id": 19135354,
"type_id": 45,
"participant_id": 3468,
"data": {
"value": 42
},
"location": "home",
"type": {
"id": 45,
"name": "Ball Possession %",
"code": "ball-possession",
"developer_name": "BALL_POSSESSION",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123776899,
"fixture_id": 19135354,
"type_id": 98,
"participant_id": 83,
"data": {
"value": 12
},
"location": "away",
"type": {
"id": 98,
"name": "Total Crosses",
"code": "total-crosses",
"developer_name": "TOTAL_CROSSES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775344,
"fixture_id": 19135354,
"type_id": 82,
"participant_id": 3468,
"data": {
"value": 78
},
"location": "home",
"type": {
"id": 82,
"name": "Successful Passes Percentage",
"code": "successful-passes-percentage",
"developer_name": "SUCCESSFUL_PASSES_PERCENTAGE",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775808,
"fixture_id": 19135354,
"type_id": 50,
"participant_id": 3468,
"data": {
"value": 4
},
"location": "home",
"type": {
"id": 50,
"name": "Shots Outsidebox",
"code": "shots-outsidebox",
"developer_name": "SHOTS_OUTSIDEBOX",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775375,
"fixture_id": 19135354,
"type_id": 82,
"participant_id": 83,
"data": {
"value": 84
},
"location": "away",
"type": {
"id": 82,
"name": "Successful Passes Percentage",
"code": "successful-passes-percentage",
"developer_name": "SUCCESSFUL_PASSES_PERCENTAGE",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775354,
"fixture_id": 19135354,
"type_id": 52,
"participant_id": 3468,
"data": {
"value": 0
},
"location": "home",
"type": {
"id": 52,
"name": "Goals",
"code": "goals",
"developer_name": "GOALS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775361,
"fixture_id": 19135354,
"type_id": 43,
"participant_id": 83,
"data": {
"value": 87
},
"location": "away",
"type": {
"id": 43,
"name": "Attacks",
"code": "attacks",
"developer_name": "ATTACKS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775363,
"fixture_id": 19135354,
"type_id": 47,
"participant_id": 83,
"data": {
"value": 0
},
"location": "away",
"type": {
"id": 47,
"name": "Penalties",
"code": "penalties",
"developer_name": "PENALTIES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775350,
"fixture_id": 19135354,
"type_id": 84,
"participant_id": 3468,
"data": {
"value": 2
},
"location": "home",
"type": {
"id": 84,
"name": "Yellowcards",
"code": "yellowcards",
"developer_name": "YELLOWCARDS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775810,
"fixture_id": 19135354,
"type_id": 45,
"participant_id": 83,
"data": {
"value": 58
},
"location": "away",
"type": {
"id": 45,
"name": "Ball Possession %",
"code": "ball-possession",
"developer_name": "BALL_POSSESSION",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775359,
"fixture_id": 19135354,
"type_id": 83,
"participant_id": 3468,
"data": {
"value": 0
},
"location": "home",
"type": {
"id": 83,
"name": "Redcards",
"code": "redcards",
"developer_name": "REDCARDS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775807,
"fixture_id": 19135354,
"type_id": 58,
"participant_id": 3468,
"data": {
"value": 1
},
"location": "home",
"type": {
"id": 58,
"name": "Shots Blocked",
"code": "shots-blocked",
"developer_name": "SHOTS_BLOCKED",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775365,
"fixture_id": 19135354,
"type_id": 41,
"participant_id": 83,
"data": {
"value": 7
},
"location": "away",
"type": {
"id": 41,
"name": "Shots Off Target",
"code": "shots-off-target",
"developer_name": "SHOTS_OFF_TARGET",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123777348,
"fixture_id": 19135354,
"type_id": 51,
"participant_id": 83,
"data": {
"value": 1
},
"location": "away",
"type": {
"id": 51,
"name": "Offsides",
"code": "offsides",
"developer_name": "OFFSIDES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123778542,
"fixture_id": 19135354,
"type_id": 56,
"participant_id": 3468,
"data": {
"value": 15
},
"location": "home",
"type": {
"id": 56,
"name": "Fouls",
"code": "fouls",
"developer_name": "FOULS",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123775815,
"fixture_id": 19135354,
"type_id": 64,
"participant_id": 83,
"data": {
"value": 1
},
"location": "away",
"type": {
"id": 64,
"name": "Hit Woodwork",
"code": "hit-woodwork",
"developer_name": "HIT_WOODWORK",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775341,
"fixture_id": 19135354,
"type_id": 47,
"participant_id": 3468,
"data": {
"value": 0
},
"location": "home",
"type": {
"id": 47,
"name": "Penalties",
"code": "penalties",
"developer_name": "PENALTIES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775346,
"fixture_id": 19135354,
"type_id": 60,
"participant_id": 3468,
"data": {
"value": 18
},
"location": "home",
"type": {
"id": 60,
"name": "Throwins",
"code": "throwins",
"developer_name": "THROWINS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123794189,
"fixture_id": 19135354,
"type_id": 117,
"participant_id": 83,
"data": {
"value": 12
},
"location": "away",
"type": {
"id": 117,
"name": "Key Passes",
"code": "key-passes",
"developer_name": "KEY_PASSES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775339,
"fixture_id": 19135354,
"type_id": 41,
"participant_id": 3468,
"data": {
"value": 4
},
"location": "home",
"type": {
"id": 41,
"name": "Shots Off Target",
"code": "shots-off-target",
"developer_name": "SHOTS_OFF_TARGET",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775370,
"fixture_id": 19135354,
"type_id": 59,
"participant_id": 83,
"data": {
"value": 3
},
"location": "away",
"type": {
"id": 59,
"name": "Substitutions",
"code": "substitutions",
"developer_name": "SUBSTITUTIONS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775373,
"fixture_id": 19135354,
"type_id": 84,
"participant_id": 83,
"data": {
"value": 5
},
"location": "away",
"type": {
"id": 84,
"name": "Yellowcards",
"code": "yellowcards",
"developer_name": "YELLOWCARDS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123778066,
"fixture_id": 19135354,
"type_id": 70,
"participant_id": 83,
"data": {
"value": 12
},
"location": "away",
"type": {
"id": 70,
"name": "Headers",
"code": "headers",
"developer_name": "HEADERS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775358,
"fixture_id": 19135354,
"type_id": 59,
"participant_id": 3468,
"data": {
"value": 3
},
"location": "home",
"type": {
"id": 59,
"name": "Substitutions",
"code": "substitutions",
"developer_name": "SUBSTITUTIONS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123776898,
"fixture_id": 19135354,
"type_id": 98,
"participant_id": 3468,
"data": {
"value": 16
},
"location": "home",
"type": {
"id": 98,
"name": "Total Crosses",
"code": "total-crosses",
"developer_name": "TOTAL_CROSSES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123783450,
"fixture_id": 19135354,
"type_id": 77,
"participant_id": 3468,
"data": {
"value": 14
},
"location": "home",
"type": {
"id": 77,
"name": "Challenges",
"code": "challenges",
"developer_name": "CHALLENGES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123783470,
"fixture_id": 19135354,
"type_id": 100,
"participant_id": 3468,
"data": {
"value": 14
},
"location": "home",
"type": {
"id": 100,
"name": "Interceptions",
"code": "interceptions",
"developer_name": "INTERCEPTIONS",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123751235,
"fixture_id": 19135354,
"type_id": 42,
"participant_id": 83,
"data": {
"value": 15
},
"location": "away",
"type": {
"id": 42,
"name": "Shots Total",
"code": "shots-total",
"developer_name": "SHOTS_TOTAL",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123779713,
"fixture_id": 19135354,
"type_id": 62,
"participant_id": 83,
"data": {
"value": 24
},
"location": "away",
"type": {
"id": 62,
"name": "Long Passes",
"code": "long-passes",
"developer_name": "LONG_PASSES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123751234,
"fixture_id": 19135354,
"type_id": 42,
"participant_id": 3468,
"data": {
"value": 9
},
"location": "home",
"type": {
"id": 42,
"name": "Shots Total",
"code": "shots-total",
"developer_name": "SHOTS_TOTAL",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775584,
"fixture_id": 19135354,
"type_id": 80,
"participant_id": 3468,
"data": {
"value": 311
},
"location": "home",
"type": {
"id": 80,
"name": "Passes",
"code": "passes",
"developer_name": "PASSES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775356,
"fixture_id": 19135354,
"type_id": 55,
"participant_id": 3468,
"data": {
"value": 18
},
"location": "home",
"type": {
"id": 55,
"name": "Free Kicks",
"code": "free-kicks",
"developer_name": "FREE_KICKS",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123775364,
"fixture_id": 19135354,
"type_id": 86,
"participant_id": 83,
"data": {
"value": 7
},
"location": "away",
"type": {
"id": 86,
"name": "Shots On Target",
"code": "shots-on-target",
"developer_name": "SHOTS_ON_TARGET",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775369,
"fixture_id": 19135354,
"type_id": 34,
"participant_id": 83,
"data": {
"value": 3
},
"location": "away",
"type": {
"id": 34,
"name": "Corners",
"code": "corners",
"developer_name": "CORNERS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775351,
"fixture_id": 19135354,
"type_id": 44,
"participant_id": 3468,
"data": {
"value": 37
},
"location": "home",
"type": {
"id": 44,
"name": "Dangerous Attacks",
"code": "dangerous-attacks",
"developer_name": "DANGEROUS_ATTACKS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775814,
"fixture_id": 19135354,
"type_id": 81,
"participant_id": 83,
"data": {
"value": 380
},
"location": "away",
"type": {
"id": 81,
"name": "Successful Passes",
"code": "successful-passes",
"developer_name": "SUCCESSFUL_PASSES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123778543,
"fixture_id": 19135354,
"type_id": 56,
"participant_id": 83,
"data": {
"value": 17
},
"location": "away",
"type": {
"id": 56,
"name": "Fouls",
"code": "fouls",
"developer_name": "FOULS",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123775349,
"fixture_id": 19135354,
"type_id": 34,
"participant_id": 3468,
"data": {
"value": 10
},
"location": "home",
"type": {
"id": 34,
"name": "Corners",
"code": "corners",
"developer_name": "CORNERS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775362,
"fixture_id": 19135354,
"type_id": 44,
"participant_id": 83,
"data": {
"value": 33
},
"location": "away",
"type": {
"id": 44,
"name": "Dangerous Attacks",
"code": "dangerous-attacks",
"developer_name": "DANGEROUS_ATTACKS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123780661,
"fixture_id": 19135354,
"type_id": 78,
"participant_id": 83,
"data": {
"value": 19
},
"location": "away",
"type": {
"id": 78,
"name": "Tackles",
"code": "tackles",
"developer_name": "TACKLES",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123775371,
"fixture_id": 19135354,
"type_id": 60,
"participant_id": 83,
"data": {
"value": 14
},
"location": "away",
"type": {
"id": 60,
"name": "Throwins",
"code": "throwins",
"developer_name": "THROWINS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123778065,
"fixture_id": 19135354,
"type_id": 65,
"participant_id": 3468,
"data": {
"value": 5
},
"location": "home",
"type": {
"id": 65,
"name": "Successful Headers",
"code": "successful-headers",
"developer_name": "SUCCESSFUL_HEADERS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123777292,
"fixture_id": 19135354,
"type_id": 51,
"participant_id": 3468,
"data": {
"value": 12
},
"location": "home",
"type": {
"id": 51,
"name": "Offsides",
"code": "offsides",
"developer_name": "OFFSIDES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775353,
"fixture_id": 19135354,
"type_id": 86,
"participant_id": 3468,
"data": {
"value": 4
},
"location": "home",
"type": {
"id": 86,
"name": "Shots On Target",
"code": "shots-on-target",
"developer_name": "SHOTS_ON_TARGET",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775367,
"fixture_id": 19135354,
"type_id": 53,
"participant_id": 83,
"data": {
"value": 5
},
"location": "away",
"type": {
"id": 53,
"name": "Goal Kicks",
"code": "goals-kicks",
"developer_name": "GOAL_KICKS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123777295,
"fixture_id": 19135354,
"type_id": 99,
"participant_id": 3468,
"data": {
"value": 4
},
"location": "home",
"type": {
"id": 99,
"name": "Accurate Crosses",
"code": "accurate-crosses",
"developer_name": "ACCURATE_CROSSES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775585,
"fixture_id": 19135354,
"type_id": 80,
"participant_id": 83,
"data": {
"value": 452
},
"location": "away",
"type": {
"id": 80,
"name": "Passes",
"code": "passes",
"developer_name": "PASSES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775347,
"fixture_id": 19135354,
"type_id": 53,
"participant_id": 3468,
"data": {
"value": 7
},
"location": "home",
"type": {
"id": 53,
"name": "Goal Kicks",
"code": "goals-kicks",
"developer_name": "GOAL_KICKS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775372,
"fixture_id": 19135354,
"type_id": 83,
"participant_id": 83,
"data": {
"value": 0
},
"location": "away",
"type": {
"id": 83,
"name": "Redcards",
"code": "redcards",
"developer_name": "REDCARDS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123798774,
"fixture_id": 19135354,
"type_id": 109,
"participant_id": 83,
"data": {
"value": 0
},
"location": "away",
"type": {
"id": 109,
"name": "Successful Dribbles",
"code": "successful-dribbles",
"developer_name": "SUCCESSFUL_DRIBBLES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775806,
"fixture_id": 19135354,
"type_id": 49,
"participant_id": 3468,
"data": {
"value": 5
},
"location": "home",
"type": {
"id": 49,
"name": "Shots Insidebox",
"code": "shots-insidebox",
"developer_name": "SHOTS_INSIDEBOX",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775809,
"fixture_id": 19135354,
"type_id": 64,
"participant_id": 3468,
"data": {
"value": 0
},
"location": "home",
"type": {
"id": 64,
"name": "Hit Woodwork",
"code": "hit-woodwork",
"developer_name": "HIT_WOODWORK",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775811,
"fixture_id": 19135354,
"type_id": 58,
"participant_id": 83,
"data": {
"value": 1
},
"location": "away",
"type": {
"id": 58,
"name": "Shots Blocked",
"code": "shots-blocked",
"developer_name": "SHOTS_BLOCKED",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123780660,
"fixture_id": 19135354,
"type_id": 78,
"participant_id": 3468,
"data": {
"value": 20
},
"location": "home",
"type": {
"id": 78,
"name": "Tackles",
"code": "tackles",
"developer_name": "TACKLES",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123783188,
"fixture_id": 19135354,
"type_id": 66,
"participant_id": 3468,
"data": {
"value": 19
},
"location": "home",
"type": {
"id": 66,
"name": "Successful Interceptions",
"code": "successful-interceptions",
"developer_name": "SUCCESSFUL_INTERCEPTIONS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123777349,
"fixture_id": 19135354,
"type_id": 99,
"participant_id": 83,
"data": {
"value": 3
},
"location": "away",
"type": {
"id": 99,
"name": "Accurate Crosses",
"code": "accurate-crosses",
"developer_name": "ACCURATE_CROSSES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123798770,
"fixture_id": 19135354,
"type_id": 109,
"participant_id": 3468,
"data": {
"value": 4
},
"location": "home",
"type": {
"id": 109,
"name": "Successful Dribbles",
"code": "successful-dribbles",
"developer_name": "SUCCESSFUL_DRIBBLES",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123783189,
"fixture_id": 19135354,
"type_id": 66,
"participant_id": 83,
"data": {
"value": 17
},
"location": "away",
"type": {
"id": 66,
"name": "Successful Interceptions",
"code": "successful-interceptions",
"developer_name": "SUCCESSFUL_INTERCEPTIONS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775368,
"fixture_id": 19135354,
"type_id": 55,
"participant_id": 83,
"data": {
"value": 28
},
"location": "away",
"type": {
"id": 55,
"name": "Free Kicks",
"code": "free-kicks",
"developer_name": "FREE_KICKS",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123775812,
"fixture_id": 19135354,
"type_id": 49,
"participant_id": 83,
"data": {
"value": 7
},
"location": "away",
"type": {
"id": 49,
"name": "Shots Insidebox",
"code": "shots-insidebox",
"developer_name": "SHOTS_INSIDEBOX",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123775778,
"fixture_id": 19135354,
"type_id": 81,
"participant_id": 3468,
"data": {
"value": 244
},
"location": "home",
"type": {
"id": 81,
"name": "Successful Passes",
"code": "successful-passes",
"developer_name": "SUCCESSFUL_PASSES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123775813,
"fixture_id": 19135354,
"type_id": 50,
"participant_id": 83,
"data": {
"value": 8
},
"location": "away",
"type": {
"id": 50,
"name": "Shots Outsidebox",
"code": "shots-outsidebox",
"developer_name": "SHOTS_OUTSIDEBOX",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123778064,
"fixture_id": 19135354,
"type_id": 70,
"participant_id": 3468,
"data": {
"value": 10
},
"location": "home",
"type": {
"id": 70,
"name": "Headers",
"code": "headers",
"developer_name": "HEADERS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123778067,
"fixture_id": 19135354,
"type_id": 65,
"participant_id": 83,
"data": {
"value": 6
},
"location": "away",
"type": {
"id": 65,
"name": "Successful Headers",
"code": "successful-headers",
"developer_name": "SUCCESSFUL_HEADERS",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123779712,
"fixture_id": 19135354,
"type_id": 62,
"participant_id": 3468,
"data": {
"value": 26
},
"location": "home",
"type": {
"id": 62,
"name": "Long Passes",
"code": "long-passes",
"developer_name": "LONG_PASSES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123783451,
"fixture_id": 19135354,
"type_id": 77,
"participant_id": 83,
"data": {
"value": 9
},
"location": "away",
"type": {
"id": 77,
"name": "Challenges",
"code": "challenges",
"developer_name": "CHALLENGES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123783473,
"fixture_id": 19135354,
"type_id": 100,
"participant_id": 83,
"data": {
"value": 9
},
"location": "away",
"type": {
"id": 100,
"name": "Interceptions",
"code": "interceptions",
"developer_name": "INTERCEPTIONS",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123794187,
"fixture_id": 19135354,
"type_id": 57,
"participant_id": 83,
"data": {
"value": 4
},
"location": "away",
"type": {
"id": 57,
"name": "Saves",
"code": "saves",
"developer_name": "SAVES",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123816039,
"fixture_id": 19135354,
"type_id": 79,
"participant_id": 83,
"data": {
"value": 4
},
"location": "away",
"type": {
"id": 79,
"name": "Assists",
"code": "assists",
"developer_name": "ASSISTS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123794186,
"fixture_id": 19135354,
"type_id": 57,
"participant_id": 3468,
"data": {
"value": 3
},
"location": "home",
"type": {
"id": 57,
"name": "Saves",
"code": "saves",
"developer_name": "SAVES",
"model_type": "statistic",
"stat_group": "defensive"
}
},
{
"id": 123794188,
"fixture_id": 19135354,
"type_id": 117,
"participant_id": 3468,
"data": {
"value": 6
},
"location": "home",
"type": {
"id": 117,
"name": "Key Passes",
"code": "key-passes",
"developer_name": "KEY_PASSES",
"model_type": "statistic",
"stat_group": "overall"
}
},
{
"id": 123816012,
"fixture_id": 19135354,
"type_id": 79,
"participant_id": 3468,
"data": {
"value": 1
},
"location": "home",
"type": {
"id": 79,
"name": "Assists",
"code": "assists",
"developer_name": "ASSISTS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123798771,
"fixture_id": 19135354,
"type_id": 108,
"participant_id": 3468,
"data": {
"value": 13
},
"location": "home",
"type": {
"id": 108,
"name": "Dribble Attempts",
"code": "dribble-attempts",
"developer_name": "DRIBBLED_ATTEMPTS",
"model_type": "statistic",
"stat_group": "offensive"
}
},
{
"id": 123798773,
"fixture_id": 19135354,
"type_id": 108,
"participant_id": 83,
"data": {
"value": 8
},
"location": "away",
"type": {
"id": 108,
"name": "Dribble Attempts",
"code": "dribble-attempts",
"developer_name": "DRIBBLED_ATTEMPTS",
"model_type": "statistic",
"stat_group": "offensive"
}
}
]
},
"subscription": [
{
"meta": {
"trial_ends_at": "2024-10-16 14:50:45",
"ends_at": null,
"current_timestamp": 1734350922
},
"plans": [
{
"plan": "Enterprise plan (loyal)",
"sport": "Football",
"category": "Advanced"
},
{
"plan": "Enterprise Plan",
"sport": "Cricket",
"category": "Standard"
},
{
"plan": "Formula One",
"sport": "Formula One",
"category": "Standard"
}
],
"add_ons": [
{
"add_on": "All-in News API",
"sport": "Football",
"category": "News"
},
{
"add_on": "pressure index add-on",
"sport": "Football",
"category": "Default"
},
{
"add_on": "Enterprise Plan Predictions",
"sport": "Football",
"category": "Predictions"
},
{
"add_on": "xG Advanced",
"sport": "Football",
"category": "Expected"
}
],
"widgets": [
{
"widget": "Sportmonks Widgets",
"sport": "Football"
}
]
}
],
"rate_limit": {
"resets_in_seconds": 3357,
"remaining": 2996,
"requested_entity": "Fixture"
},
"timezone": "UTC"
}
The response from 4.1 returns a lot of statistics; however, what can we do if we are interested in just a specific type of detail, such as shots on target or successful passes?
We will handle this type of scenario in the next section.