
Contents
While the number of readers remains proprietary to individual media outlets, widespread interest in his transfer was reported by major news outlets such as Sky Sports, Forbes, BBC Sport, and Reuters. Millions, millions, of interactions were made on social media after the official announcement from Real Madrid on the 3rd of June 2024.
Some of them could have actually been done right on your app! Yes! With a shoestring budget, you too can rub shoulders with the crème de la crème of sports news.
Perhaps you would like to carve a niche in football transfer news related to a specific club, maybe Chelsea? Or one of your favourite players? Don’t fret! In this blog, we will explore club transfer activities with Sportmonks Football API and Dart, an object-oriented, class-based programming language with C-style syntax.
So, grab your favourite jersey and join us as we dive into this football transfer mania!
What is Dart?
The language, which first appeared on October 10, 2011, was designed by Lars Bak and Kasper Lund before Google adopted it.
Dart is an object-oriented, class-based, garbage-collected language with C-style syntax. It can compile to machine code, JavaScript, or WebAssembly.
Who Uses Dart?
Dart can be used to develop web and mobile apps as well as server and desktop applications; hence it’s an ideal choice for HTTP applications. Never mind it ranks 17th on a recent survey on Stackoverflow’s most popular technology, an active community of Dart developers is available when required.
While Dart is not particularly popular in the programming world, Dart is adopted in many everyday apps such as Google Pay, AdSense, and eBay Motors.
Did you know Google Play Console, which lets app publishers market Android apps, is written completely in Dart? The list goes on with many more Google apps. Google One and Google Fibre have adopted Dart in one form or another.
In addition, e-commerce giant Alibaba makes extensive use of Dart.
Chapter 1: Setting up your environment
In order to write and compile Dart, we need to set up an environment to do so. While there are a host of development tools available for use, we will choose the option of installing an IDE to get us up and running in little time.
1.1 Installing the tools for Dart.
Once again, IntelliJ IDEA is our preferred IDE. The platform-independent and versatile IDE, which has support for more than a dozen programming languages, can be downloaded from its official website.
You can visit the installation guide to get you up and running.
Assuming you have installed IntelliJ IDEA, launch the IDE and install an extension for Dart.
After doing so, you will be required to install the SDK which you can download from the official page.
1.2 Obtaining an API Token.
Before we can begin to explore Sportmonks Football API, we need to sign in/up for an account on my.sportmonks.com.
Your account automatically comes with the Danish Superliga and Scottish Premier League plans at no cost.
If you haven’t done so already, you can take advantage of the 14-day free trial on any of the other plans.
Head over to the Create an API Token section.
Once you have your API Token, which is required for authentication and accessing the data endpoints, you must keep it private.
Chapter 2: Exploring transfers
In this chapter, we shall retrieve transfers from an endpoint on our Football API, which will include several fields, such as date, amount, and completed status, among several others. You may refer to the documentation for a detailed description of all the fields from this endpoint.
2.1 Get All Transfers.
We can retrieve all transfers from Sportmonks’ Football API using the URL of interest below on a browser. Don’t forget to include your API token.
https://api.sportmonks.com/v3/football/transfers?api_token=API_Token
We can do the same using Dart in the piece of code below.
import 'dart:convert'; import 'dart:io'; Future fetchTransfers() async { const baseUrl = 'https://api.sportmonks.com/v3/football/transfers'; const apiToken = 'API Token'; // Replace with your API token final url = Uri.parse('$baseUrl?api_token=$apiToken'); try { final client = HttpClient(); final request = await client.getUrl(url); final response = await request.close(); if (response.statusCode == 200) { final responseBody = await response.transform(utf8.decoder).join(); var data = jsonDecode(responseBody); // Pretty-print the JSON data final prettyJson = JsonEncoder.withIndent(' ').convert(data); print('Transfers Data:\n$prettyJson'); return data; } else { print('Failed to fetch data. Status code: ${response.statusCode}'); return null; } } catch (e) { print('An error occurred: $e'); return null; } } main() async { await fetchTransfers(); }
Transfers Data: { "data": [ { "id": 1, "sport_id": 1, "player_id": 6983809, "type_id": 218, "from_team_id": 794, "to_team_id": 999, "position_id": 26, "detailed_position_id": 153, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 2, "sport_id": 1, "player_id": 37642394, "type_id": 218, "from_team_id": 1947, "to_team_id": 5931, "position_id": 27, "detailed_position_id": 151, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 3, "sport_id": 1, "player_id": 37356319, "type_id": 219, "from_team_id": 6392, "to_team_id": 3161, "position_id": 26, "detailed_position_id": 153, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": 800000 }, { "id": 4, "sport_id": 1, "player_id": 24092472, "type_id": 218, "from_team_id": 15, "to_team_id": 54, "position_id": null, "detailed_position_id": null, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 5, "sport_id": 1, "player_id": 3178, "type_id": 219, "from_team_id": 522, "to_team_id": 397, "position_id": null, "detailed_position_id": null, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 8, "sport_id": 1, "player_id": 28746, "type_id": 218, "from_team_id": 2642, "to_team_id": 1130, "position_id": 27, "detailed_position_id": 151, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 9, "sport_id": 1, "player_id": 496663, "type_id": 218, "from_team_id": 645, "to_team_id": 353, "position_id": 25, "detailed_position_id": 148, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 10, "sport_id": 1, "player_id": 204483, "type_id": 220, "from_team_id": 621, "to_team_id": 3224, "position_id": 26, "detailed_position_id": 149, "date": "2025-02-01", "career_ended": false, "completed": true, "amount": null }, { "id": 11, "sport_id": 1, "player_id": 338180, "type_id": 218, "from_team_id": 277, "to_team_id": 613, "position_id": 26, "detailed_position_id": 150, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 13, "sport_id": 1, "player_id": 24288, "type_id": 220, "from_team_id": 34, "to_team_id": 105, "position_id": 27, "detailed_position_id": 156, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 33, "sport_id": 1, "player_id": 1494345, "type_id": 218, "from_team_id": 26, "to_team_id": 28, "position_id": 27, "detailed_position_id": 151, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 34, "sport_id": 1, "player_id": 37600924, "type_id": 219, "from_team_id": 44, "to_team_id": 3357, "position_id": 25, "detailed_position_id": 155, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 36, "sport_id": 1, "player_id": 186320, "type_id": 220, "from_team_id": 7011, "to_team_id": 3684, "position_id": 27, "detailed_position_id": 152, "date": "2025-01-31", "career_ended": false, "completed": true, "amount": null }, { "id": 37, "sport_id": 1, "player_id": 50835, "type_id": 219, "from_team_id": 103, "to_team_id": 254172, "position_id": 27, "detailed_position_id": 152, "date": "2025-01-31", "career_ended": false, "completed": true, "amount": 12000000 }, { "id": 38, "sport_id": 1, "player_id": 32044, "type_id": 9688, "from_team_id": 6325, "to_team_id": 2726, "position_id": 26, "detailed_position_id": 150, "date": "2021-12-31", "career_ended": false, "completed": true, "amount": null }, { "id": 39, "sport_id": 1, "player_id": 63179, "type_id": 219, "from_team_id": 36, "to_team_id": 75, "position_id": 27, "detailed_position_id": 152, "date": "2025-01-31", "career_ended": false, "completed": true, "amount": 3500000 }, { "id": 44, "sport_id": 1, "player_id": 37400466, "type_id": 219, "from_team_id": 2864, "to_team_id": 2352, "position_id": 27, "detailed_position_id": 156, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": 2500000 }, { "id": 45, "sport_id": 1, "player_id": 397691, "type_id": 219, "from_team_id": 10675, "to_team_id": 7228, "position_id": 27, "detailed_position_id": 151, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 46, "sport_id": 1, "player_id": 14011798, "type_id": 219, "from_team_id": 1658, "to_team_id": 12152, "position_id": 27, "detailed_position_id": 152, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": 800000 }, { "id": 52, "sport_id": 1, "player_id": 1492905, "type_id": 220, "from_team_id": 14710, "to_team_id": 3246, "position_id": 27, "detailed_position_id": 152, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 53, "sport_id": 1, "player_id": 452754, "type_id": 220, "from_team_id": 2469, "to_team_id": 2735, "position_id": 26, "detailed_position_id": 150, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 55, "sport_id": 1, "player_id": 251652, "type_id": 220, "from_team_id": 860, "to_team_id": 2495, "position_id": 27, "detailed_position_id": 156, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 56, "sport_id": 1, "player_id": 37592317, "type_id": 220, "from_team_id": 1445, "to_team_id": 3510, "position_id": 26, "detailed_position_id": 149, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 57, "sport_id": 1, "player_id": 37552196, "type_id": 220, "from_team_id": 313, "to_team_id": 1437, "position_id": 25, "detailed_position_id": 154, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null }, { "id": 58, "sport_id": 1, "player_id": 73606, "type_id": 220, "from_team_id": 5829, "to_team_id": 7292, "position_id": 27, "detailed_position_id": 152, "date": "2025-01-30", "career_ended": false, "completed": true, "amount": null } ], "pagination": { "count": 25, "per_page": 25, "current_page": 1, "next_page": "https://api.sportmonks.com/v3/football/transfers?page=2", "has_more": true }, "subscription": [ { "meta": { "trial_ends_at": "2024-10-16 14:50:45", "ends_at": null, "current_timestamp": 1739158565 }, "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": 3586, "remaining": 2998, "requested_entity": "Transfer" }, "timezone": "UTC" }
The opening statements imports the necessary libraries: dart:convert for handling JSON encoding/decoding and dart:io for making HTTP requests.
We constructed our URL by combining a base URL with an API token to form the complete endpoint before employing an HTTP Request which uses an HttpClient to send a GET request. Upon response, we checked if the response status code was 200 indicating success. If successful, our piece of code reads the response body and decodes the JSON data before it is pretty-printed to the console. Our Main function is asynchronous and calls fetchTransfers() to initiate the process. Overall, the code is designed to retrieve transfer data from an API, decode and format the JSON response, and then output it in a readable format. Good programming practice involves handling errors, which we also employed.
In the next chapter, we will retrieve transfers related to a specific club.
Chapter 3: Exploring club-specific transfer activities
What if you wish to carve a niche as a club-specific media outlet? Or you’ve got a fan-specific app and would like to view only transfer-related activities for a club of interest. In the next section, we will show you how easily you can achieve the feat using the Teams’ endpoint and the include statement ‘include=toTeam;fromTeam’ which reveals the participating club’s name.
3.1 Retrieving Chelsea’s transfer activities.
As we all know, when it comes to Chelsea, there’s plenty of club-related transfer activity surrounding the London-based outfit. We shall use its club ID (18) for our exercise. Here below is our URL of interest, which you can try out on a browser.
import 'dart:convert'; import 'dart:io'; Future fetchTransfers() async { const String baseUrl = 'https://api.sportmonks.com/v3/football/transfers/teams/18'; const String apiToken = 'API Token'; // Replace with your actual API token const String include = 'toTeam;fromTeam'; // Include additional data final Uri url = Uri.parse('$baseUrl?api_token=$apiToken&include=$include'); try { final HttpClient client = HttpClient(); final HttpClientRequest request = await client.getUrl(url); final HttpClientResponse response = await request.close(); if (response.statusCode == 200) { final String responseBody = await response.transform(utf8.decoder).join(); var data = jsonDecode(responseBody); // Pretty-print the JSON data final String prettyJson = JsonEncoder.withIndent(' ').convert(data); print('Chelsea - Transfer Activities:\n$prettyJson'); } else { print('Failed to fetch data. Status code: ${response.statusCode}'); } client.close(); // Close the HTTP client } catch (e) { print('An error occurred: $e'); } } void main() { fetchTransfers(); }
Chelsea - Transfer Activities: { "data": [ { "id": 400384, "sport_id": 1, "player_id": 1601, "type_id": 218, "from_team_id": 18, "to_team_id": 51, "position_id": 25, "detailed_position_id": 155, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 51, "sport_id": 1, "country_id": 462, "venue_id": 201, "gender": "male", "name": "Crystal Palace", "short_code": "CRY", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/19/51.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-02 14:00:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 400387, "sport_id": 1, "player_id": 163152, "type_id": 218, "from_team_id": 18, "to_team_id": 113, "position_id": 27, "detailed_position_id": 163, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": 5500000, "toteam": { "id": 113, "sport_id": 1, "country_id": 251, "venue_id": 1721, "gender": "male", "name": "Milan", "short_code": "MIL", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/17/113.png", "founded": 1899, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 17:00:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 400359, "sport_id": 1, "player_id": 100385, "type_id": 218, "from_team_id": 18, "to_team_id": 15, "position_id": 25, "detailed_position_id": 148, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": 6000000, "toteam": { "id": 15, "sport_id": 1, "country_id": 462, "venue_id": 5, "gender": "male", "name": "Aston Villa", "short_code": "AVL", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/15/15.png", "founded": 1874, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-09 17:35:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 400347, "sport_id": 1, "player_id": 37668618, "type_id": 219, "from_team_id": 108, "to_team_id": 18, "position_id": 26, "detailed_position_id": 153, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": 15000000, "toteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" }, "fromteam": { "id": 108, "sport_id": 1, "country_id": 17, "venue_id": 6164, "gender": "male", "name": "Saint-Étienne", "short_code": "STE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/12/108.png", "founded": 1920, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:05:00" } }, { "id": 731, "sport_id": 1, "player_id": 31626713, "type_id": 218, "from_team_id": 18, "to_team_id": 68, "position_id": 26, "detailed_position_id": 153, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 68, "sport_id": 1, "country_id": 11, "venue_id": 2166, "gender": "male", "name": "Borussia Dortmund", "short_code": "BVB", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/4/68.png", "founded": 1909, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 14:30:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 709, "sport_id": 1, "player_id": 37525712, "type_id": 218, "from_team_id": 18, "to_team_id": 25, "position_id": 25, "detailed_position_id": 155, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 25, "sport_id": 1, "country_id": 462, "venue_id": 19, "gender": "male", "name": "Watford", "short_code": "WAT", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/25/25.png", "founded": 1881, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 12:30:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 623, "sport_id": 1, "player_id": 37445077, "type_id": 219, "from_team_id": 18, "to_team_id": 613, "position_id": 26, "detailed_position_id": 153, "date": "2025-02-02", "career_ended": false, "completed": true, "amount": 13000000, "toteam": { "id": 613, "sport_id": 1, "country_id": 251, "venue_id": 142, "gender": "male", "name": "Torino", "short_code": "TOR", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/5/613.png", "founded": 1906, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 19:45:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 399383, "sport_id": 1, "player_id": 37593154, "type_id": 218, "from_team_id": 18, "to_team_id": 625, "position_id": 25, "detailed_position_id": 148, "date": "2025-01-27", "career_ended": false, "completed": true, "amount": 4000000, "toteam": { "id": 625, "sport_id": 1, "country_id": 251, "venue_id": 118500, "gender": "male", "name": "Juventus", "short_code": "JUV", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/17/625.png", "founded": 1897, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-07 19:45:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 346288, "sport_id": 1, "player_id": 24817084, "type_id": 9688, "from_team_id": 3285, "to_team_id": 18, "position_id": 24, "detailed_position_id": null, "date": "2024-12-31", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" }, "fromteam": { "id": 3285, "sport_id": 1, "country_id": 47, "venue_id": 1917, "gender": "male", "name": "Brommapojkarna", "short_code": null, "image_path": "https://cdn.sportmonks.com/images/soccer/teams/21/3285.png", "founded": 1942, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-06 14:00:00" } }, { "id": 391372, "sport_id": 1, "player_id": 37631362, "type_id": 219, "from_team_id": 128597, "to_team_id": 18, "position_id": 25, "detailed_position_id": 154, "date": "2024-12-19", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" }, "fromteam": { "id": 128597, "sport_id": 1, "country_id": 462, "venue_id": 374, "gender": "male", "name": "Chelsea U21", "short_code": null, "image_path": "https://cdn.sportmonks.com/images/soccer/teams/21/128597.png", "founded": null, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-07 19:00:00" } }, { "id": 383772, "sport_id": 1, "player_id": 37555964, "type_id": 218, "from_team_id": 18, "to_team_id": 3897, "position_id": 27, "detailed_position_id": 151, "date": "2024-09-13", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 3897, "sport_id": 1, "country_id": 404, "venue_id": 2284, "gender": "male", "name": "Göztepe", "short_code": "GOZ", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/25/3897.png", "founded": 1925, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-06 17:45:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 381503, "sport_id": 1, "player_id": 37544802, "type_id": 219, "from_team_id": 18, "to_team_id": 2506, "position_id": 27, "detailed_position_id": 156, "date": "2024-09-02", "career_ended": false, "completed": true, "amount": 23000000, "toteam": { "id": 2506, "sport_id": 1, "country_id": 35376, "venue_id": 273510, "gender": "male", "name": "Al Nassr", "short_code": "ANA", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/10/2506.png", "founded": 1955, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-07 15:20:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 381310, "sport_id": 1, "player_id": 538034, "type_id": 218, "from_team_id": 14, "to_team_id": 18, "position_id": 27, "detailed_position_id": 152, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" }, "fromteam": { "id": 14, "sport_id": 1, "country_id": 462, "venue_id": 206, "gender": "male", "name": "Manchester United", "short_code": "MUN", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/14/14.png", "founded": 1878, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-07 20:00:00" } }, { "id": 381269, "sport_id": 1, "player_id": 537117, "type_id": 218, "from_team_id": 18, "to_team_id": 51, "position_id": 25, "detailed_position_id": 148, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 51, "sport_id": 1, "country_id": 462, "venue_id": 201, "gender": "male", "name": "Crystal Palace", "short_code": "CRY", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/19/51.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-02 14:00:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 381137, "sport_id": 1, "player_id": 23697427, "type_id": 218, "from_team_id": 18, "to_team_id": 13, "position_id": 27, "detailed_position_id": 151, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 13, "sport_id": 1, "country_id": 462, "venue_id": 12, "gender": "male", "name": "Everton", "short_code": "EVE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/13/13.png", "founded": 1878, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 15:00:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 381135, "sport_id": 1, "player_id": 802, "type_id": 218, "from_team_id": 18, "to_team_id": 19, "position_id": 27, "detailed_position_id": 152, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 19, "sport_id": 1, "country_id": 462, "venue_id": 204, "gender": "male", "name": "Arsenal", "short_code": "ARS", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/19/19.png", "founded": 1886, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-05 20:00:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 380554, "sport_id": 1, "player_id": 538472, "type_id": 218, "from_team_id": 18, "to_team_id": 686, "position_id": 24, "detailed_position_id": null, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 686, "sport_id": 1, "country_id": 17, "venue_id": 182, "gender": "male", "name": "Strasbourg", "short_code": "STR", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/14/686.png", "founded": 1906, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-09 16:15:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 380003, "sport_id": 1, "player_id": 995, "type_id": 219, "from_team_id": 18, "to_team_id": 597, "position_id": 27, "detailed_position_id": 151, "date": "2024-08-29", "career_ended": false, "completed": true, "amount": 30000000, "toteam": { "id": 597, "sport_id": 1, "country_id": 251, "venue_id": 134, "gender": "male", "name": "Napoli", "short_code": "NAP", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/21/597.png", "founded": 1926, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-09 19:45:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 379976, "sport_id": 1, "player_id": 6599974, "type_id": 219, "from_team_id": 18, "to_team_id": 397, "position_id": 26, "detailed_position_id": 150, "date": "2024-08-29", "career_ended": false, "completed": true, "amount": 1000000, "toteam": { "id": 397, "sport_id": 1, "country_id": 251, "venue_id": 7220, "gender": "male", "name": "Empoli", "short_code": "EMP", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/13/397.png", "founded": 1920, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 17:00:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 379969, "sport_id": 1, "player_id": 186606, "type_id": 218, "from_team_id": 18, "to_team_id": 52, "position_id": 24, "detailed_position_id": null, "date": "2024-08-29", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 52, "sport_id": 1, "country_id": 462, "venue_id": 146, "gender": "male", "name": "AFC Bournemouth", "short_code": "BOU", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/20/52.png", "founded": 1899, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 15:00:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 379633, "sport_id": 1, "player_id": 37590621, "type_id": 218, "from_team_id": 18, "to_team_id": 2709, "position_id": 24, "detailed_position_id": null, "date": "2024-08-28", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 2709, "sport_id": 1, "country_id": 556, "venue_id": 1611, "gender": "male", "name": "Genk", "short_code": "GNK", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/21/2709.png", "founded": 1988, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 19:45:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 379576, "sport_id": 1, "player_id": 37590621, "type_id": 219, "from_team_id": 2709, "to_team_id": 18, "position_id": 24, "detailed_position_id": null, "date": "2024-08-27", "career_ended": false, "completed": true, "amount": 20000000, "toteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" }, "fromteam": { "id": 2709, "sport_id": 1, "country_id": 556, "venue_id": 1611, "gender": "male", "name": "Genk", "short_code": "GNK", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/21/2709.png", "founded": 1988, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 19:45:00" } }, { "id": 376885, "sport_id": 1, "player_id": 1494245, "type_id": 219, "from_team_id": 18, "to_team_id": 7980, "position_id": 26, "detailed_position_id": 153, "date": "2024-08-21", "career_ended": false, "completed": true, "amount": 42000000, "toteam": { "id": 7980, "sport_id": 1, "country_id": 32, "venue_id": 140808, "gender": "male", "name": "Atlético Madrid", "short_code": "ATM", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/12/7980.png", "founded": 1903, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 376890, "sport_id": 1, "player_id": 163152, "type_id": 219, "from_team_id": 7980, "to_team_id": 18, "position_id": 27, "detailed_position_id": 163, "date": "2024-08-21", "career_ended": false, "completed": true, "amount": 49200000, "toteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" }, "fromteam": { "id": 7980, "sport_id": 1, "country_id": 32, "venue_id": 140808, "gender": "male", "name": "Atlético Madrid", "short_code": "ATM", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/12/7980.png", "founded": 1903, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } }, { "id": 376883, "sport_id": 1, "player_id": 37259181, "type_id": 218, "from_team_id": 18, "to_team_id": 27, "position_id": 25, "detailed_position_id": 148, "date": "2024-08-21", "career_ended": false, "completed": true, "amount": null, "toteam": { "id": 27, "sport_id": 1, "country_id": 462, "venue_id": 200, "gender": "male", "name": "Burnley", "short_code": "BUR", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/27/27.png", "founded": 1882, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 15:00:00" }, "fromteam": { "id": 18, "sport_id": 1, "country_id": 462, "venue_id": 321614, "gender": "male", "name": "Chelsea", "short_code": "CHE", "image_path": "https://cdn.sportmonks.com/images/soccer/teams/18/18.png", "founded": 1905, "type": "domestic", "placeholder": false, "last_played_at": "2025-02-08 20:00:00" } } ], "pagination": { "count": 25, "per_page": 25, "current_page": 1, "next_page": "https://api.sportmonks.com/v3/football/transfers/teams/18?include=toTeam%3BfromTeam&page=2", "has_more": true }, "subscription": [ { "meta": { "trial_ends_at": "2024-10-16 14:50:45", "ends_at": null, "current_timestamp": 1739157047 }, "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": 1005, "remaining": 2998, "requested_entity": "Transfer" }, "timezone": "UTC" }
As you can see from the response, all participating club names are available for each transfer request. Thanks to our powerful inbuilt tool named ‘include’, you do not have to write a separate function to a new endpoint.
In the next chapter, we shall focus on including player details in our JSON response.
Chapter 4: Adding player details.
Using an include statement once again, we shall retrieve player details associated with each transfer request. https://api.sportmonks.com/v3/football/transfers/teams/18?api_token=API_Token&include=player:name,image_path
4.1 Including Player Names and other details.
In our modified piece of Dart code, we shall retrieve details such as player ID, name, image, position and other details in our JSON response. Below is our new piece of code.
import 'dart:convert'; import 'dart:io'; Future fetchTransfers() async { const String baseUrl = 'https://api.sportmonks.com/v3/football/transfers/teams/18'; const String apiToken = 'API_Token'; // Replace with your actual API token const String include = 'player:name,image_path'; final Uri url = Uri.parse('$baseUrl?api_token=$apiToken&include=$include'); try { final HttpClient client = HttpClient(); final HttpClientRequest request = await client.getUrl(url); final HttpClientResponse response = await request.close(); if (response.statusCode == 200) { final String responseBody = await response.transform(utf8.decoder).join(); var data = jsonDecode(responseBody); // Pretty-print the JSON data final String prettyJson = JsonEncoder.withIndent(' ').convert(data); print('Player Details - Chelsea Transfer Activities:\n$prettyJson'); } else { print('Failed to fetch data. Status code: ${response.statusCode}'); } client.close(); // Close the HTTP client } catch (e) { print('An error occurred: $e'); } } void main() { fetchTransfers(); }
Player Details - Chelsea Transfer Activities: { "data": [ { "id": 400384, "sport_id": 1, "player_id": 1601, "type_id": 218, "from_team_id": 18, "to_team_id": 51, "position_id": 25, "detailed_position_id": 155, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": null, "player": { "id": 1601, "country_id": 462, "sport_id": 1, "city_id": 57413, "position_id": 25, "detailed_position_id": 155, "nationality_id": 462, "name": "Ben Chilwell", "image_path": "https://cdn.sportmonks.com/images/soccer/players/1/1601.png" } }, { "id": 400387, "sport_id": 1, "player_id": 163152, "type_id": 218, "from_team_id": 18, "to_team_id": 113, "position_id": 27, "detailed_position_id": 163, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": 5500000, "player": { "id": 163152, "country_id": 20, "sport_id": 1, "city_id": 95555, "position_id": 27, "detailed_position_id": 163, "nationality_id": 20, "name": "João Félix Sequeira", "image_path": "https://cdn.sportmonks.com/images/soccer/players/16/163152.png" } }, { "id": 400359, "sport_id": 1, "player_id": 100385, "type_id": 218, "from_team_id": 18, "to_team_id": 15, "position_id": 25, "detailed_position_id": 148, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": 6000000, "player": { "id": 100385, "country_id": 17, "sport_id": 1, "city_id": 32744, "position_id": 25, "detailed_position_id": 148, "nationality_id": 17, "name": "Axel Disasi", "image_path": "https://cdn.sportmonks.com/images/soccer/players/1/100385.png" } }, { "id": 400347, "sport_id": 1, "player_id": 37668618, "type_id": 219, "from_team_id": 108, "to_team_id": 18, "position_id": 26, "detailed_position_id": 153, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": 15000000, "player": { "id": 37668618, "country_id": 17, "sport_id": 1, "city_id": null, "position_id": 26, "detailed_position_id": 153, "nationality_id": 17, "name": "Mathis Amougou", "image_path": "https://cdn.sportmonks.com/images/soccer/players/10/37668618.png" } }, { "id": 731, "sport_id": 1, "player_id": 31626713, "type_id": 218, "from_team_id": 18, "to_team_id": 68, "position_id": 26, "detailed_position_id": 153, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": null, "player": { "id": 31626713, "country_id": 143, "sport_id": 1, "city_id": null, "position_id": 26, "detailed_position_id": 153, "nationality_id": 462, "name": "Carney Chukwuemeka", "image_path": "https://cdn.sportmonks.com/images/soccer/players/25/31626713.png" } }, { "id": 709, "sport_id": 1, "player_id": 37525712, "type_id": 218, "from_team_id": 18, "to_team_id": 25, "position_id": 25, "detailed_position_id": 155, "date": "2025-02-03", "career_ended": false, "completed": true, "amount": null, "player": { "id": 37525712, "country_id": 3483, "sport_id": 1, "city_id": null, "position_id": 25, "detailed_position_id": 155, "nationality_id": 3483, "name": "Caleb Wiley", "image_path": "https://cdn.sportmonks.com/images/soccer/players/16/37525712.png" } }, { "id": 623, "sport_id": 1, "player_id": 37445077, "type_id": 219, "from_team_id": 18, "to_team_id": 613, "position_id": 26, "detailed_position_id": 153, "date": "2025-02-02", "career_ended": false, "completed": true, "amount": 13000000, "player": { "id": 37445077, "country_id": 251, "sport_id": 1, "city_id": null, "position_id": 26, "detailed_position_id": 153, "nationality_id": 251, "name": "Cesare Casadei", "image_path": "https://cdn.sportmonks.com/images/soccer/players/21/37445077.png" } }, { "id": 399383, "sport_id": 1, "player_id": 37593154, "type_id": 218, "from_team_id": 18, "to_team_id": 625, "position_id": 25, "detailed_position_id": 148, "date": "2025-01-27", "career_ended": false, "completed": true, "amount": 4000000, "player": { "id": 37593154, "country_id": 20, "sport_id": 1, "city_id": null, "position_id": 25, "detailed_position_id": 148, "nationality_id": 20, "name": "Renato De Palma Veiga", "image_path": "https://cdn.sportmonks.com/images/soccer/players/2/37593154.png" } }, { "id": 346288, "sport_id": 1, "player_id": 24817084, "type_id": 9688, "from_team_id": 3285, "to_team_id": 18, "position_id": 24, "detailed_position_id": null, "date": "2024-12-31", "career_ended": false, "completed": true, "amount": null, "player": { "id": 24817084, "country_id": 1233, "sport_id": 1, "city_id": null, "position_id": 24, "detailed_position_id": 24, "nationality_id": 1233, "name": "Lucas Bergström", "image_path": "https://cdn.sportmonks.com/images/soccer/players/28/24817084.png" } }, { "id": 391372, "sport_id": 1, "player_id": 37631362, "type_id": 219, "from_team_id": 128597, "to_team_id": 18, "position_id": 25, "detailed_position_id": 154, "date": "2024-12-19", "career_ended": false, "completed": true, "amount": null, "player": { "id": 37631362, "country_id": 462, "sport_id": 1, "city_id": 51663, "position_id": 25, "detailed_position_id": 154, "nationality_id": 462, "name": "Joshua Kofi Acheampong", "image_path": "https://cdn.sportmonks.com/images/soccer/players/2/37631362.png" } }, { "id": 383772, "sport_id": 1, "player_id": 37555964, "type_id": 218, "from_team_id": 18, "to_team_id": 3897, "position_id": 27, "detailed_position_id": 151, "date": "2024-09-13", "career_ended": false, "completed": true, "amount": null, "player": { "id": 37555964, "country_id": 23, "sport_id": 1, "city_id": null, "position_id": 27, "detailed_position_id": 151, "nationality_id": 23, "name": "David Datro Fofana", "image_path": "https://cdn.sportmonks.com/images/soccer/players/28/37555964.png" } }, { "id": 381503, "sport_id": 1, "player_id": 37544802, "type_id": 219, "from_team_id": 18, "to_team_id": 2506, "position_id": 27, "detailed_position_id": 156, "date": "2024-09-02", "career_ended": false, "completed": true, "amount": 23000000, "player": { "id": 37544802, "country_id": 5, "sport_id": 1, "city_id": null, "position_id": 27, "detailed_position_id": 156, "nationality_id": 5, "name": "Ângelo Gabriel Borges Damaceno", "image_path": "https://cdn.sportmonks.com/images/soccer/players/2/37544802.png" } }, { "id": 381310, "sport_id": 1, "player_id": 538034, "type_id": 218, "from_team_id": 14, "to_team_id": 18, "position_id": 27, "detailed_position_id": 152, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "player": { "id": 538034, "country_id": 462, "sport_id": 1, "city_id": 51663, "position_id": 27, "detailed_position_id": 152, "nationality_id": 462, "name": "Jadon Sancho", "image_path": "https://cdn.sportmonks.com/images/soccer/players/18/538034.png" } }, { "id": 381269, "sport_id": 1, "player_id": 537117, "type_id": 218, "from_team_id": 18, "to_team_id": 51, "position_id": 25, "detailed_position_id": 148, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "player": { "id": 537117, "country_id": 5724, "sport_id": 1, "city_id": 30078, "position_id": 25, "detailed_position_id": 148, "nationality_id": 462, "name": "Trevoh Chalobah", "image_path": "https://cdn.sportmonks.com/images/soccer/players/29/537117.png" } }, { "id": 381137, "sport_id": 1, "player_id": 23697427, "type_id": 218, "from_team_id": 18, "to_team_id": 13, "position_id": 27, "detailed_position_id": 151, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "player": { "id": 23697427, "country_id": 462, "sport_id": 1, "city_id": 84211, "position_id": 27, "detailed_position_id": 151, "nationality_id": 2454, "name": "Armando Broja", "image_path": "https://cdn.sportmonks.com/images/soccer/players/19/23697427.png" } }, { "id": 381135, "sport_id": 1, "player_id": 802, "type_id": 218, "from_team_id": 18, "to_team_id": 19, "position_id": 27, "detailed_position_id": 152, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "player": { "id": 802, "country_id": 1640, "sport_id": 1, "city_id": 44509, "position_id": 27, "detailed_position_id": 156, "nationality_id": 462, "name": "Raheem Shaquille Sterling", "image_path": "https://cdn.sportmonks.com/images/soccer/players/2/802.png" } }, { "id": 380554, "sport_id": 1, "player_id": 538472, "type_id": 218, "from_team_id": 18, "to_team_id": 686, "position_id": 24, "detailed_position_id": null, "date": "2024-08-30", "career_ended": false, "completed": true, "amount": null, "player": { "id": 538472, "country_id": 296, "sport_id": 1, "city_id": null, "position_id": 24, "detailed_position_id": null, "nationality_id": 296, "name": "Đorđe Petrović", "image_path": "https://cdn.sportmonks.com/images/soccer/players/8/538472.png" } }, { "id": 380003, "sport_id": 1, "player_id": 995, "type_id": 219, "from_team_id": 18, "to_team_id": 597, "position_id": 27, "detailed_position_id": 151, "date": "2024-08-29", "career_ended": false, "completed": true, "amount": 30000000, "player": { "id": 995, "country_id": 556, "sport_id": 1, "city_id": 3110, "position_id": 27, "detailed_position_id": null, "nationality_id": 556, "name": "Romelu Lukaku Menama", "image_path": "https://cdn.sportmonks.com/images/soccer/players/3/995.png" } }, { "id": 379976, "sport_id": 1, "player_id": 6599974, "type_id": 219, "from_team_id": 18, "to_team_id": 397, "position_id": 26, "detailed_position_id": 150, "date": "2024-08-29", "career_ended": false, "completed": true, "amount": 1000000, "player": { "id": 6599974, "country_id": 462, "sport_id": 1, "city_id": 70548, "position_id": 26, "detailed_position_id": 150, "nationality_id": 462, "name": "Faustino Anjorin", "image_path": "https://cdn.sportmonks.com/images/soccer/players/6/6599974.png" } }, { "id": 379969, "sport_id": 1, "player_id": 186606, "type_id": 218, "from_team_id": 18, "to_team_id": 52, "position_id": 24, "detailed_position_id": null, "date": "2024-08-29", "career_ended": false, "completed": true, "amount": null, "player": { "id": 186606, "country_id": 32, "sport_id": 1, "city_id": null, "position_id": 24, "detailed_position_id": 24, "nationality_id": 32, "name": "Kepa Arrizabalaga Revuelta", "image_path": "https://cdn.sportmonks.com/images/soccer/players/14/186606.png" } }, { "id": 379633, "sport_id": 1, "player_id": 37590621, "type_id": 218, "from_team_id": 18, "to_team_id": 2709, "position_id": 24, "detailed_position_id": null, "date": "2024-08-28", "career_ended": false, "completed": true, "amount": null, "player": { "id": 37590621, "country_id": 556, "sport_id": 1, "city_id": null, "position_id": 24, "detailed_position_id": null, "nationality_id": 556, "name": "Mike Penders", "image_path": "https://cdn.sportmonks.com/images/soccer/players/29/37590621.png" } }, { "id": 379576, "sport_id": 1, "player_id": 37590621, "type_id": 219, "from_team_id": 2709, "to_team_id": 18, "position_id": 24, "detailed_position_id": null, "date": "2024-08-27", "career_ended": false, "completed": true, "amount": 20000000, "player": { "id": 37590621, "country_id": 556, "sport_id": 1, "city_id": null, "position_id": 24, "detailed_position_id": null, "nationality_id": 556, "name": "Mike Penders", "image_path": "https://cdn.sportmonks.com/images/soccer/players/29/37590621.png" } }, { "id": 376885, "sport_id": 1, "player_id": 1494245, "type_id": 219, "from_team_id": 18, "to_team_id": 7980, "position_id": 26, "detailed_position_id": 153, "date": "2024-08-21", "career_ended": false, "completed": true, "amount": 42000000, "player": { "id": 1494245, "country_id": 462, "sport_id": 1, "city_id": null, "position_id": 26, "detailed_position_id": 153, "nationality_id": 462, "name": "Conor Gallagher", "image_path": "https://cdn.sportmonks.com/images/soccer/players/5/1494245.png" } }, { "id": 376890, "sport_id": 1, "player_id": 163152, "type_id": 219, "from_team_id": 7980, "to_team_id": 18, "position_id": 27, "detailed_position_id": 163, "date": "2024-08-21", "career_ended": false, "completed": true, "amount": 49200000, "player": { "id": 163152, "country_id": 20, "sport_id": 1, "city_id": 95555, "position_id": 27, "detailed_position_id": 163, "nationality_id": 20, "name": "João Félix Sequeira", "image_path": "https://cdn.sportmonks.com/images/soccer/players/16/163152.png" } }, { "id": 376883, "sport_id": 1, "player_id": 37259181, "type_id": 218, "from_team_id": 18, "to_team_id": 27, "position_id": 25, "detailed_position_id": 148, "date": "2024-08-21", "career_ended": false, "completed": true, "amount": null, "player": { "id": 37259181, "country_id": 462, "sport_id": 1, "city_id": null, "position_id": 25, "detailed_position_id": null, "nationality_id": 462, "name": "Bashir Humphreys", "image_path": "https://cdn.sportmonks.com/images/soccer/players/13/37259181.png" } } ], "pagination": { "count": 25, "per_page": 25, "current_page": 1, "next_page": "https://api.sportmonks.com/v3/football/transfers/teams/18?include=player%3Aname%2Cimage_path&page=2", "has_more": true }, "subscription": [ { "meta": { "trial_ends_at": "2024-10-16 14:50:45", "ends_at": null, "current_timestamp": 1739187793 }, "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": 3538, "remaining": 2998, "requested_entity": "Transfer" }, "timezone": "UTC" }
Conclusion
Over the course of the chapters, we were able to showcase how Dart can be used to harness football transfer activities for any club of interest.
We also made use of two separate endpoints from Sportmonks’ Football API, namely Teams and Players, to retrieve participating club names and player details for a more refined result, which we presented in text format, rather than JSON.
Despite being unpopular, there seems to be no limit to what you can achieve with Dart and Sportmonks’ Football API when it comes to creating mind-blowing sports-related apps.
In the next Deverlopers’ guide, we will explore another programming language named Crystal with our robust Football API which offers coverage for more than 2300 leagues. In the meantime, go ahead and explore the treasure trove of football-related data from our list of endpoints!
FAQ
- Create an account on My Sportmonks and get immediate access to our free plan.
- Subscribe to one of our paid plans and receive a one-time-only 14-day free trial.

How to Build soccer player data profiles using Sportmonks Football API

Manchester City vs Liverpool Predictions with Sportmonks data

Who is the favourite to become Europa League champions based on Sportmonks data?

Serie A Predictions: Who is the favourite to become Serie A champions based on sportmonks data?
