What is Football API 2.0?
Authentication
Your first request
Get your football data
What can you do with the data?
Different plans and data features
Build creative football-related apps with our Football API 2.0. Football API 2.0 is a REST API that can be used to request football data from our expansive database and has the following characteristics:
Highly customizable requests
Reliable and accurate data
We recommend you submit your requests with Postman since we have already prepared the request for you there! Hit the button below to import our Football API collection.
To make our first request, we’ll need a way to get authenticated first. Football API 2.0 utilizes API tokens for the authentication of requests. You can obtain your free API token here. API tokens can be viewed and managed in Mysportmonks. For the sake of simplicity, we’ll be working with an API token from the free plan. The free plan only has the Danish Superliga (league id: 271) and the Scottish Premiership (league id: 501) included.
Example API token: [HdoiD312ND….]
The API token is only meant for your eyes and, as such, should be stored away safely.
Our tokens have no expiration date and will remain valid until you manually delete it yourself.
Football API 2.0 utilizes response codes to indicate successful and failed API requests. When making a request, a code response will always be returned. See below for a short list of possible code responses:
Code number | Description |
| Successful request and data was returned |
| Part of the request is malformed; the exact reason can be found in the response |
| Request is not authenticated |
| Unauthorized request to access data from an ineligible plan |
| You have reached the response rate limit of your plan |
| Internal error with our servers |
With our token in hand, we can finally make the first request!
Now that all prerequisites have been fulfilled, we’re ready to send our first request to the API!
The request consists of the following components:
The base URL
A path parameter, in this example, we use [leagues]
A query string parameter, this is optional, so we leave this out for now
And finally, your API token
https://soccer.sportmonks.com/api/v2.0/
An example of a correctly authenticated request would be:
https://soccer.sportmonks.com/api/v2.0/leagues?api_token={API_TOKEN}
"data": [{"id": 271,"active": true,"type": "domestic","legacy_id": 43,"country_id": 320,"logo_path": "https://cdn.sportmonks.com/images/soccer/leagues/271.png","name": "Superliga","is_cup": false,"current_season_id": 17328,"current_round_id": 199450,"current_stage_id": 77447994,"live_standings": true,"coverage": {"predictions": true,"topscorer_goals": true,"topscorer_assists": true,"topscorer_cards": true}
Field | Description |
| Opens an array of data you've requested |
| A unique league id |
| Indicates if the league is active or not. Possible values are 'true' or 'false' |
| Indicates what kind of league this is. Possible values: 'domestic', 'cup', 'international'. More values can be found here |
| This was for our API version 1.0. It's only of use for old users of our API |
| The unique country id the league is played in |
| The logo URL path of the league |
| The name of the league |
| Indicates if the league is a cup or not. Possible values are 'true' or 'false' |
| The unique id of the current season |
| The unique id of the current round |
| The unique id of the current stage |
| Indicates if the league covers live standings |
| Opens an array of partial coverage for the league |
| Indicates if the league covers predictions |
| Indicates if the league covers goal topscorers |
| Indicates if the league covers assists topscorers |
| Indicates if the league covers cards topscorers |
This request will return all of the leagues eligible for our free plan, which are the Danish Superliga (league id: 271) and the Scottish Premiership (league id: 501). You can view them by clicking on the second tab.
The above example was the most basic of basic requests and our advanced and highly flexible Football API 2.0 can handle much more than that.
With the data that our API provides you, you too will be able to create excellent applications. Here are two examples of SportMonks’ partners who have made brilliant applications. Throughout all our documentation pages you will find more examples, ranging from betting and odds websites to fantasy games and live score tracking websites.
There are various options as to how you’d like to send the request. Our API is compatible with an incredible number of developer languages
SportMonks has various different plans and data features for you. You can learn all about it in the matrix below. In Mysportmonks you can choose your ideal plan and data features.