Basketball API - Import Basketball data from "api-sports.io" (api-football.com)

Premium Version Only - By Request in lifetime subscription (since v0.13.4)

Demo Website:

https://totalbasketballstats.com/

1. API Import Subscription Plan

Register at  dashboard.api-football.com/register and select the subscription plan you want. 

The PRO plan is sufficient for the majority of users. But if you decide to import archived seasons, don't import more than 1 season per day because of plan limits.

Image 9899


After registration, you are on a Free plan with 100/requests per day and some limitations per minute/hour. The free plan is suitable only for testing.

P.S.: I am not affiliated with this API. It is a third-party API used to import data into the Sports Leagues plugin.

2. API Import Setup

Install and activate required plugins:

Currently, the "API Basketball" plugin is available only by request.
🛒 To get a link to the lifetime bundle "Sports Leagues Premium + AnWP SL API Basketball" create a private support ticket on this forum.

You will get links to the premium plugins in the email after the purchase.


Image 9900

In the API Dashboard, go to the "Account" (1) >> "My Access" (2) and copy your API Key (3)

Image 7718

Go to the "SL API Import"

Image 9926


Paste API Key (2) and select your Request URL.

Choose what data you want to import and click save.

If you plan to import Statistics, click the fix button to update plugin settings.

You can upload team logos by importing from API or upload custom logos on the team edit page manually.

3. API Leagues

Open Api Leagues (see screenshot). Reload the page if you have an error. 

Image 9927

Select the tournament you want to create using filters.

Click on the Database icon to create an import configuration.

Create a local tournament with a proper structure. You must follow three rules:

1️⃣ - Knockout stage >> create rounds without teams (stage + rounds only)

2️⃣ - Group Stage with single group >> create stage only without groups (stage only) 

3️⃣ - Group Sage with many groups >> create stage with groups and teams (stage + groups + teams)


You will find how to implement these rules in the following tutorials:

- Regular Season + Playoffs - ACB Liga

Group Stage with Many Groups - Africa Champions Cup

Basketball API - Preseason + Regular + All Stars + Playoffs (NBA)

Click the Star icon on the active season to make it available in the Dashboard. You should have only active seasons on the Dashboard.

Image 9949

Switch to the Dashboard.

Image 7729

4) Schedule data update

Select tournaments and click on the Schedule button to activate automatic data updates.

Image 7730

Image 7731

5) Live Data

If you plan to use LIVE data import, schedule it, and the plugin will make everything for you.

Image 7732

On every page with the game list, the plugin will load actual LIVE data (see the screenshot)

Image 8935

Sports League plugin will load a specially designed LIVE layout for a single game page.

You can change what Live data you want to fetch from API on the Settings page. 

Image 8934

6) Discover new games (since SL Premium - 0.13.5)

I recommend running the Discover Games tool once or twice a week.

Image 9943


Click the "Discover New Games" button to find new league games.

Keep in mind that only active leagues saved in Dashboard with be checked.

Image 9945

You will have to change the import configuration in some situations. For example, when the ACB playouts will start

Image 9946

Image 9944

After updating the configuration, click on the Database icon.

Image 9948

Then, try to create games.

Image 9947

7) Install Recommended theme

Although you can choose any theme for your website, I highly recommend using a free Kadence theme.

Go to the "Appearance" >> "Themes". Search for "Kadence" and click Install. Activate it.

Image 7739

You can optionally install Customizer settings for the Kadence theme from the demo site - https://slpro-football.anwp.pro/

Of course, if you like it.

Image 7740

7) Check out your data

Go to Tournaments >> and click on "View"

Image 8937

Check the Tournament, Team, Game, and Player pages. 

Image 8936

8) What next

Create a Home page and Sidebars using the available plugin Gutenberg blocks.

Image 7742

The Calendar Slider would be a great addition to the home page.

Image 8938



Go to the Customizer and setup your header and footer.


Image 7744

Follow the plugin changelog pages 

Core version changelog

Premium version changelog

Is this article helpful for you?