Getting Started

Your First Request

Go from API key to your first successful Tennis API request in a few minutes. Base URL: https://tennis-api-atp-wta-itf.p.rapidapi.com.

โ„น๏ธ
Looking for the right endpoint?

Use the API Schema & Endpoint Guide. This page focuses on authentication, request conventions and the key rules before integrating.

1. Subscribe and get your API key

The Tennis API is accessed through RapidAPI.

  1. Subscribe to the Tennis API - ATP WTA ITF product.
  2. Choose the plan that includes the data you need.
  3. Copy your X-RapidAPI-Key.
โš ๏ธ
Keep your API key secret

Do not expose it in browser-side JavaScript, mobile bundles or public repositories. Store it server-side using environment variables or a secrets manager.

One product, one RapidAPI host

Host
https://tennis-api-atp-wta-itf.p.rapidapi.com

Every REST request should include:

X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com

2. Choose the right data family for what you need

NeedUseTypical starting pointAccess
Scheduled matchesUpcoming MatchesGET /tennis/v2/{atp|wta}/fixturesAll plans (FREE / PRO / ULTRA / MEGA)
Upcoming with odds and predictionsUpcoming Matches (With Predictions & Odds Data)GET /tennis/v2/upcoming/matches/{type}All plans (FREE / PRO / ULTRA / MEGA); modelPrediction ULTRA+
Live scores, stats and odds (REST)Live Scores, Stats & OddsGET /tennis/v2/extend/api/events/liveLive list & scores FREE+; live odds, detailed stats, PBP, timeline ULTRA+
Push-based live updatesReal-time (Socket.IO)GET /tennis/v2/extend/api/ws-tokenMEGA
Completed / historical resultsResults & Historical DataGET /tennis/v2/{type}/results/{date}See endpoint
Tournament schedule / active on a dateTours Calendar (Men & Women)Year calendar / /calendar/activeSee endpoint
โ„น๏ธ
FREE = PRO payload (quota differs)

FREE and PRO share the same endpoint/payload access. FREE is limited to 50 requests/day. Enriched upcoming feeds are callable on FREE/PRO; only proprietary modelPrediction requires ULTRA or MEGA (field shows Upgrade Plan to see this otherwise).

PlanAccess modelIncluded requestsRate limit
FREESame as PRO50 / day4 req/sec
PROCore + advanced stats + pre-match match-winner odds150,000 / month10 req/sec
ULTRAPRO + premium intelligence1,200,000 / month25 req/sec
MEGAULTRA + rich analysis + Socket.IO3,800,000 / month50 req/sec

For players, H2H, rankings, tournaments, draws, potential matchups and reference data, use the Endpoint Guide.

3. Make your first request

A simple first request is the men's upcoming fixtures feed (atp dataset):

curl
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/atp/fixtures?pageNo=1&pageSize=5&filter=PlayerGroup:singles' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY'

This returns scheduled men's singles matches and useful identifiers (player IDs, tournament info).

Upcoming matches with odds and prediction data (all plans)

Same request on the enriched feed. Available on every plan; modelPrediction is filled on ULTRA / MEGA and shows Upgrade Plan to see this on FREE / PRO.

curl (enriched upcoming)
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/upcoming/matches/atp' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY'

4. Type values: atp and wta

ValueMeaning
atpMen's tennis dataset across all supported levels, not only the ATP Tour
wtaWomen's tennis dataset across all supported levels, not only the WTA Tour

Supported coverage can include Grand Slams, ATP/WTA events, Challengers and ITF events. There is no separate itf type value: ITF matches are included in theatp (men) or wta (women) dataset where supported.

5. Understand the main URL patterns

PatternUsed forExample
/tennis/v2/{atp|wta}/...Core fixtures, players, rankings, results, tournaments/tennis/v2/atp/fixtures
/tennis/v2/{module}/...Profile, H2H, calendar, premium upcoming/tennis/v2/profile/Carlos%20Alcaraz
/tennis/v2/extend/api/...Live events, odds, timelines, PBP, Socket.IO token/tennis/v2/extend/api/events/live

Always copy the exact path shape from the endpoint reference.

6. Player, tournament and match identifiers

Player IDs

Numeric IDs come from fixtures, rankings, the core player list and other structured responses. Core routes use the numeric ID. Name-based routes may accept a URL-encoded display name (Carlos%20Alcaraz).

Tournament IDs

A season/edition ID identifies a particular year of an event. Use Tours Calendar (Men & Women) to discover editions and Tournaments & Draws for a known tournament or draw.

โš ๏ธ
Match IDs are not interchangeable

Do not assume match IDs are interchangeable between Upcoming, Predictions, and Live. To match a live event with an upcoming fixture or prediction record, use the player IDs or names together with tournament and date information. Live endpoints use live-event identifiers โ€” do not send a core fixture ID to a live endpoint unless documented.

7. Dates, times and pagination

ContextFormat
Fixtures, results, most match-date pathsYYYY-MM-DD
Historical ranking date queryDD.MM.YYYY
JSON timestampsISO-8601
Live startTimestampUnix seconds

Match start times

Use date / startTime(ISO-8601 UTC) as the scheduled start and convert to the user's timezone in your app. timeGame is a legacy field. A nullstart time means the order of play for that match has not been published yet (typical for later rounds and next week's draws); the time is filled in as soon as the tournament schedules it. As soon as a match goes live it appears instantly in the live match feed.

Pagination

Every paginated list accepts either naming style: page = pageNo and limit = pageSize. Responses return both pairs (page, pageNo, pageSize, limit) plus hasNextPage โ€” continue until it is false.

Odds field names

Bookmaker odds objects use short keys: id_b_o bookmaker (1 = Marathonbet, 2 = Pinnacle); k1 / k2 match-winner odds for player 1 / player 2; total the games line the over/under refers to (e.g. 21.5); ktb / ktm over / under odds for that line; f1 / f2 game handicap and kf1 / kf2 its odds; k20, k21, โ€ฆ correct set-score odds. This full-market odds object is ULTRA+: on FREE / PRO it is replaced by a plan_restrictedobject ("Upgrade Plan to see full betting markets"), and headline match-winner prices come from preMatchOdds. Full table on Match Odds (All Markets).

8. Upcoming data: factual H2H, odds and predictions

Upcoming Matches โ€” all plans

Factual schedule data. Fixtures return factual H2H with include=h2h (h2h.player1AllWins / h2h.player2AllWins); the upcoming feed returns h2h as a score string (e.g. 4-1) plus h2hSummary. Public docs do not advertise odds for new clients; legacy odds fields may still be returned for backwards compatibility.

Upcoming Matches (With Predictions & Odds Data) โ€” all plans

  • predictionSummary = bookmaker-implied view (FREE/PRO OK)
  • preMatchOdds = pre-match match-winner odds (FREE/PRO OK)
  • odds = full bookmaker markets (totals, handicap, set scores) โ€” ULTRA+; on FREE/PRO it is a plan_restricted object ("Upgrade Plan to see full betting markets")
  • modelPrediction = SportsAPI365 model โ€” ULTRA+; FREE/PRO get plan_restricted stub
โ„น๏ธ
Match Prediction & Analysis Paragraph is MEGA only

Richer written matchup analysis โ€” not included with PRO or ULTRA.

9. Live data: REST or Socket.IO

REST โ€” request the current board or match state (/extend/api/events/live).

Socket.IO โ€” MEGA only. Get a token via /extend/api/ws-token, then connect to https://live.matchstat.com with the Socket.IO token (not the RapidAPI key). See Real-time (Socket.IO) Integration.

10. Plan restrictions and errors

A fully restricted endpoint returns 403 Forbidden:

{
  "error": "plan_restricted",
  "message": "Your current plan does not include access to this data. Please upgrade via RapidAPI.",
  "requiredPlan": "ULTRA",
  "upgradeUrl": "https://rapidapi.com/jjrm365-kIFr3Nx_odV/api/tennis-api-atp-wta-itf"
}

The message names where you subscribed: RapidAPI subscribers see "โ€ฆPlease upgrade via RapidAPI."; SportsAPI365.com subscribers see "โ€ฆPlease upgrade via SportsAPI365.com." with the matching upgradeUrl.

When only a field is restricted (e.g. modelPrediction), the endpoint still returns 200 OK and keeps the field visible:

{
  "modelPrediction": {
    "available": false,
    "error": "plan_restricted",
    "message": "Upgrade Plan to see this",
    "requiredPlan": "ULTRA",
    "upgradeUrl": "https://rapidapi.com/jjrm365-kIFr3Nx_odV/api/tennis-api-atp-wta-itf"
  }
}
StatusMeaning
200 OKSuccess. Nothing found is also 200 with an empty result ({} or an empty list); there are no error fields in a 200 body
400Invalid date, identifier, tour or query
403Host/auth problem or plan does not include the endpoint
404Unknown URL (no such endpoint)
429Rate limit โ€” wait before retrying
500Unexpected server error

An empty result with HTTP 200 means nothing matched that identifier, date, filter or page.

11. Rate limits

Plan limits are 4 / 10 / 25 / 50 requests per second for FREE / PRO / ULTRA / MEGA (see the capacity table above). These per-second plan limits are what govern your requests; RapidAPI monthly / daily quotas also apply. A request over the limit returns 429 โ€” wait before retrying. For live UIs that would poll heavily, MEGA customers should prefer Socket.IO.

12. Where to go next

Authenticate here โ†’ use the Endpoint Guideto select the data family โ†’ read that endpoint's parameter and response tables before coding.