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.
Let’s evaluate the response:
id
: the unique fixture idsport_id
: the sport related to the fixtureleague_id
: the league the fixture belongs toseason_id
: refers to the season the fixture belongs tostage_id
: refers to the stage the fixture is played ingroup_id
: refers to the group the fixture is played inaggregate_id
: refers to the aggregate the fixture is played atround_id
: refers to the round the fixture is played atstate_id
: refers to the state the fixture is played atvenue_id
: refers to the venue the fixture is played atname
: represents the name of the fixturestarting_at
: datetime object representing the start timeresult_info
: textual representation of the final result infoleg
: represents the leg of the fixturedetails
: represents details about the fixturelength
: length of the fixture (minutes)placeholder
: indicates if the fixture is a placeholderlast_processed_at: t
he date and time the fixture was last processedhas_odds:
indicates if the fixture has odds availablestarting_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.
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.
Please note that you separate the fixtures by a comma.
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:
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
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:
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:
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:
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.
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
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:
scores
participants
statistics.type
events
lineups
For example if you want the above info for Celtic vs Rangers:
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
.
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