You want to answer your users’ questions, right? So, if I told you they are looking for an answer to the question, “What were the Champions League results last night?” then you probably understand you need the Champions League results in your football app.
Even better, they might be searching for the results of today. It will be hard if you are reading this during the summer break or on a non-Champions League day, but you get my point. If anyone is looking for the Champions League results or livescores, you want to have this data in your application. If not, they will simply download an app that has them available. Your app can be as user-friendly, ingenious, or good-looking as possible. If you don’t offer what the customer is looking for, they will leave you for another application.
If you need a more detailed explanation of how to build a match page and get all kinds of extra statistics, we recommend the following guide. Are you more interested in the livescores? Alright, let’s check this tutorial.
For now, we will look at the following endpoint:
https://api.sportmonks.com/v3/football/fixtures/{ID}
This is the basic link to make a request to this particular fixture endpoint. The beauty of this endpoint is that you can simply get all the data from a single fixture.
So, in our API, one of the latest matches played in the 2023/2024 Champions League season is the semi-final between Real Madrid and FC Bayern Munich. It has Fixture ID 19101798. As you have created your API Token in previous steps and you have this Fixture ID and the base link for a request, you can now complete it.
No worries, I will help:
https://api.sportmonks.com/v3/football/fixtures/19101798?api_token={YOUR_TOKEN}
So, use this to insert your token. Don’t forget to delete the brackets and find out what the “result” is. It’s probably not exactly what you were hoping for. No worries; we will get there with the next request.
Using includes can enrich the response with much more data. Please read the includes tutorial to learn everything you need to know, such as how to use multiple includes.
// 20240528102110 // https://api.sportmonks.com/v3/football/fixtures/19101798?api_token=1EYt8yP1XNbCMZMYVJ3wiWRH0BUGGeWq5QZnwh0UNeN6pjr8gxL2ClkjfDes { "data": { "id": 19101798, "sport_id": 1, "league_id": 2, "season_id": 21638, "stage_id": 77463968, "group_id": null, "aggregate_id": 52048, "round_id": null, "state_id": 5, "venue_id": 2020, "name": "Real Madrid vs FC Bayern München", "starting_at": "2024-05-08 19:00:00", "result_info": "Real Madrid won after full-time.", "leg": "2/2", "details": null, "length": 90, "placeholder": false, "has_odds": true, "has_premium_odds": true, "starting_at_timestamp": 1715194800 }, "subscription": [ { "meta": { "trial_ends_at": "2024-02-26 14:51:56", "ends_at": null, "current_timestamp": 1716884471 }, "plans": [ { "plan": "Enterprise Plan", "sport": "Football", "category": "Advanced" } ], "add_ons": [ { "add_on": "All-in News API", "sport": "Football", "category": "News" } ], "widgets": [ { "widget": "Combi Deal 2024", "sport": "Football" } ] } ], "rate_limit": { "resets_in_seconds": 3600, "remaining": 2999, "requested_entity": "Fixture" }, "timezone": "UTC" }
// 20240528102547 // https://api.sportmonks.com/v3/football/fixtures/19101798?api_token=1EYt8yP1XNbCMZMYVJ3wiWRH0BUGGeWq5QZnwh0UNeN6pjr8gxL2ClkjfDes&include=scores { "data": { "id": 19101798, "sport_id": 1, "league_id": 2, "season_id": 21638, "stage_id": 77463968, "group_id": null, "aggregate_id": 52048, "round_id": null, "state_id": 5, "venue_id": 2020, "name": "Real Madrid vs FC Bayern München", "starting_at": "2024-05-08 19:00:00", "result_info": "Real Madrid won after full-time.", "leg": "2/2", "details": null, "length": 90, "placeholder": false, "has_odds": true, "has_premium_odds": true, "starting_at_timestamp": 1715194800, "scores": [ { "id": 14377362, "fixture_id": 19101798, "type_id": 2, "participant_id": 503, "score": { "goals": 1, "participant": "away" }, "description": "2ND_HALF" }, { "id": 14377332, "fixture_id": 19101798, "type_id": 1525, "participant_id": 3468, "score": { "goals": 2, "participant": "home" }, "description": "CURRENT" }, { "id": 14377328, "fixture_id": 19101798, "type_id": 1, "participant_id": 503, "score": { "goals": 0, "participant": "away" }, "description": "1ST_HALF" }, { "id": 14377329, "fixture_id": 19101798, "type_id": 1, "participant_id": 3468, "score": { "goals": 0, "participant": "home" }, "description": "1ST_HALF" }, { "id": 14377333, "fixture_id": 19101798, "type_id": 1525, "participant_id": 503, "score": { "goals": 1, "participant": "away" }, "description": "CURRENT" }, { "id": 14377363, "fixture_id": 19101798, "type_id": 2, "participant_id": 3468, "score": { "goals": 2, "participant": "home" }, "description": "2ND_HALF" } ] }, "subscription": [ { "meta": { "trial_ends_at": "2024-02-26 14:51:56", "ends_at": null, "current_timestamp": 1716884748 }, "plans": [ { "plan": "Enterprise Plan", "sport": "Football", "category": "Advanced" } ], "add_ons": [ { "add_on": "All-in News API", "sport": "Football", "category": "News" } ], "widgets": [ { "widget": "Combi Deal 2024", "sport": "Football" } ] } ], "rate_limit": { "resets_in_seconds": 3323, "remaining": 2998, "requested_entity": "Fixture" }, "timezone": "UTC" }
For now, we will only use the include scores, as you are interested in which team won and what the score is/was. So, we will do the following: we are adding &include=scores to our previous request.
https://api.sportmonks.com/v3/football/fixtures/19101798?api_token={YOUR_TOKEN}&include=scores
Voila, you will see the first and second-half scores besides the result_info: “Real Madrid won after full-time”.
Are you interested in which Champions League result is most likely? Then we have an additional surprise for you. We offer predictions for over 900 leagues, including the Champions League. So, if you are interested, get over to our Predictions API and find yourself the most likely Champions League results.
Champions League xG is available in our API as well. If you want to show the hottest statistic in Football Data and combine it with the best football league in the world you can add the Champions League xG to your subscription via MySportmonks.