Fixtures
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
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.
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: t
he date and time the fixture was last processed
has_odds:
indicates if the fixture has odds available
starting_at_timestamp
: the starting timestamp
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?
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.
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 YYYY-MM-DD format: date/YYYY-MM-DD.
https://api.sportmonks.com/v3/football/fixtures/
date/{YYYY-MM-DD}
For example, if you're interested in the fixtures on the 3rd of September 2022:
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 YYYY-MM-DD format: between/date/YYYY-MM-DD/YYYY-MM-DD
https://api.sportmonks.com/v3/football/fixtures/
between/date/YYYY-MM-DD/YYYY-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, the schedule endpoints are better if you want all the fixtures of a particular league in the current season.
If you want to find out which matches a certain team has to play, the next endpoint is for you.
All you have to do is parse two dates in YYYY-MM-DD format and a team ID: between/date/YYYY-MM-DD/YYYY-MM-DD/{team_id}
https://api.sportmonks.com/v3/football/fixtures/
between/date/YYYY-MM-DD/YYYY-MM-DD/{team_id}
For example, if you're interested in the fixtures in the month of September for Celtic:
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).
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.
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.
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
scores
participants
statistics.type
events
lineups
For example if you want the above info for Celtic vs Rangers:
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
.
In the next chapter we will learn more about teams, players, coaches and referees. Let’s keep going!
The 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 for more info.
A kind reminder: At the , you can use include fixtures
to get all fixtures belonging to the schedule of a certain season and/or team.
In the previous endpoint, you can retrieve all the fixtures in our API. The endpoint returns the single fixture you’ve requested by id. All you have to do is parse the fixture_id.
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/fixture_ids.
Okay, that is nice. However, you want to show all matches in the upcoming weekend, the upcoming week or even the upcoming month and beyond. Well, that is easy as well. Please proceed to our next endpoint: .
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 .
Let’s say we want to know only the matches Celtic will play or has played in a certain month. We can use to do so. How?
Another interesting fixture endpoint is the 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!
You can get the team ids via the .
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
The last fixture endpoint is . Let’s find out about that endpoint now shall we?
As you’ve learnt in the 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 . The most common includes are:
In our 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.
Check our for more tips and tricks.