Api Usage


Sports API Hub connects to external APIs via RapidAPI. Each API call counts against your RapidAPI subscription quota. This page explains rate limits, how to estimate API usage for your site, and how the plugin handles errors gracefully.

📊 RapidAPI Rate Limits

A paid RapidAPI subscription is required to use Sports API Hub. The free plan is not supported.

The recommended setup is AllSportsAPI2 Pro ($19.99/mo) which provides unlimited daily requests for all 8 sports. Pricing as of March 2026 — check RapidAPI for current rates:

ProviderPlanRequestsRate LimitPrice
AllSportsAPI2ProUnlimited6/sec$19.99/mo
AllSportsAPI2UltraUnlimited10/sec$39.99/mo
BasketAPI1Pro15,000/day6/sec$9.99/mo
BasketAPI1MegaUnlimited10/sec$24.99/mo
BaseballAPIPro15,000/day6/sec$9.99/mo
BaseballAPIMegaUnlimited10/sec$24.99/mo

The dedicated sport APIs (BasketAPI1, BaseballAPI) have limited daily requests on most plans. They are suitable for covering several seasons of a single sport, but AllSportsAPI2 is a better choice for most users since the Pro plan already offers unlimited requests at a competitive price.

RapidAPI pages:

API Calls Per Task

Each import and sync task uses a predictable number of API calls:

TaskAPI CallsNotes
Hierarchy~5Categories + leagues + seasons (one-time)
Fixtures1 per page30 games per page, paginated
Finished Details1–5 per gameMatch + lineups + stats + incidents + highlights
Re-update1–5 per gameSame as Finished Details
Rosters1 per teamFull player list for one team
Teams1 per teamTeam metadata and colors
Standings1 per seasonFull standings table
Cup Trees1 per seasonKnockout bracket data
Kickoff1 per page30 games per page, paginated
Season Probe~5Tests each capability endpoint once

The Finished Details cost depends on your Import sub-options in API Config:

Sub-Options EnabledCalls Per Game
Match only1
+ Lineups2
+ Lineups + Team Stats3
+ Lineups + Team Stats + Incidents4
+ All four (Lineups, Team Stats, Incidents, Highlights)5

🧮 Estimation Examples

Example 1: NBA Season (Full Import)

An NBA regular season has 1,230 games (82 games per team, 30 teams, each game counted once).

StepCalculationAPI Calls
HierarchyOne-time~5
Fixtures1,230 games / 30 per page~41
Finished Details (3 sub-options)1,230 games x 4 calls~4,920
Rosters30 teams x 1 call30
Teams30 teams x 1 call30
Standings1 call1
Total~5,027

With the AllSportsAPI2 Pro plan (unlimited requests), this full import can be completed in a single session. On plans with daily limits, spread the finished details import across multiple days.

Example 2: NBA Season (Ongoing Weekly Sync)

After the initial import, ongoing sync keeps data current:

TaskFrequencyWeekly Calls
Finished DetailsDaily, ~15 games/day x 4 calls~420
StandingsDaily7
Kickoff TimesDaily, ~15 games/day / 30 per page~4
FixturesWeekly~2
RostersWeekly30
Total~463/week

Example 3: Live Scores (One Evening)

4 simultaneous NBA games, 2.5 hours average, score poll at 60s, detail poll at 120s with 1 sub-option:

ComponentCalculationAPI Calls
Score polls4 games x 150 polls (2.5h at 60s)600
Detail polls4 games x 75 polls (2.5h at 120s)300
Total~900

Combined: A full NBA season import (~5,000) + 20 weeks of sync (~9,300) + live scores for 40 game nights (~36,000) = approximately 50,000 API calls over a season.

Rate Limit Handling

The plugin uses reactive error handling — no pre-throttling. Errors are handled inline:

Per-Second Rate Limit (429 with remaining > 0)

  • Detection: HTTP 429 response, but daily quota still has remaining calls
  • Action: Wait 1 second, then retry the request once
  • Impact: Momentary pause, import continues normally

Daily Rate Limit (429 with remaining = 0)

  • Detection: HTTP 429 response with zero remaining daily calls
  • Action: Stop the current batch immediately, show an error message
  • Impact: Import queue halts. Resume the next day when quota resets

Request Timeout

  • Detection: cURL timeout (15-second limit)
  • Action: Wait 2 seconds, then retry once
  • Impact: Usually resolves on retry. If the retry also times out, the individual item is skipped and logged

Per-Item Errors

When a single game or team fails during a batch import:

  • The error is logged
  • The failed item is skipped
  • The batch continues processing remaining items
  • Only a daily rate limit error stops the entire task

Note

The plugin does not pre-throttle requests or track your plan type. Each request is independent — if it succeeds, processing continues immediately. Rate limit errors are handled reactively as they occur.

Monitoring Your Usage

RapidAPI Dashboard

The primary place to monitor API usage is your RapidAPI Developer Dashboard:

  1. Log in to rapidapi.com
  2. Go to Developer Dashboard > My Apps
  3. Select your app
  4. View the Analytics tab for call counts, response times, and error rates

The dashboard shows:

  • Total calls today / this month
  • Remaining quota
  • Error rate breakdown
  • Response time percentiles

Plugin Import Logs

The plugin logs API activity during imports. Check Hub Data > Games to see import status values — games with a “Detailed” status have been successfully imported with full statistics.

💡 Reducing API Usage

1. Enable Only Needed Sub-Options

Each disabled sub-option saves 1 API call per game. If you do not display play-by-play timelines, disable the Incidents sub-option in API Config.

2. Use Scope Filtering for Live Scores

Set Live Scores scope to “Selected” and pick only the leagues you display. This prevents live polling for games you do not show.

3. Increase Sync Intervals

For less time-sensitive data (rosters, cup trees), use longer intervals (72–168 hours) in Background Sync to reduce background API calls.

4. Disable Sync for Off-Season Leagues

If a season has ended, Background Sync will still check it unless you adjust your settings. Consider disabling sync during the off-season.

5. Import During Off-Peak Hours

If your API plan has per-second limits, running large imports during off-peak hours may reduce timeout errors (though this depends on the API provider’s infrastructure, not your site’s traffic).

Tip

The biggest API cost is Finished Details — each game uses 1–5 calls depending on sub-options. Disabling sub-options you do not need (e.g., Incidents or Highlights) is the most effective way to reduce total usage.

Plan Selection Guide

Use CaseEstimated Monthly CallsSuggested Plan
One league, manual imports only1,000–3,000AllSportsAPI2 Pro
One league, daily sync2,000–5,000AllSportsAPI2 Pro
One league, daily sync + live scores5,000–15,000AllSportsAPI2 Pro
Multiple leagues, full sync + live15,000–50,000AllSportsAPI2 Pro / Ultra

Note: The AllSportsAPI2 Pro plan ($19.99/mo as of March 2026) has unlimited daily requests, so all use cases above are covered. The Ultra plan ($39.99/mo) offers a higher rate limit (10 requests/second vs 6) which helps with faster imports and live score polling for many simultaneous games. Check RapidAPI for current pricing.

📚 Related