Get Started

Welcome to the get started page of our Football API 2.0. You’re only a few steps away from requesting and receiving API responses for your football application.

Overview

  1. What is Football API 2.0?

  2. Authentication

  3. Your first request

  4. Get your football data

  5. What can you do with the data?

  6. Different plans and data features

What is Football API 2.0?

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

  • Incredibly fast livescores

  • Reliable and accurate data

Authentication

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 and manage your API tokens Mysportmonks. For the sake of simplicity, we’ll be working with an API token within the ‘free plan’. The free plan includes the Danish Superliga (league id: 271) and the Scottish Premiership (league id: 501).

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. With our brand-new token, we can make our first request! But before we start let us explain which possible responses can be returned. When making a request, a code response will always be returned. See below for a shortlist of possible code responses:

Code number

Description

200

Successful request and data was returned

400

Part of the request is malformed; the exact reason can be found in the response

401

Request is not authenticated

403

Unauthorized request to access data from an ineligible plan

429

You have reached the response rate limit of your plan

500

Internal error with our servers

Your first request

Now that all prerequisites have been fulfilled, we’re ready to send our first request to the API!

Build the request

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 are leaving 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}

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.

What can you do with the data?

The example above was the most basic request you can create, while our highly flexible football api 2.0 can handle way more advanced requests.

The data our API provides will enable you to create excellent and specialized applications. Down below you will find two examples of Sportmonks’ partners who have made brilliant applications. Throughout our documentation pages you will find more examples, ranging from betting and odds websites to fantasy games and live score tracking websites.

Code libraries

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

Different plans and data features

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.

Last updated