Widgets are now available on API-FOOTBALL

To start we have developed 3 widgets Livescore, Fixtures and Standings. Of course others will be developed in the future according to the users' requests.

HOW IT WORKS


Our widgets are completely free and work with all our plans including the free plan.

To integrate the widgets to your site you just have to copy/paste the code provided and fill in the tags needed for the widget to work properly.
If you integrate several widgets on the same page a single theme will be applied for all widgets. Also you will only have to integrate the script tag once.

For all widgets the following tags are needed :
data-host : v3.football.api-sports.io or api-football-v1.p.rapidapi.com depending on whether you have subscribed with us or RapidApi.
data-key : Indicate your API-KEY obtained on our Dashboard or on RapidApi.
data-theme : If you leave the field empty, the default theme will be applied, otherwise the possible values are grey or dark. It is also possible to indicate false which will not display any theme and lets you customize the widget with your own css.
data-show-errors : By default false, used for debugging, with a value of true it allows to display the errors.

Widgets use the requests associated with your account and therefore they will stop working if your daily limit is reached. You can track all requests made directly in the dashboard.

Security :
When using these widgets it is important to be aware that your API-KEY will be visible to the users of your site, it is possible to protect yourself from this by allowing only the desired domains in our dashboard.
This way no one else can use your API-KEY for you. If you have already set up your widget and have not activated this option, you can reset your API-KEY and activate this option after.

Debugging :
If the widget does not display the requested information, it is possible to set the data-show-errors tag to true to display error messages directly in the widget and in the console. This can be due to several things like : (Non-exhaustive list)
- You have reached your daily number of requests
- Tags are incorrectly filled in
- Your API-KEY is incorrect


LIVESCORE


Displays the list of current matches grouped by competition. The matches that start are automatically added and those that end are automatically removed.

Tags :
data-refresh : Number in seconds corresponding to the desired data update frequency. This number must be greater than or equal to at least 15. If you indicate 0 or leave this field empty the data will not be updated automatically.

<div id="wg-api-football-livescore" data-host="v3.football.api-sports.io" data-refresh="60" data-key="Your-Api-Key-Here" data-theme="" data-show-errors="false" class="api_football_loader"> </div> <script type="module" src="https://widgets.api-sports.io/football/1.0.0/widget.js"> </script>

That's all, the scores will be displayed and updated automatically.

Select Theme : Default Grey Dark

FIXTURES


Displays the list of matches grouped by competition according to the parameters used. The matches are automatically updated according to the selected frequency data-refresh.

Tags :
data-refresh : Number in seconds corresponding to the desired data update frequency. This number must be greater than or equal to at least 15. If you indicate 0 or leave this field empty the data will not be updated automatically.
data-date : Fill in the desired date YYYY-MM-DD
data-league : Fill in the desired league id
data-team : Fill in the desired team id
data-season : Fill in the desired season
data-last : Number from 1 to 99. For the X last fixtures
data-next :Number from 1 to 99. For the X next fixtures

Please refer to the documentation about this endpoint and the use of the parameters. Documentation.

It is possible to find all the leagues and teams ids on our Dashboard.

<div id="wg-api-football-fixtures" data-host="v3.football.api-sports.io" data-refresh="60" data-date="2021-07-01" data-league="" data-team="" data-season="" data-last="" data-next="" data-key="Your-Api-Key-Here" data-theme="" data-show-errors="false" class="api_football_loader"> </div> <script type="module" src="https://widgets.api-sports.io/football/1.0.0/widget.js"> </script>
Select Theme : Default Grey Dark

STANDINGS


Displays the ranking of a competition or a team according to the parameters used.

Tags :
data-league : Fill in the desired league id
data-season : Fill in the desired season
data-team : Fill in the desired team

It is possible to find all the leagues and teams ids on our Dashboard.

<div id="wg-api-football-standings" data-host="v3.football.api-sports.io" data-league="39" data-team="" data-season="2020" data-key="Your-Api-Key-Here" data-theme="" data-show-errors="false" class="api_football_loader"></div> <script type="module" src="https://widgets.api-sports.io/football/1.0.0/widget.js"> </script>
Select Theme : Default Grey Dark