Sports API Hub connects to external sports data APIs via RapidAPI. Before you can import any data, you need a RapidAPI account, an API subscription, and your API key entered in the plugin settings.
Admin Menu: API & Import > API Config
Step 1: Create a RapidAPI Account
- Go to rapidapi.com and sign up for an account
- Verify your email address
- Add a payment method (required even for free plans)
RapidAPI is a marketplace that hosts the sports data APIs used by this plugin. Your API key and billing are managed through RapidAPI, not through our plugin.
📡 Step 2: Subscribe to an API
The plugin supports three API providers on RapidAPI. Choose one based on the sports you need:
| Provider | Sports | Requests |
|---|---|---|
| AllSportsAPI2 | Basketball, Baseball, Cricket, Rugby, Ice Hockey, American Football, Handball, Volleyball | Unlimited on Pro plan ($19.99/mo) |
| BasketAPI1 | Basketball only | Limited (15,000-50,000/day) |
| BaseballAPI | Baseball only | Limited (15,000-50,000/day) |
All three providers share the same endpoint structure and data format. The only difference is the host URL, sport coverage, and pricing.
Recommendation
Use AllSportsAPI2 — it is the recommended provider. The Pro plan ($19.99/mo) offers unlimited daily requests across all 8 sports, making it the best value for any site.
The dedicated sport APIs (BasketAPI1, BaseballAPI) have limited daily requests on most plans. They are suitable for covering a few seasons of a single sport, but not for large-scale ongoing data sync. Only the most expensive plans on these APIs offer unlimited requests.
Subscribing
- Search for the provider name on RapidAPI (e.g., “AllSportsAPI2”)
- Click Subscribe on the API page
- Select a pricing plan
Free Plan is NOT Suitable
Important
The free plan (Basic) on these APIs has a hard limit of 50-100 requests per day. This is not enough even for a basic import of one league — a single season import requires thousands of API calls. You must subscribe to a paid plan (Pro or higher) to use Sports API Hub effectively.
Step 3: Find Your API Key
- Go to your RapidAPI Dashboard
- Navigate to the Security or API Keys section
- Copy your Default Application API key
The key is a long alphanumeric string. You use the same key for all three providers — it is tied to your RapidAPI account, not to a specific API.
🔑 Step 4: Enter the API Key in the Plugin
- In WordPress admin, go to API & Import > API Config
- Paste your API key in the API Key field
- Select your API Provider from the dropdown (AllSportsAPI2, BasketAPI1, or BaseballAPI)
- Click Test Connection
Test Connection
The Test Connection button sends a test request to the API using your key and selected provider. Results:
| Result | Meaning |
|---|---|
| Green checkmark with provider name | Connection successful, key is valid |
| Error message | Key is invalid, subscription expired, or provider mismatch |
Important: The provider setting is global — it applies to all sports. You cannot use AllSportsAPI2 for basketball and BaseballAPI for baseball simultaneously. Pick one provider and use it for everything.
⚙️ Step 5: Select Sports and Review Settings
After a successful connection test:
- In the Sports section, check the sports you want to enable
- Review the import and sync settings below the sports checkboxes
- Click Save Settings
Available sports depend on your provider. AllSportsAPI2 offers all 8 sports. BasketAPI1 offers only Basketball. BaseballAPI offers only Baseball.
| Sport | AllSportsAPI2 | BasketAPI1 | BaseballAPI |
|---|---|---|---|
| Basketball | Yes | Yes | — |
| Baseball | Yes | — | Yes |
| Cricket | Yes | — | — |
| Rugby | Yes | — | — |
| Ice Hockey | Yes | — | — |
| American Football | Yes | — | — |
| Handball | Yes | — | — |
| Volleyball | Yes | — | — |
Tip
Enable only the sports you actually need. Each enabled sport adds filters and options to the admin interface. You can always enable more sports later.
Step 6: Save and Verify
- Click Save Settings at the bottom of the page
- Confirm the green success message appears
- The Import and Custom Logos submenus now appear under API & Import
Your API connection is ready. The next step is to import data.
API Key Security
Your API key is stored in the WordPress database as a plugin option. It is never exposed on the frontend or in page source code. All API requests are made server-side from your WordPress installation.
- Do not share your API key publicly
- If you suspect your key has been compromised, regenerate it on the RapidAPI dashboard
- Each RapidAPI account has its own rate limits and billing — do not share keys across multiple WordPress sites unless you are monitoring usage carefully
Rate Limits and Costs
The API enforces rate limits at two levels:
| Level | Limit | What Happens |
|---|---|---|
| Per-second | 5 requests/second | Excess requests receive a 429 error (auto-retried by the plugin) |
| Per-day | Varies by plan (100 for free) | Excess requests blocked until daily reset |
The plugin handles per-second throttling automatically — it waits and retries. When the daily limit is reached, the plugin stops making requests and reports the limit. It will not continue burning through calls.
For more detail on monitoring usage and estimating costs, see API Usage (in the Import & Sync section).
Troubleshooting
| Issue | Solution |
|---|---|
| Test Connection fails | Verify the key has no leading/trailing spaces. Check that your RapidAPI subscription is active |
| “Subscription required” error | Subscribe to the API on RapidAPI — a paid plan is required for actual usage |
| Provider mismatch | Ensure the selected provider matches your RapidAPI subscription (e.g., do not select BasketAPI1 if you subscribed to AllSportsAPI2) |
| No sports available to select | Test the connection first — sport checkboxes appear after a successful test |
Related
- First Import — Import your first league after API setup
- API Config — Full API Config page reference (import options, media, live, sync)
- API Usage — Rate limits, cost estimation, and monitoring
- Sports — Sport-by-sport capabilities and features




