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; modelPrediction (model win %) ULTRA / MEGA
Live scores, stats and odds (REST)Live Scores, Stats & OddsGET /tennis/v2/extend/api/events/liveAll plans
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. Every endpoint is callable on every plan, with these exceptions: the SportsAPI365 model win probabilities (H2H Model Prediction, and the modelPrediction field on upcoming rows) require ULTRA or MEGA; Socket.IO (/ws-token) and the written predictions (Match Prediction & Analysis Paragraph, also by matchId, and H2H Prediction Analysis) require MEGA. A restricted endpoint answers HTTP 403 with error: "plan_restricted".

PlanAccess modelIncluded requestsRate limit
FREESame as PRO50 / day4 req/sec
PROAll endpoints: data, live scores and stats, all odds, point-by-point150,000 / month10 req/sec
ULTRAPRO + SportsAPI365 model win probabilities1,200,000 / month25 req/sec
MEGAULTRA + written predictions + 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

Every player parameter on the core, H2H, fixtures, results, rankings and match routes accepts the numeric ID or the display name: 47275 and Jannik Sinner return the same response. Names match case-insensitively within the tour in the path (atp or wta); a name shared by several players returns 400 listing their IDs. IDs are the most reliable choice; they come from fixtures, rankings, the core player list and every response that includes a player. In a raw URL the space is sent as %20; RapidAPI, Postman and HTTP libraries encode it for you.

Exceptions on the live service: Event by Players, Point-by-Point by Player Names, Odds by player names, H2H Model Prediction and H2H Prediction Analysis take names only; Point-by-Point by IDs takes IDs only.

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.

โ„น๏ธ
From a fixture to its live data: follow the links

Match IDs differ between the schedule, the live service and the archive, but you do not need to match records by name: every fixture, upcoming and H2H upcoming row carries matchId, liveMatchId and links.live. Call links.live (/tennis/v2/matches/{matchId}/live?type=atp|wta) for the current status, score and statistics plus the live eventId that the live odds routes and Socket.IO use; liveMatchId equals matchId on live rows. Do not send a core matchId to a live endpoint. An empty {} from /live means the match is not in the live feed (not started, or finished and dropped), not "no result": completed matches are in Results and /matches/{matchId}?source=game.

7. Dates, times and pagination

ContextFormat
Fixtures, results, most match-date pathsYYYY-MM-DD, a real calendar day (2026-02-30 returns 400)
Historical ranking date queryDD.MM.YYYY or YYYY-MM-DD
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. Past the last page a list returns an empty data array with hasNextPage: false. A lookup that finds nothing at all (unknown player, tournament or match) returns an empty object {} with no pagination fields. That empty object carries an X-Empty-Reason response header saying why (e.g. No live event for matchId=1300. or No match found for matchId=131779990.), so an unknown id can be told apart from a real match that has no data yet. The body stays {}.

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 line the over/under refers to; ktb / ktm over / under odds for that line; f1 / f2 handicap and kf1 / kf2 its odds; k20, k21, โ€ฆ correct set-score odds. The two bookmakers quote different markets under the same keys, so rows name the unit: totalUnit and handicapUnit are games on Marathonbet (total 22.5, handicap 4.5) and sets on Pinnacle (total 2.5, handicap 1.5). Never compare a games line with a sets line. The full-market odds object is on all plans; preMatchOdds repeats the headline match-winner prices in a simpler shape. 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) โ€” all plans
  • modelPrediction = SportsAPI365 model win probabilities โ€” ULTRA / MEGA; FREE/PRO get a plan_restricted object
โ„น๏ธ
Match Prediction & Analysis Paragraph is MEGA only

Richer written matchup analysis (and H2H Prediction Analysis) โ€” not included with FREE, 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 restricted endpoint (MEGA only, or H2H Model Prediction on ULTRA / MEGA) returns 403 Forbidden:

{
  "error": "plan_restricted",
  "message": "Your current plan does not include access to this data. Please upgrade via RapidAPI.",
  "requiredPlan": "MEGA",
  "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); a 200 never carries a request error. An empty {} has an X-Empty-Reason header with the reason. One field-level case: on FREE / PRO the modelPrediction field of an upcoming row is a plan_restricted object inside an otherwise normal response
400Invalid date, identifier, tour or query, including an unknown query parameter or filter name (the message lists the supported ones), so a typo never returns unfiltered rows
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. For {}, read the X-Empty-Reason response header for the cause.

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.