Widget script
https:/
The script that renders widgets. Place one element wherever each widget should appear, then include the script a single time with your widget key. Widget types (the live match tracker, Enterprise only, has its own page): livescore (data-sport is required, data-league optional — a sport’s live matches grouped by league), match (data-fixture — status, score, goals, cards and substitutions) and standings (data-league, with optional data-season — the season’s main table, defaulting to the latest season). Options: data-size small | medium | large to suit the placement (small for a sidebar — no wider than 340 px, compact, standings showing only P and Pts; medium, the default, for a content column — no wider than 640 px; large for full width with bigger text), data-theme light | dark | auto (auto follows the visitor’s preference), data-accent (#hex) and data-refresh (in seconds, minimum 15; defaults are 30 / 30 / 600).
Any /v2 call can also come back with one of the common errors.
<div data-sportsapi-widget="livescore" data-sport="football" data-league="17"></div>
<div data-sportsapi-widget="standings" data-league="17" data-theme="dark"></div>
<script src="https://api.datasportsapi.com/widgets/v1.js" data-key="pk_live_…" async></script>