LogoLogo
Quick StartFootball APIContactAPI 3.0
  • Welcome
  • Changelog
  • Getting Started
    • Get Started
    • Documentation for the documentation
  • Endpoint overview
    • Continents
      • GET All Continents
      • GET Continent by ID
    • Countries
      • GET All Countries
      • GET Country by ID
    • Leagues
      • GET All Leagues
      • GET League by ID
      • GET Leagues by Country ID
      • Search Leagues by Name
    • Seasons
      • GET All Seasons
      • GET Season by ID
    • Fixtures
      • GET Fixture by ID
      • GET Last Updated Fixtures
      • GET Fixtures by Date
      • GET Fixtures by Date Range
      • GET Fixtures by Date Range for Team
      • GET Fixtures by Multiple ID's
      • GET Deleted Fixtures
    • Statistics
    • Livescores
      • GET All Livescores
      • GET All In play Livescores
    • News API
      • GET All News
      • GET News For Upcoming Fixtures
      • GET News by Season ID
    • Commentaries
      • Commentaries by Fixture ID
    • Video Highlights
      • Get Video Highlights by Fixture ID
    • Head 2 Head
      • GET Head 2 Head by Team IDs
    • Standings
      • GET Standings by Season ID
      • GET LIVE Standings
      • GET Standings by Season ID and Round ID
      • GET Standings by Season and Date(time)
      • GET Standings Corrections by Season ID
    • Teams
      • GET Team by ID
      • GET Teams by Country ID
      • GET Teams by Season ID
      • Search Team by Name
      • GET Current Leagues by Team ID
      • Get All Leagues by Team ID
    • Players
      • GET Player by ID
      • GET Players by Country ID
      • Search Player by Name
    • Topscorers
      • GET Topscorers by Season ID
      • GET Topscorers Aggregated by Season ID
    • Rivals
      • GET Rivals by Team ID
    • Venues
      • GET Venue by ID
      • GET Venues by Season ID
    • Rounds
      • GET Rounds by Season ID
      • GET Round by ID
    • Odds
      • GET Odds by Fixture ID and Bookmaker ID
      • GET Odds by Fixture ID and Market ID
      • GET Odds by Fixture ID
      • GET Inplay Odds by Fixture ID
    • Coaches
      • GET Coach by ID
    • Stages
      • GET Stage by ID
      • GET Stages by Season ID
    • Bookmakers
      • GET All Bookmakers by Fixture ID
      • GET All Bookmakers
      • GET Bookmaker by ID
    • Markets
      • GET All Fixtures by Market ID
      • GET All Markets
      • GET Market by ID
    • Team Squads
      • GET Team Squad by Team and Season ID
    • TV Stations
      • GET TV Station by Fixture ID
    • Prediction API
      • GET Leagues and Performances
      • GET Probabilities
      • GET Probabilities by Fixture ID
      • GET Value Bets
      • GET Value Bet by Fixture ID
  • Tutorials
    • Introduction to our API
      • Make your first request
      • Set your time zone
      • Pagination
    • Enriching your response
      • Includes
      • Nested includes
    • Filtering, limiting & sorting
      • Filtering
      • Limiting
      • Sorting
    • Schedule, fixtures & livescores
      • Season schedule
      • Fixtures
      • Livescores
    • Statistics
      • Match statistics
      • Team statistics
      • Player statistics
      • Season statistics
    • League & topscorers standings
      • League standings
      • Topscorers standings
    • Odds & predictions
      • Odds
        • Odds by fixture, bookmaker and market id
        • FlatOdds
        • InplayOdds
      • Predictions
  • MySportmonks
    • How-to build a custom plan
    • ID Finder
  • How-to Guides
    • Get Started with our how-to guides
      • How-to build your API requests
    • Livescores & fixtures
      • How-to build a livescore website
      • How-to build a schedule page
    • Match & team pages
      • How-to build a match page with events and statistics
      • How-to build a match page with line-ups/formations
      • How-to build a team page with season stats and squads
    • How-to build standings and topscorer standings
      • League standings
      • Topscorer standings
    • Odds & predictions
      • How-to build a match page with odds
      • How-to build a betting odds portal
      • How-to use the predictions API
    • How-to build a fantasy game
    • Developer tools
      • How-to use Sportmonks' APIs in Postman
    • How-to keep your database in sync
    • World Cup 2022
    • EURO 2024
    • Football widgets
      • How-to set up football widgets in your web application
      • Configurations
      • Widgets overview
        • Livescore widget
        • International Cup widgets
  • API References
    • API reference guide
    • Data features
    • ID Finder
    • Code libraries
    • Demo response files
    • Statuses and definitions
    • API Rate limiting
    • Response codes
    • Meta description
  • General
  • Sportmonks
  • Plans & pricing
  • FAQ
  • Contact
Powered by GitBook
On this page
  • What are livescores?
  • Fixtures of the current day
  • Live fixtures
  • Filtering

Was this helpful?

Export as PDF
  1. Tutorials
  2. Schedule, fixtures & livescores

Livescores

PreviousFixturesNextStatistics

Last updated 3 years ago

Was this helpful?

In this part we’ll explain what livescores are, how people use them and most importantly, how you can work with them.

What are livescores?

As its name suggests, livescores is the act of displaying real-time sports data to its audience. For example, many livescore websites allow you to see the match’s minute, the people who scored a goal, received a card, etc.

Now, you might wonder how you can get this data yourself. Well, it’s actually quite easy. You can simply use one of our two endpoints!

We have two options:

The first request will give you all the fixtures of the current day. While the second one will provide you with all the fixtures that are currently in-play.

Therefore, the first one would be great if you want to show all the current day’s fixtures in your application. The second one is used for live fixtures.

In the the fixtures will be available 15 minutes before the match has started and 15 mins after it has ended.

The SportMonks’ livescore endpoints are also highly customizable. Have a look at our for all the possible options.

Fixtures of the current day

Now that you know what livescores are let’s put your knowledge to the test.

Let’s look at an example of a possible livescores output. The structure of the API response will be identical to our It’s a basic response, mostly consisting of various ids.

At the section called time, you can see that the fixture will be played today and that it hasn’t started yet, due to the status NS (Not Started).

https://soccer.sportmonks.com/api/v2.0/livescores?api_token={API_TOKEN}
"data": [
        {
            "id": 17162583,
            "league_id": 1779,
            "season_id": 17536,
            "stage_id": 77448678,
            "round_id": 204955,
            "group_id": 244168,
            "aggregate_id": null,
            "venue_id": 3660,
            "referee_id": null,
            "localteam_id": 250106,
            "visitorteam_id": 15541,
            "winner_team_id": null,
            "weather_report": {
                "code": "clouds",
                "type": "overcast clouds",
                "icon": "https://cdn.sportmonks.com/images/weather/04d.png",
                "temperature": {
                    "temp": 81.86,
                    "unit": "fahrenheit"
                },
                "temperature_celcius": {
                    "temp": 27.7,
                    "unit": "celcius"
                },
                "clouds": "90%",
                "humidity": "78%",
                "pressure": 1014,
                "wind": {
                    "speed": "11.41 m/s",
                    "degree": 250
                },
                "coordinates": {
                    "lat": 19.17,
                    "lon": -104
                },
                "updated_at": "2020-10-18T23:45:03.824952Z"
            },
            "commentaries": false,
            "attendance": null,
            "pitch": null,
            "details": null,
            "neutral_venue": false,
            "winning_odds_calculated": false,
            "formations": {
                "localteam_formation": null,
                "visitorteam_formation": null
            },
            "scores": {
                "localteam_score": 0,
                "visitorteam_score": 0,
                "localteam_pen_score": null,
                "visitorteam_pen_score": null,
                "ht_score": null,
                "ft_score": null,
                "et_score": null,
                "ps_score": null
            },
            "time": {
                "status": "NS",
                "starting_at": {
                    "date_time": "2020-10-19 00:00:00",
                    "date": "2020-10-19",
                    "time": "00:00:00",
                    "timestamp": 1603065600,
                    "timezone": "UTC"
                },
                "minute": null,
                "second": null,
                "added_time": null,
                "extra_minute": null,
                "injury_time": null
            },
            "coaches": {
                "localteam_coach_id": null,
                "visitorteam_coach_id": null
            },
            "standings": {
                "localteam_position": 4,
                "visitorteam_position": 1
            },
            "assistants": {
                "first_assistant_id": null,
                "second_assistant_id": null,
                "fourth_official_id": null
            },
            "leg": "1/1",
            "colors": null,
            "deleted": false
        },

You can easily enrich this response with the data you want by using includes. Next, we’re going to include extra information about the local and visitor teams:

https://soccer.sportmonks.com/api/v2.0/livescores?api_token={API_TOKEN}&include=localTeam,visitorTeam
"data": [
        {
            "id": 17162583,
            "league_id": 1779,
            "season_id": 17536,
            "stage_id": 77448678,
            "round_id": 204955,
            "group_id": 244168,
            "aggregate_id": null,
            "venue_id": 3660,
            "referee_id": null,
            "localteam_id": 250106,
            "visitorteam_id": 15541,
            "winner_team_id": null,
            "weather_report": {
                "code": "clouds",
                "type": "overcast clouds",
                "icon": "https://cdn.sportmonks.com/images/weather/04d.png",
                "temperature": {
                    "temp": 81.86,
                    "unit": "fahrenheit"
                },
                "temperature_celcius": {
                    "temp": 27.7,
                    "unit": "celcius"
                },
                "clouds": "90%",
                "humidity": "78%",
                "pressure": 1014,
                "wind": {
                    "speed": "11.41 m/s",
                    "degree": 250
                },
                "coordinates": {
                    "lat": 19.17,
                    "lon": -104
                },
                "updated_at": "2020-10-18T23:45:03.824952Z"
            },
            "commentaries": false,
            "attendance": null,
            "pitch": null,
            "details": null,
            "neutral_venue": false,
            "winning_odds_calculated": false,
            "formations": {
                "localteam_formation": null,
                "visitorteam_formation": null
            },
            "scores": {
                "localteam_score": 0,
                "visitorteam_score": 0,
                "localteam_pen_score": null,
                "visitorteam_pen_score": null,
                "ht_score": null,
                "ft_score": null,
                "et_score": null,
                "ps_score": null
            },
            "time": {
                "status": "NS",
                "starting_at": {
                    "date_time": "2020-10-19 00:00:00",
                    "date": "2020-10-19",
                    "time": "00:00:00",
                    "timestamp": 1603065600,
                    "timezone": "UTC"
                },
                "minute": null,
                "second": null,
                "added_time": null,
                "extra_minute": null,
                "injury_time": null
            },
            "coaches": {
                "localteam_coach_id": null,
                "visitorteam_coach_id": null
            },
            "standings": {
                "localteam_position": 4,
                "visitorteam_position": 1
            },
            "assistants": {
                "first_assistant_id": null,
                "second_assistant_id": null,
                "fourth_official_id": null
            },
            "leg": "1/1",
            "colors": null,
            "deleted": false,
            "localTeam": {
                "data": {
                    "id": 250106,
                    "legacy_id": null,
                    "name": "Colima",
                    "short_code": null,
                    "Twitter": null,
                    "country_id": 458,
                    "national_team": false,
                    "founded": null,
                    "logo_path": "https://cdn.sportmonks.com/images/soccer/team_placeholder.png",
                    "venue_id": null,
                    "current_season_id": 17536
                }
            },
            "visitorTeam": {
                "data": {
                    "id": 15541,
                    "legacy_id": 10081,
                    "name": "Durango",
                    "short_code": null,
                    "Twitter": null,
                    "country_id": 458,
                    "national_team": false,
                    "founded": 1958,
                    "logo_path": "https://cdn.sportmonks.com/images//soccer/teams/21/15541.png",
                    "venue_id": 11287,
                    "current_season_id": 17536
                }
            }

And just like that, we've requested all the fixtures of the day, as well as additional team information.

Live fixtures

The only difference between the livescores/now and previous livescores endpoint is that this one will give you all the currently in-play matches. That makes this the go-to endpoint if you want to build a livescore application.

In the example below at the times section again, you can see that the fixture has the “LIVE” status and is currently in the 94th minute.

https://soccer.sportmonks.com/api/v2.0/livescores/now?api_token={API_TOKEN}
{
    "data": [
        {
            "id": 17154603,
            "league_id": 1351,
            "season_id": 17530,
            "stage_id": 77448647,
            "round_id": 204814,
            "group_id": null,
            "aggregate_id": null,
            "venue_id": 733,
            "referee_id": 19361,
            "localteam_id": 132611,
            "visitorteam_id": 132610,
            "winner_team_id": null,
            "weather_report": {
                "code": "clouds",
                "type": "scattered clouds",
                "icon": "https://cdn.sportmonks.com/images/weather/03d.png",
                "temperature": {
                    "temp": 57.43,
                    "unit": "fahrenheit"
                },
                "temperature_celcius": {
                    "temp": 14.1,
                    "unit": "celcius"
                },
                "clouds": "40%",
                "humidity": "54%",
                "pressure": 1011,
                "wind": {
                    "speed": "13.87 m/s",
                    "degree": 160
                },
                "coordinates": {
                    "lat": 51.56,
                    "lon": -1.78
                },
                "updated_at": "2020-10-19T14:45:04.347172Z"
            },
            "commentaries": false,
            "attendance": null,
            "pitch": null,
            "details": null,
            "neutral_venue": false,
            "winning_odds_calculated": false,
            "formations": {
                "localteam_formation": null,
                "visitorteam_formation": null
            },
            "scores": {
                "localteam_score": 0,
                "visitorteam_score": 1,
                "localteam_pen_score": null,
                "visitorteam_pen_score": null,
                "ht_score": "0-0",
                "ft_score": null,
                "et_score": null,
                "ps_score": null
            },
            "time": {
                "status": "LIVE",
                "starting_at": {
                    "date_time": "2020-10-19 13:00:00",
                    "date": "2020-10-19",
                    "time": "13:00:00",
                    "timestamp": 1603112400,
                    "timezone": "UTC"
                },
                "minute": 90,
                "second": "59",
                "added_time": 4,
                "extra_minute": null,
                "injury_time": 1
            },
            "coaches": {
                "localteam_coach_id": null,
                "visitorteam_coach_id": 4598731
            },
            "standings": {
                "localteam_position": 11,
                "visitorteam_position": 13
            },
            "assistants": {
                "first_assistant_id": null,
                "second_assistant_id": null,
                "fourth_official_id": null
            },
            "leg": "1/1",
            "colors": {
                "localteam": {
                    "color": "#881319",
                    "kit_colors": "#79ADE2,#881319,#881319,#79ADE2,#5C8FAE,#FFDF1B,#679FEA"
                },
                "visitorteam": {
                    "color": "#0046A8",
                    "kit_colors": "#C40010,#0046A8,#C40010,#C40010,#999999,#888888,#0046A8"
                }
            },
            "deleted": false
        },

Naturally, this response can also be enriched with includes.

Filtering

  • Leagues: filter on league ids.

  • Bookmakers*: filter on bookmaker ids.

  • Markets*: filter on market ids.

  • Fixtures: filter on fixture ids.

These filter options allow you to request only the data for certain leagues or fixtures. Filters are beneficial if you want to highlight or exclude certain leagues or fixtures on your application.

In our next tutorial, we’re going to discuss the statistics and line-up of a fixture.

If this the first time you’ve heard about includes, you might want to check out our

Visit our page for information about the fields in the response.

Just like with our fixtures endpoint, the has a lot of filter options. You can filter on the following fields:

You can only filter on the bookmakers & markets parameters when you've enriched your response with the .

For more information about filtering, you can refer to our again.

Otherwise, if you want to see how livescores can be implemented, please check our

Livescores
Livescores/now
livescores/now endpoint,
API reference guide
fixtures endpoint.
includes tutorial.
statuses and definitions
livescore endpoint
odds include
filtering tutorial
how-to build a livescore portal guide.