⚽
API 3.0
OddsCoreFootball APIAPI 2 (Deprecated)WidgetsContact
Football API 3.0
Football API 3.0
  • Welcome
    • 🛬Welcome
    • 🙋‍♂️Getting Started
    • 🤓What can you do with Sportmonks' data?
    • 🆕Differences between API 2 and API 3
      • API Changes
      • Syntax and filters
      • New endpoints and data features
    • 🔐Authentication
    • 👶Making your first request
    • 🔧Best Practices
  • API coach (BETA)
  • Changelog
    • 📄Changelog
    • 📁Changelog (BETA)
  • API
    • 💡Request options
      • Includes
        • Nested includes
      • Selecting fields
      • Filtering
      • Selecting and filtering
      • Ordering and sorting
    • 🔤Syntax
    • ♾️Rate limit
    • 👀Meta description
    • 📔Error codes
      • Include Exceptions
      • Filtering and Complexity Exceptions
      • Other Exceptions
    • 📚Code libraries
    • Translations (beta)
    • Demo response files
    • Data corrections
    • API 2.0 (Deprecated)
  • Endpoints and Entities
    • Endpoints
      • 📡Livescores
        • GET Inplay Livescores
        • GET All Livescores
        • GET Latest Updated Livescores
      • 🥅Fixtures
        • GET All Fixtures
        • GET Fixture by ID
        • GET Fixtures by Multiple IDs
        • GET Fixtures by Date
        • GET Fixtures by Date Range
        • GET Fixtures by Date Range for Team
        • GET Fixtures by Head To Head
        • GET Fixtures by Search by Name
        • GET Upcoming Fixtures by Market ID
        • GET Upcoming Fixtures by TV Station ID
        • GET Past Fixtures by TV Station ID
        • GET Latest Updated Fixtures
      • 🛰️States
        • GET All States
        • GET State by ID
      • ⌨️Types
        • GET All Types
        • GET Type by ID
        • GET Type by Entity
      • 🏆Leagues
        • GET All Leagues
        • GET League by ID
        • GET Leagues by Live
        • GET Leagues by Fixture Date
        • GET Leagues by Country ID
        • GET Leagues Search by Name
        • GET All Leagues by Team ID
        • GET Current Leagues by Team ID
      • 🗓️Seasons
        • GET All Seasons
        • GET Seasons by ID
        • GET Seasons by Team ID
        • GET Seasons by Search by Name
      • 📊Statistics
        • GET Season Statistics by Participant
        • GET Stage Statistics by ID
        • GET Round Statistics by ID
      • 📅Schedules
        • GET Schedules by Season ID
        • GET Schedules by Team ID
        • GET Schedules by Season ID and Team ID
      • 🪜Stages
        • GET All Stages
        • GET Stage by ID
        • GET Stages by Season ID
        • GET Stages by Search by Name
      • 🔂Rounds
        • GET All Rounds
        • GET Round by ID
        • GET Rounds by Season ID
        • GET Rounds by Search by Name
      • 🔢Standings
        • GET All Standings
        • GET Standings by Season ID
        • GET Standings by Round ID
        • GET Standing Correction by Season ID
        • Get Live Standings by League ID
      • 🥇Topscorers
        • GET Topscorers by Season ID
        • GET Topscorers by Stage ID
      • 🏃Teams
        • GET All Teams
        • GET Team by ID
        • GET Teams by Country ID
        • GET Teams by Season ID
        • GET Teams by Search by Name
      • 🧑Players
        • GET All Players
        • GET Player by ID
        • GET Players by Country ID
        • GET Players by Search by Name
        • GET Last Updated Players
      • 🧑‍🦱Team Squads
        • GET Team Squad by Team ID
        • GET Extended Team Squad by Team ID
        • GET Team Squad by Team and Season ID
      • 👨‍🏫Coaches
        • GET All Coaches
        • GET Coach by ID
        • GET Coaches by Country ID
        • GET Coaches Search by Name
        • GET Last Updated Coaches
      • 🕴️Referees
        • GET All Referees
        • GET Referee by ID
        • GET Referees by Country ID
        • GET Referees by Season ID
        • GET Referees Search by Name
      • ↔️Transfers
        • GET All Transfers
        • GET Transfer by ID
        • GET Latest Transfers
        • GET Transfers Between Date Range
        • GET Transfers by Team ID
        • GET Transfers by Player ID
      • 🏟️Venues
        • GET All Venues
        • GET Venue by ID
        • GET Venues by Season ID
        • GET Venues by Search by Name
      • 📺TV Stations
        • GET All TV Stations
        • GET TV Station by ID
        • GET TV Stations by Fixture ID
      • 🔮Expected (xG)
        • GET Expected by Team
        • GET Expected by Player
      • 🔭Predictions
        • GET Probabilities
        • GET Predictability by League ID
        • GET Probabilities by Fixture ID
        • GET Value Bets
        • GET Value Bets by Fixture ID
      • 🧙Standard Odds Feed
        • 👓Pre-match Odds
          • GET All Odds
          • Get Odds by Fixture ID
          • GET Odds by Fixture ID and Bookmaker ID
          • GET Odds by Fixture ID and Market ID
          • GET Last Updated Odds
        • 🧠Inplay Odds
          • GET All Inplay Odds
          • GET Inplay Odds by Fixture ID
          • GET Inplay Odds by Fixture ID and Bookmaker ID
          • GET Inplay Odds by Fixture ID and Market ID
          • GET Last Updated Inplay Odds
      • 🧙‍♂️Premium Odds Feed
        • 🕶️Premium Pre-match Odds
          • GET All Premium Odds
          • Get Premium Odds by Fixture ID
          • GET Premium Odds by Fixture ID and Bookmaker ID
          • GET Premium Odds by Fixture ID and Market ID
          • GET Updated Premium Odds Between Time Range
          • GET Updated Historical Odds Between Time Range
          • GET All Historical Odds
      • 🛒Markets
        • GET All Markets
        • GET All Premium Markets
        • GET Market by ID
        • GET Market by Search
      • 📑Bookmakers
        • GET All Bookmakers
        • GET All Premium Bookmakers
        • GET Bookmaker by ID
        • GET Bookmaker by Search
        • GET Bookmaker by Fixture ID
      • 📰News
        • GET Pre-Match News
        • GET Pre-Match News by Season ID
        • GET Pre-Match News for Upcoming Fixtures
        • GET Post-Match News
        • GET Post-Match News by Season ID
      • ⚔️Rivals
        • GET All Rivals
        • GET Rivals by Team ID
      • 🎙️Commentaries
        • GET All Commentaries
        • GET Commentaries by Fixture ID
    • Entities
      • 🥅Fixture
      • 🏆League, Season, Schedule, Stage and Round
      • 🧑‍🤝‍🧑Team, Player, Squad, Coach and Referee
      • 🔢Statistic
      • 🔮Expected
      • 🥇Standing and Topscorer
      • 🔭Odd and Prediction
      • Other
  • Tutorials and Guides
    • Tutorials
      • Introduction
        • Make your first request
        • Set your time zone
        • Pagination
      • Enrich your response
        • Nested includes
          • Syntax and relations
      • Includes
        • Events
        • States
        • Periods
        • Scores
        • Participants
        • Lineups
        • ballCoordinates
        • Pressure Index
        • Tips and tricks
      • Filter and select fields
        • Selecting fields
        • Filtering
        • Selecting and filtering
      • Leagues and seasons
        • Leagues
        • Seasons
      • Season schedule
        • Schedules
        • Stages
        • Rounds
      • Livescores and fixtures
        • Livescores
        • Fixtures
      • Lineups and formations
      • Statistics
        • Statistics types
        • Season statistics
        • Fixture statistics
        • Team statistics
        • Players statistics
      • Teams, players, coaches and referees
        • Teams
        • Players
        • Coaches
        • Referees
      • Standings
        • Season standings
        • Topscorer standings
      • Odds and predictions
        • Bookmakers
        • Markets
        • Pre-match odds
        • Live(Inplay) odds
        • hasOdds
        • Predictions
          • Probabilities
          • Value Bet
      • Expected
        • Endpoints
        • Includes
        • Coverage
      • News
        • Pre-match News
        • Post-match News
      • Placeholders
      • Timezone parameters on different endpoints
    • Guides
      • How-to use components
      • How-to use the Football API with Postman
      • How-to use the Football API tester
      • How-to use the Football API ID finder
      • How-to build a livescore website
      • How-to use the Predictions API
      • How-to build a match page
      • How-to build a custom plan
      • How-to build a match page with odds
      • How-to use xG data
      • How-to build a news website
      • How-to build a fantasy game guide
      • How-to use the new Champions League data
      • How-to build your World Cup application
      • How-to build a team page
      • How-to keep your database in SYNC
      • How-to use team mode in MySportmonks
    • Programming languages
      • A developers guide: Unleashing the power of the football API with JSON
      • A developers guide: Unleashing the power of the football API with PHP
      • A developers guide: Unleashing the power of the football API with Python
  • Definitions
    • 📔Response Codes
    • 🛰️States
    • ⌨️Types
      • Lineups, positions and formations
      • Events
      • Statistics
        • Coach statistics
        • Referee statistics
        • Stage statistics
        • Season statistics
        • Fixture statistics
        • Team statistics
        • Player statistics
      • Expected
      • Leagues and stages
      • Standings
      • Transfers
      • Highlights
      • Weather and pitch
  • FAQ
    • API 3.0
    • Odds
    • Integration
    • Sportmonks
  • Quicklinks
    • Postman
    • ID Finder
    • Sportmonks
    • MySportmonks
    • Football widgets
    • Plans and Pricing
    • Data features
    • FAQ
Powered by GitBook
On this page
  • Requesting seasons
  • GET All Seasons
  • GET Season by ID
  • GET Season Search by Name
  • Adding useful information
  • Selecting and filtering

Was this helpful?

  1. Tutorials and Guides
  2. Tutorials
  3. Leagues and seasons

Seasons

PreviousLeaguesNextSeason schedule

Last updated 10 months ago

Was this helpful?

YOUR_TOKENYOUR_TOKENEvery league has an active season and, if available, multiple historical seasons. One of the main features of the seasons endpoints is the ability to retrieve full-season games, (historical) fixtures and statistics. This can be achieved by using the proper includes, which we’ll discuss later in this section.

You can gather an overview of all the historical and current seasons available within your subscription. This section will briefly discuss all the options available to request seasons.

An overview of all the options available:

  • GET All Seasons: returns all the historical and active seasons available within your subscription.

  • GET Season by ID: returns the single season you’ve requested by id.

  • GET Seasons by Search by Name: returns all the seasons that match your search query.

Are you interested in a complete schedule? Then maybe our schedule endpoints are what you’re looking for:

For all the seasons endpoints, the base URL is the same:

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

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

Requesting seasons

GET All Seasons

Like in the league’s endpoint, you can retrieve all the available seasons within your subscription. This might come in handy if you want to evaluate which historical seasons are available and what their unique id is.

You can do this via the t.

The URL to get all your season is the same as the base url for seasons. All you have to do is authorize the request with your API token. Check our for more info.

https://api.sportmonks.com/v3/football/seasons?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 759,
      "sport_id": 1,
      "league_id": 271,
      "tie_breaker_rule_id": 169,
      "name": "2016/2017",
      "finished": true,
      "pending": false,
      "is_current": false,
      "starting_at": "2016-07-15",
      "ending_at": "2017-06-01",
      "standings_recalculated_at": "2023-02-13 15:47:07",
      "games_in_current_week": false
    },
    {
      "id": 819,
      "sport_id": 1,
      "league_id": 513,
      "tie_breaker_rule_id": 169,
      "name": "2015/2016",
      "finished": true,
      "pending": false,
      "is_current": false,
      "starting_at": "2016-05-04",
      "ending_at": "2016-05-22",
      "standings_recalculated_at": "2022-09-27 08:13:05.900028",
      "games_in_current_week": false
    },
    {
      "id": 825,
      "sport_id": 1,
      "league_id": 501,
      "tie_breaker_rule_id": 169,
      "name": "2016/2017",
      "finished": true,
      "pending": false,
      "is_current": false,
      "starting_at": "2016-08-06",
      "ending_at": "2017-05-21",
      "standings_recalculated_at": "2023-02-13 15:47:09",
      "games_in_current_week": false
    },

Let’s take a look together at what the API returns. As you can see, the API returns all the seasons available in the free plan.

You can see the name of the season, the unique season id, the id of the league the season belongs to, the season status (current, pending or finished), the start and end date of the season, and how the season winner is determined

Please note that you can also use the seasons include on the league endpoints.

GET Season by ID

This endpoint is useful if you only want information about one particular season. You’ll need to add the season id to your request:

https://api.sportmonks.com/v3/football/seasons/{season_id}

For example, if you’re only interested in the 2022/2023 season of the Scottish Premiership, your request will be:

https://api.sportmonks.com/v3/football/seasons/19735?api_token=YOUR_TOKEN
Response
{
  "data": {
    "id": 19735,
    "sport_id": 1,
    "league_id": 501,
    "tie_breaker_rule_id": 171,
    "name": "2022/2023",
    "finished": false,
    "pending": false,
    "is_current": true,
    "starting_at": "2022-07-30",
    "ending_at": "2023-04-22",
    "standings_recalculated_at": "2023-03-02 00:07:24",
    "games_in_current_week": false
  },

GET Season Search by Name

This endpoint returns all the seasons based on your search query. This might come in handy if you cannot find a season or are interested in a specific year. To search on season name, you’ll need to add /search/{search_query} to the seasons base URL:

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

For example, if you’re only interested in all 2018 seasons, your request will be:

https://api.sportmonks.com/v3/football/seasons/search/2023?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 19686,
      "sport_id": 1,
      "league_id": 271,
      "tie_breaker_rule_id": 171,
      "name": "2022/2023",
      "finished": false,
      "pending": false,
      "is_current": true,
      "starting_at": "2022-07-15",
      "ending_at": "2023-03-19",
      "standings_recalculated_at": "2023-03-02 00:07:22",
      "games_in_current_week": false
    },
    {
      "id": 19735,
      "sport_id": 1,
      "league_id": 501,
      "tie_breaker_rule_id": 171,
      "name": "2022/2023",
      "finished": false,
      "pending": false,
      "is_current": true,
      "starting_at": "2022-07-30",
      "ending_at": "2023-04-22",
      "standings_recalculated_at": "2023-03-02 00:07:24",
      "games_in_current_week": false
    }
  ],

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

Adding useful information

For example, if you’re interested in the league, statistics and fixtures of the Scottish Premiership 2022/2023 season, your request will be:

https://api.sportmonks.com/v3/football/seasons/19735?api_token=YOUR_TOKEN&include=fixtures;statistics;league

Don’t forget you can use nested includes as well. For example fixtures.participants to also include the team names in the response.

Selecting and filtering

We’re going to use the GET All Seasons endpoint for this example.

https://api.sportmonks.com/v3/football/seasons?api_token=YOUR_TOKEN

You can add the &select= parameter followed by the fields you want. In our case: name. This results in the below request and response:

https://api.sportmonks.com/v3/football/seasons?api_token=YOUR_TOKEN&select=name
Response
{
  "data": [
    {
      "name": "2016/2017",
      "id": 759,
      "sport_id": 1,
      "league_id": 271
    },
    {
      "name": "2015/2016",
      "id": 819,
      "sport_id": 1,
      "league_id": 513
    },
    {
      "name": "2016/2017",
      "id": 825,
      "sport_id": 1,
      "league_id": 501
    },

In the next chapter you will learn more about a season’s structure.

Now that you've requested all the seasons, you also know their unique season id. You can use this id in the second option: .

Easy isn’t it? You can now request information per season. Now, let’s imagine you’re looking for all historical 2018 seasons within your subscription. How can you achieve this? The endpoint is perfectly suited for this.

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 season’s endpoints.

First, you can find a list of all available includes on the . For the seasons, the commonly used include is fixtures. This include returns all the fixtures of the requested seasons. You can also request the season statistics or the league related to the season.

In our you’ve learnt how to select specific fields or filter only on the data you’re interested in. By default, our API returns a set of data related to the season. We can imagine you’re not interested in all the season data the API returns. Let’s say you’re only interested in the season name.

Tip: Check our tutorial for more information and tips.

Schedule endpoint.
GET All Seasons endpoin
authentication section
GET Season by ID
GET Seasons by Name
includes tutorial
endpoint pages
filtering tutorial
filtering