Standings

Learn to use the standings widget and the functionalities of different tags we can use with it.

View points table

The Standings widget displays the rankings of the competition or team, which is specified in the parameters.

Standings widget parameters

The following table contains the tags for the Standings widget and their functionalities:

Tags

Type

Category

Purpose

data-host

String

Required

This is the hostname. It is v3.football.api-sports.io for our case.

data-key

String

Required

This parameter specifies the API key that'll be used for request validation.

data-league

Integer

Optional

This is the ID of the league we want to view the standings for. The Leagues endpoint can be used to obtain this ID.

data-team

Integer

Optional

This is the ID of the teams we want to view the standings for. The Teams endpoint can be used to obtain this ID.

data-season

Integer

Required

This contains the desired season. The format is "YYYY."

data-theme

String

Optional

This is used to specify the theme color that we want. If this field is left empty, the default theme will be applied; otherwise, the possible values are grey or dark.

data-show-errors

String

Optional

This is either true or false, depending on whether we want to display the errors.

The HTML script for the Standings widget is as follows:

    html
    output
    View standings

    Click the “Run” button to see the standings for that league. We can change the league ID in line 4 to get the standings of another league. We can also see the standings for a single team by entering the team ID in line 5.

    Note: If we integrate multiple widgets on the same page, we’ll have to use the script tag once. The same theme will be applied to all widgets.