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.
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.
- Subscribe to the Tennis API - ATP WTA ITF product.
- Choose the plan that includes the data you need.
- Copy your
X-RapidAPI-Key.
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
https://tennis-api-atp-wta-itf.p.rapidapi.comEvery REST request should include:
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com2. Choose the right data family for what you need
| Need | Use | Typical starting point | Access |
|---|---|---|---|
| Scheduled matches | Upcoming Matches | GET /tennis/v2/{atp|wta}/fixtures | All plans (FREE / PRO / ULTRA / MEGA) |
| Upcoming with odds and predictions | Upcoming 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 & Odds | GET /tennis/v2/extend/api/events/live | Live list & scores FREE+; live odds, detailed stats, PBP, timeline ULTRA+ |
| Push-based live updates | Real-time (Socket.IO) | GET /tennis/v2/extend/api/ws-token | MEGA |
| Completed / historical results | Results & Historical Data | GET /tennis/v2/{type}/results/{date} | See endpoint |
| Tournament schedule / active on a date | Tours Calendar (Men & Women) | Year calendar / /calendar/active | See endpoint |
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).
| Plan | Access model | Included requests | Rate limit |
|---|---|---|---|
| FREE | Same as PRO | 50 / day | 4 req/sec |
| PRO | Core + advanced stats + pre-match match-winner odds | 150,000 / month | 10 req/sec |
| ULTRA | PRO + premium intelligence | 1,200,000 / month | 25 req/sec |
| MEGA | ULTRA + rich analysis + Socket.IO | 3,800,000 / month | 50 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 --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 --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
| Value | Meaning |
|---|---|
atp | Men's tennis dataset across all supported levels, not only the ATP Tour |
wta | Women'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
| Pattern | Used for | Example |
|---|---|---|
/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.
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
| Context | Format |
|---|---|
| Fixtures, results, most match-date paths | YYYY-MM-DD |
Historical ranking date query | DD.MM.YYYY |
| JSON timestamps | ISO-8601 |
Live startTimestamp | Unix 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 aplan_restrictedobject ("Upgrade Plan to see full betting markets")modelPrediction= SportsAPI365 model โ ULTRA+; FREE/PRO get plan_restricted stub
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"
}
}| Status | Meaning |
|---|---|
200 OK | Success. Nothing found is also 200 with an empty result ({} or an empty list); there are no error fields in a 200 body |
400 | Invalid date, identifier, tour or query |
403 | Host/auth problem or plan does not include the endpoint |
404 | Unknown URL (no such endpoint) |
429 | Rate limit โ wait before retrying |
500 | Unexpected 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.
- Upcoming Matches
- Upcoming Matches (With Predictions & Odds Data)
- Live Scores, Stats & Odds
- Real-time (Socket.IO) Integration
- Results & Historical Data
- Player Profiles & Career Stats
- Head-to-Head Stats & Analysis
- Rankings
- Tournaments & Draws
- Tours Calendar (Men & Women) โ schedule and Active Tournaments
- Potential Matchups
- Reference Data & Search
- FAQ & Troubleshooting