Getting started

Before you are able to call our API you need a SportMonks account. Register now.

To make our first request, we’ll need a way to get authenticated first. Cricket API 2.0 utilizes API tokens for the authentication of requests. You can obtain and manage your API tokens in Mysportmonks.

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.

Cricket 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:

With our token in hand, we can finally make the first request!

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 leave this out for now

  • And finally, your API token

https://cricket.sportmonks.com/api/v2.0/

An example of a correctly authenticated request would be:

https://cricket.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 Twenty20 International (league id: 3), CSA T20 Challenge (league id: 10) and the Big Bash League (league id: 5).

Last updated