Fixtures

The fixtures endpoints are one of the most used endpoints of our API. There are multiple options to retrieve the fixtures within your subscription. The fixtures’ endpoints are divided into ten categories.

This section will briefly discuss all the options available to request fixtures.

An overview of all available options:

  • GET All Fixtures: returns all the fixtures accessible within your subscription.

  • GET Fixture by ID: returns the single fixture you’ve requested by ids.

  • GET Fixtures by Multiple IDs: returns the fixtures you’ve requested by ids.

  • GET Fixture by Date Range: returns the fixtures you’ve requested by date range.

  • GET Fixture by Date: returns the fixtures you’ve requested by a single date.

  • GET Fixture by Date Range for Team: returns the fixtures you’ve requested by date range for a specific team.

  • GET Fixture by Head To Head: returns the head-to-head fixtures of the two teams you’ve requested.

  • GET Fixture by Search by Name: returns all fixtures that match your search query.

  • GET Upcoming Fixtures by Market ID: returns upcoming fixtures you've requested by Market ID.

  • GET Fixture by Last Updated Fixtures: returns all the games that have received updates within 2 hours.

Please note that you must use one of our livescores endpoint for in-play fixtures.

For the fixtures endpoints this is the base URL:

https://api.sportmonks.com/v3/football/fixtures/

Per endpoint the rest of the URL requires additional information. We will explain this per endpoint.

Requesting fixtures

GET All Fixtures

The GET All Fixtures endpoint returns all the fixtures accessible within your subscription. This endpoint will come in handy when you are filling your database and want to retrieve all fixture ids.

The URL to retrieve all your fixtures is the same as the base URL. All you have to do is authorize the request with your API token. Check our authentication section for more info.

https://api.sportmonks.com/v3/football/fixtures?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 216268,
      "sport_id": 1,
      "league_id": 271,
      "season_id": 1273,
      "stage_id": 1086,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 23332,
      "state_id": 5,
      "venue_id": 618,
      "name": "Esbjerg vs OB",
      "starting_at": "2006-03-25 16:00:00",
      "result_info": "Game ended in draw.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2022-11-15 17:52:42",
      "has_odds": false,
      "starting_at_timestamp": 1143302400
    },
    {
      "id": 216269,
      "sport_id": 1,
      "league_id": 271,
      "season_id": 1273,
      "stage_id": 1086,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 23329,
      "state_id": 5,
      "venue_id": 85765,
      "name": "AaB vs København",
      "starting_at": "2005-11-27 16:30:00",
      "result_info": "Game ended in draw.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2022-11-15 17:52:42",
      "has_odds": false,
      "starting_at_timestamp": 1133109000
    },
//And more    

Let’s evaluate the response:

  • id: the unique fixture id

  • sport_id: the sport related to the fixture

  • league_id: the league the fixture belongs to

  • season_id: refers to the season the fixture belongs to

  • stage_id: refers to the stage the fixture is played in

  • group_id: refers to the group the fixture is played in

  • aggregate_id: refers to the aggregate the fixture is played at

  • round_id: refers to the round the fixture is played at

  • state_id: refers to the state the fixture is played at

  • venue_id: refers to the venue the fixture is played at

  • name: represents the name of the fixture

  • starting_at: datetime object representing the start time

  • result_info: textual representation of the final result info

  • leg: represents the leg of the fixture

  • details: represents details about the fixture

  • length: length of the fixture (minutes)

  • placeholder: indicates if the fixture is a placeholder

  • last_processed_at: the date and time the fixture was last processed

  • has_odds: indicates if the fixture has odds available

  • starting_at_timestamp: the starting timestamp

A kind reminder: At the schedules endpoints, you can use include fixtures to get all fixtures belonging to the schedule of a certain season and/or team.

GET Fixture by ID

In the previous endpoint, you can retrieve all the fixtures in our API. The GET Fixture by ID endpoint returns the single fixture you’ve requested by id. All you have to do is parse the fixture_id.

https://api.sportmonks.com/v3/football/fixtures/{fixture_id}

Let’s look at the Celtic vs Rangers game (fixture id: 18535517) of the 2022/2023 season.

https://api.sportmonks.com/v3/football/fixtures/18535517?api_token=YOUR_TOKEN
Response
{
  "data": {
    "id": 18535517,
    "sport_id": 1,
    "league_id": 501,
    "season_id": 19735,
    "stage_id": 77457866,
    "group_id": null,
    "aggregate_id": null,
    "round_id": 274719,
    "state_id": 5,
    "venue_id": 8909,
    "name": "Celtic vs Rangers",
    "starting_at": "2022-09-03 11:30:00",
    "result_info": "Celtic won after full-time.",
    "leg": "1/1",
    "details": null,
    "length": 90,
    "placeholder": false,
    "last_processed_at": "2023-03-02 17:47:38",
    "has_odds": true,
    "starting_at_timestamp": 1662204600
  },

This endpoint comes in handy when you want to have the data of a specific fixture. But what if you want to get multiple fixtures simultaneously?

GET Fixture by Multiple ID's

This endpoint returns the fixtures you’ve requested by ids. It is the same as the previous endpoint, except that you can now use multiple ids to get multiple fixtures in one response. Handy for displaying only the fixtures you're interested in. All you have to do is parse multi/ixture_ids.

https://api.sportmonks.com/v3/football/fixtures/multi/{list_of_fixture_ids}

Let’s look at the Celtic vs Rangers game (fixture id: 18535517) and København vs Brøndby (fixture id: 18531147) of the 2022/2023 season.

https://api.sportmonks.com/v3/football/fixtures/multi/18535517,18531147?api_token=YOUR_TOKEN

Please note that you separate the fixtures by a comma.

Response
{
  "data": [
    {
      "id": 18531147,
      "sport_id": 1,
      "league_id": 271,
      "season_id": 19686,
      "stage_id": 77457696,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274234,
      "state_id": 5,
      "venue_id": 5655,
      "name": "København vs Brøndby",
      "starting_at": "2022-08-07 14:00:00",
      "result_info": "Game ended in draw.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:48:04",
      "has_odds": true,
      "starting_at_timestamp": 1659880800
    },
    {
      "id": 18535517,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 19735,
      "stage_id": 77457866,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274719,
      "state_id": 5,
      "venue_id": 8909,
      "name": "Celtic vs Rangers",
      "starting_at": "2022-09-03 11:30:00",
      "result_info": "Celtic won after full-time.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:47:38",
      "has_odds": true,
      "starting_at_timestamp": 1662204600
    }
  ],

Okay, that is nice. However, you want to show all matches in the upcoming weekend, the upcoming week or even the upcoming month and even beyond. Well, that is easy as well. Please proceed to our next endpoint: GET fixtures by Date.

GET Fixture by Date

Returns all the fixtures from your requested date. Let’s say you need all the fixtures of a specific date (be it in the past or the future). All you have to do is parse the date in YY-MM-DD format: date/YY-MM-DD.

https://api.sportmonks.com/v3/football/fixtures/date/{YY-MM-DD}

For example if you're interested in the fixtures on the 3rd of September 2022:

https://api.sportmonks.com/v3/football/fixtures/date/2022-09-03?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 18535517,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 19735,
      "stage_id": 77457866,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274719,
      "state_id": 5,
      "venue_id": 8909,
      "name": "Celtic vs Rangers",
      "starting_at": "2022-09-03 11:30:00",
      "result_info": "Celtic won after full-time.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:47:38",
      "has_odds": true,
      "starting_at_timestamp": 1662204600
    },
    {
      "id": 18535521,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 19735,
      "stage_id": 77457866,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274719,
      "state_id": 5,
      "venue_id": 8908,
      "name": "Ross County vs Aberdeen",
      "starting_at": "2022-09-03 14:00:00",
      "result_info": "Game ended in draw.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:47:38",
      "has_odds": true,
      "starting_at_timestamp": 1662213600
    },
    {
      "id": 18535522,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 19735,
      "stage_id": 77457866,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274719,
      "state_id": 5,
      "venue_id": 219,
      "name": "St. Johnstone vs St. Mirren",
      "starting_at": "2022-09-03 14:00:00",
      "result_info": "St. Johnstone won after full-time.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:47:38",
      "has_odds": true,
      "starting_at_timestamp": 1662213600
    },
//And more!  

So, a year has 365 days, which means 365 dates. What if you need all matches for a whole month? Easy, check out the following endpoint Get Fixtures by Date Range.

GET Fixture by Date Range

In the last endpoint, we discussed how to get the matches starting on 2022-09-03. What if I want all fixtures for the whole month? This endpoint is perfect for this.

All you have to do is parse two dates in YY-MM-DD format: between/date/YY-MM-DD/YY-MM-DD

https://api.sportmonks.com/v3/football/fixtures/between/date/YY-MM-DD/YY-MM-DD

For example, if you're interested in the fixtures in the month of September

https://api.sportmonks.com/v3/football/fixtures/between/2022-09-01/2022-09-30?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 18531170,
      "sport_id": 1,
      "league_id": 271,
      "season_id": 19686,
      "stage_id": 77457696,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274238,
      "state_id": 5,
      "venue_id": 5655,
      "name": "København vs Silkeborg",
      "starting_at": "2022-09-02 17:00:00",
      "result_info": "København won after full-time.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:48:04",
      "has_odds": true,
      "starting_at_timestamp": 1662138000
    },
    {
      "id": 18531172,
      "sport_id": 1,
      "league_id": 271,
      "season_id": 19686,
      "stage_id": 77457696,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274238,
      "state_id": 5,
      "venue_id": 1576,
      "name": "Lyngby vs Randers",
      "starting_at": "2022-09-04 12:00:00",
      "result_info": "Randers won after full-time.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:48:03",
      "has_odds": true,
      "starting_at_timestamp": 1662292800
    },
//And more!  

This works great for a certain period of time. However, if you want all fixtures of a particular league in the current season, the schedule endpoints will suit you better.

Let’s say you want to find out which matches a certain team has to play. This next endpoint will be the one for you.

GET Fixture by Date Range for Team

Let’s say we only want to know the matches Celtic will play/has played in a certain month. We can use this endpoint to do so. How?

All you have to do is parse two dates in YY-MM-DD format and a team id: between/date/YY-MM-DD/YY-MM-DD/{team_id}

https://api.sportmonks.com/v3/football/fixtures/between/date/YY-MM-DD/YY-MM-DD/{team_id}

For example, if you're interested in the fixtures in the month of September for Celtic:

https://api.sportmonks.com/v3/football/fixtures/between/2022-09-01/2022-09-30/53?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 18535517,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 19735,
      "stage_id": 77457866,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274719,
      "state_id": 5,
      "venue_id": 8909,
      "name": "Celtic vs Rangers",
      "starting_at": "2022-09-03 11:30:00",
      "result_info": "Celtic won after full-time.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:47:38",
      "has_odds": true,
      "starting_at_timestamp": 1662204600
    },
    {
      "id": 18535534,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 19735,
      "stage_id": 77457866,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274721,
      "state_id": 5,
      "venue_id": 8879,
      "name": "St. Mirren vs Celtic",
      "starting_at": "2022-09-18 11:00:00",
      "result_info": "St. Mirren won after full-time.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:47:38",
      "has_odds": true,
      "starting_at_timestamp": 1663498800
    }

Another interesting fixture endpoint is the GET Fixture by Head To Head endpoint. Let’s say you see the Rangers vs Celtic is coming up next weekend, and you want to show all kinds of matches, stats, and events between the two of them. Let’s check it out!

GET Fixture by Head to Head

The Old Firm is coming up soon, and we want to find out about the results in the past. This H2H endpoint shows you all matches between the two. You will need to add head-to-head and two team ids to your request.

https://api.sportmonks.com/v3/football/fixtures/head-to-head/{team_id}/{team_id}

For example, Rangers vs Celtic:

https://api.sportmonks.com/v3/football/fixtures/head-to-head/62/53?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 18535605,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 19735,
      "stage_id": 77457866,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274733,
      "state_id": 5,
      "venue_id": 8914,
      "name": "Rangers vs Celtic",
      "starting_at": "2023-01-02 12:30:00",
      "result_info": "Game ended in draw.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:47:37",
      "has_odds": true,
      "starting_at_timestamp": 1672662600
    },
    {
      "id": 18535517,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 19735,
      "stage_id": 77457866,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274719,
      "state_id": 5,
      "venue_id": 8909,
      "name": "Celtic vs Rangers",
      "starting_at": "2022-09-03 11:30:00",
      "result_info": "Celtic won after full-time.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 17:47:38",
      "has_odds": true,
      "starting_at_timestamp": 1662204600
    },
    //And more

You can see all results and dates between the two teams, but there is more information. There are many includes you can use to get more information. We will explain a couple of them later (at the bottom of this page).

You can get the team ids via the team endpoints.

GET Fixture by Search by Name

Returns all the fixtures that match your search query. Will come in handy when you know which teams face each other, but you do not have a fixture id. To search on fixture name, you’ll need to add /search/{search_query} to the base URL:

https://api.sportmonks.com/v3/football/fixtures/search/{search_query}

For example, Rangers' fixtures:

https://api.sportmonks.com/v3/football/fixtures/search/Rangers?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 234028,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 825,
      "stage_id": 1548,
      "group_id": 225188,
      "aggregate_id": null,
      "round_id": 27005,
      "state_id": 5,
      "venue_id": 8914,
      "name": "Rangers vs Hearts",
      "starting_at": "2017-05-13 11:15:00",
      "result_info": "Game ended in draw.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 18:15:56",
      "has_odds": true,
      "starting_at_timestamp": 1494674100
    },
    {
      "id": 234035,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 825,
      "stage_id": 1548,
      "group_id": 225188,
      "aggregate_id": null,
      "round_id": 27006,
      "state_id": 5,
      "venue_id": 8914,
      "name": "Rangers vs Aberdeen",
      "starting_at": "2017-05-17 18:45:00",
      "result_info": "Game ended in draw.",
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-02 18:15:56",
      "has_odds": true,
      "starting_at_timestamp": 1495046700
    },

Keep in mind that if you would look for Manchester, Roma, or Rangers, you will receive all teams that have to do with this search query. For example, Manchester United, Manchester City, AS Roma and Lazio Roma. Only teams competing in leagues in your subscription will come up.

The more complete your search query is, the more relevant response you’ll get.

GET Upcoming Fixtures by Market ID

Returns all upcoming fixtures from your requested market ID. This comes in handy when you know which market you are interested in, and you want to have all matches that have data for that specific market. More information about markets can be found in the odds tutorials.

You’ll need to add upcoming/markets/{market_id} to the base URL:

https://api.sportmonks.com/v3/football/fixtures/upcoming/markets/{market_id}

For example, I want to have all matches that have odds for the market “Fulltime Result”, which has Market id 1.

https://api.sportmonks.com/v3/football/fixtures/upcoming/markets/1?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 18531241,
      "sport_id": 1,
      "league_id": 271,
      "season_id": 19686,
      "stage_id": 77457696,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274250,
      "state_id": 1,
      "venue_id": 1708,
      "name": "AGF vs Horsens",
      "starting_at": "2023-03-03 18:00:00",
      "result_info": null,
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-03 08:20:10",
      "has_odds": true,
      "starting_at_timestamp": 1677866400
    },
    {
      "id": 18537991,
      "sport_id": 1,
      "league_id": 501,
      "season_id": 19735,
      "stage_id": 77457866,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 275093,
      "state_id": 1,
      "venue_id": 8908,
      "name": "Ross County vs Motherwell",
      "starting_at": "2023-03-04 15:00:00",
      "result_info": null,
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-03 00:15:27",
      "has_odds": true,
      "starting_at_timestamp": 1677942000
    },
//And more!  

The last fixture endpoint is GET Latest Updated Fixtures. Let’s find out about that endpoint now shall we?

GET Last Updated Fixtures

To help you keep your data in sync, we have implemented an endpoint that returns you all the games that have received updates within 10 seconds. This will also imply games that have an updated lineup, score, event, and so on.

You’ll need to add /latest to the base URL:

https://api.sportmonks.com/v3/football/fixtures/latest

https://api.sportmonks.com/v3/football/fixtures/latest?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 18531241,
      "sport_id": 1,
      "league_id": 271,
      "season_id": 19686,
      "stage_id": 77457696,
      "group_id": null,
      "aggregate_id": null,
      "round_id": 274250,
      "state_id": 1,
      "venue_id": 1708,
      "name": "AGF vs Horsens",
      "starting_at": "2023-03-03 18:00:00",
      "result_info": null,
      "leg": "1/1",
      "details": null,
      "length": 90,
      "placeholder": false,
      "last_processed_at": "2023-03-03 08:20:10",
      "has_odds": true,
      "starting_at_timestamp": 1677866400
    }
  ],
//And more!  

Adding useful information

As you’ve learnt in the includes tutorial, you can enrich your request with includes. This section will discuss some of the most common requests used on the fixtures endpoints.

First of all, you can find a list of all available includes on the endpoint pages. The most common includes are:

  • scres

  • participants

  • statistics.type

  • events

  • lineups

For example if you want the above info for Celtic vs Rangers:

https://api.sportmonks.com/v3/football/fixtures/18535517?api_token=YOUR_TOKEN&include=scores;participants;statistics.type;events;lineup

Selecting and filtering

In our filtering tutorial you’ve learnt how to select specific fields or filter only on the data you’re interested in. Our API returns a set of data related to the fixtures by default. We can imagine you’re not interested in all the data the API returns.

Let’s say you’re only interested in the result of the Celtic vs Rangers game of the 2022/2023 season. You can add the &select= parameter followed by the fields you want to get. In this case the result_info.

https://api.sportmonks.com/v3/football/18535517??api_token=YOUR_TOKEN&select=result_info
Response
{
  "data": {
    "result_info": "Celtic won after full-time.",
    "id": 18535517,
    "sport_id": 1,
    "round_id": 274719,
    "stage_id": 77457866,
    "group_id": null,
    "aggregate_id": null,
    "league_id": 501,
    "season_id": 19735,
    "venue_id": 8909,
    "state_id": 5,
    "starting_at_timestamp": null
  },

Check our filtering tutorial for more tips and tricks.

In the next chapter we will learn more about teams, players, coaches and referees. Let’s keep going!

Last updated