Getting Started
Your First Request
This guide walks you through authentication, the base URL structure, query parameters, and working code examples so you can integrate the Tennis API in minutes.
Step 1 โ Subscribe on RapidAPI
The Tennis API is distributed exclusively through RapidAPI.
- Visit the Tennis API (ATP, WTA, ITF) listing on RapidAPI.
- Click Subscribe and select a pricing plan.
- Copy your
X-RapidAPI-Keyfrom the Security tab or the code snippets panel.
X-RapidAPI-Key in client-side JavaScript or public repositories. Use environment variables or a secrets manager.
Step 2 โ Base URL & Headers
Every request targets:
https://tennis-api-atp-wta-itf.p.rapidapi.com
Include these two headers on every request:
| Header | Value | |
|---|---|---|
X-RapidAPI-Key |
YOUR_RAPIDAPI_KEY |
Required |
X-RapidAPI-Host |
tennis-api-atp-wta-itf.p.rapidapi.com |
Required |
Step 3 โ URL Structure
Most endpoints follow this pattern:
GET /tennis/v2/{type}/{module}/{params}
| Segment | Values | Description |
|---|---|---|
{type} | atp ยท wta | Tour selection |
{module} | fixtures ยท player ยท h2h ยท ranking ยท tournament | Resource module |
{params} | IDs, dates, etc. | Module-specific path parameters |
Step 4 โ Make Your First Call
Let's fetch today's ATP fixtures as a quick smoke-test:
curl --request GET \
--url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/atp/fixtures' \
--header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
--header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'
const response = await fetch(
'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/atp/fixtures',
{
method: 'GET',
headers: {
'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
'X-RapidAPI-Host': 'tennis-api-atp-wta-itf.p.rapidapi.com'
}
}
);
const data = await response.json();
console.log(data);
import requests
url = "https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/atp/fixtures"
headers = {
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host": "tennis-api-atp-wta-itf.p.rapidapi.com"
}
response = requests.get(url, headers=headers)
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/atp/fixtures",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Key: YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response Format
All responses are JSON arrays or objects. A typical fixtures response looks like:
[
{
"id": 482910,
"date": "2025-06-02T10:00:00.000Z",
"player1Id": 104925,
"player2Id": 106421,
"tournamentId": 8871,
"roundId": 3,
"player1": {
"id": 104925,
"name": "Carlos Alcaraz",
"countryAcr": "ESP"
},
"player2": {
"id": 106421,
"name": "Jannik Sinner",
"countryAcr": "ITA"
}
}
]
Query Parameters
Several endpoints support optional query parameters for filtering. These are passed as standard URL query strings:
| Parameter | Type | Description |
|---|---|---|
PlayerGroup |
string | Filter fixtures by match type: singles, doubles, or both (default). |
TourRank |
string | Comma-separated tournament rank IDs to filter by. Requires tournament include. |
TourCourt |
string | Comma-separated court type IDs. Requires tournament include. |
TourCountry |
string | Comma-separated country acronyms (e.g. USA,FRA). Requires tournament include. |
TourRank, TourCourt, TourCountry) only take effect when the corresponding relation is requested using an include query parameter.
Rate Limits
A server-side throttle of 100 requests per minute per IP applies to all endpoints. On breach, the API returns:
{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}
Next Steps
Now that you can make requests, explore the individual modules:
- Fixtures โ match schedule, live fixtures, date-range queries
- Players โ player profiles, stats, surface summaries
- Head-to-Head โ rivalry records and per-match stats
- Rankings โ live ATP & WTA world rankings
- Tournaments โ event calendar, seasons, past champions
- Miscellaneous โ reference data and full-text search