API Reference
Miscellaneous
Reference data endpoints for countries, court surfaces, round types, tournament ranking tiers, and a full-text search across players and tournaments.
{ "data": [...] } wrapper. Field names use the entity alias prefix from the underlying SQL query (e.g. country_id, country_name rather than id, name).
Endpoint Summary
| Method | Path | Description |
|---|---|---|
| GET | /tennis/v2/countries | All countries |
| GET | /tennis/v2/ranking | All ranking tiers / levels |
| GET | /tennis/v2/round | All round types |
| GET | /tennis/v2/court | All court surface types |
| GET | /tennis/v2/search?search={query} | Search players & tournaments by name |
Countries
No path or query parameters are required. Use the returned country_acronym values to cross-reference nationality data in player and tournament objects â both use the same 3-letter IOC codes.
Response Schema
Country Object
Spain, United States).
ESP, USA, GBR). This is the same value used in countryAcr fields across Players, Fixtures, and Tournaments.
Example Request
curl --request GET \
--url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/countries' \
--header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
--header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'
Example Response
{
"data": [
{ "country_id": 1, "country_name": "Spain", "country_acronym": "ESP" },
{ "country_id": 2, "country_name": "Italy", "country_acronym": "ITA" },
{ "country_id": 3, "country_name": "United States", "country_acronym": "USA" },
{ "country_id": 4, "country_name": "France", "country_acronym": "FRA" }
]
}
Ranking Tiers
Returns every tier level defined in the system. The rank_id corresponds to the rankId foreign key on Tournament objects. ATP and WTA use different tier systems â see the Tournaments page for details on how ATP uses rank.name while WTA uses its own tier field.
Response Schema
Rank Object
rankId field on Tournament objects.
Grand Slam, ATP Masters 1000, ATP 500, ATP 250, WTA 1000, WTA 500, WTA 250, ITF.
Example Request
curl -G 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ranking' \
-H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'
Example Response
{
"data": [
{ "rank_id": 1, "rank_name": "Grand Slam" },
{ "rank_id": 2, "rank_name": "ATP Masters 1000" },
{ "rank_id": 3, "rank_name": "ATP 500" },
{ "rank_id": 4, "rank_name": "ATP 250" },
{ "rank_id": 5, "rank_name": "WTA 1000" },
{ "rank_id": 6, "rank_name": "WTA 500" }
]
}
Rounds
The round_id corresponds to the roundId foreign key on Fixture objects. Rounds progress from qualifying (lowest) through to Final (highest). Knowing the round ID lets you filter or label fixtures precisely.
Response Schema
Round Object
roundId field on Fixture objects. Lower IDs generally correspond to later rounds (Final = 1), but verify with actual data as IDs may vary by tour.
Final, Semi-Final, Quarter-Final, Round of 16, Round of 32, Round of 64, Round of 128, Qualifying Round 1, Qualifying Round 2.
Example Request
curl -G 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/round' \
-H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'
Example Response
{
"data": [
{ "round_id": 1, "round_name": "Final" },
{ "round_id": 2, "round_name": "Semi-Final" },
{ "round_id": 3, "round_name": "Quarter-Final" },
{ "round_id": 4, "round_name": "Round of 16" },
{ "round_id": 5, "round_name": "Round of 32" },
{ "round_id": 6, "round_name": "Round of 64" },
{ "round_id": 7, "round_name": "Round of 128" }
]
}
Courts
Court surface IDs are used as the courtId foreign key on Tournament objects, and as a filter value for the TourCourt query parameter when fetching fixtures. Note that the Player entity separately tracks surface-specific win/loss statistics (see Players â Surface Breakdown).
Response Schema
Court Object
courtId in Tournament objects and the TourCourt filter parameter.
Hard (outdoor), Clay, Grass, Carpet, Indoor Hard. Outdoor hard and indoor hard are tracked separately in player surface statistics.
Example Request
curl -G 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/court' \
-H 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
-H 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'
Example Response
{
"data": [
{ "court_id": 1, "court_name": "Hard" },
{ "court_id": 2, "court_name": "Clay" },
{ "court_id": 3, "court_name": "Grass" },
{ "court_id": 4, "court_name": "Carpet" },
{ "court_id": 5, "court_name": "Indoor Hard" }
]
}
Search
How Search Works
The search endpoint runs a case-insensitive substring match (ILIKE '%query%') against player names and tournament names simultaneously, across both ATP and WTA databases. Results are returned as four separate category buckets â ATP players, WTA players, ATP tournaments, and WTA tournaments â each capped at 5 results. Each bucket also includes a total count of all matching records even if more than 5 exist.
For players, it also filters out records where the name contains a slash (/), which removes doubles pair entries from appearing in individual player results.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
search Required |
string | Search term. Partial names work â Alcar matches Carlos Alcaraz. URL-encode spaces as %20. |
Response Schema
Top-level Envelope
player_atp, player_wta, tournament_atp, tournament_wta.
Category Bucket
player_atp, player_wta, tournament_atp, tournament_wta.
result).
Player Result Object
Carlos Alcaraz).
YYYY-MM-DD format, or null if unknown.
/countries endpoint.
Tournament Result Object
Wimbledon, Roland Garros).
Example Request
curl --request GET \
--url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/search?search=Alcaraz' \
--header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
--header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'
const query = 'Alcaraz';
const res = await fetch(
`https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/search?search=${encodeURIComponent(query)}`,
{ headers: { 'X-RapidAPI-Key': 'YOUR_KEY', 'X-RapidAPI-Host': 'tennis-api-atp-wta-itf.p.rapidapi.com' } }
);
const results = await res.json();
import requests
r = requests.get(
"https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/search",
params={"search": "Alcaraz"},
headers={"X-RapidAPI-Key": "YOUR_KEY", "X-RapidAPI-Host": "tennis-api-atp-wta-itf.p.rapidapi.com"}
)
print(r.json())
Example Response
{
"data": [
{
"category": "player_atp",
"total": 1,
"result": [
{
"name": "Carlos Alcaraz",
"birthday": "2003-05-05",
"countryAcr": "ESP"
}
]
},
{
"category": "player_wta",
"total": 0,
"result": []
},
{
"category": "tournament_atp",
"total": 0,
"result": []
},
{
"category": "tournament_wta",
"total": 0,
"result": []
}
]
}
Search Tips
- Use full or partial names:
Djoko,Wimbledon,Roland - Country codes work for tournaments:
ESP,USA - The match is case-insensitive â
alcarazandALCARAZboth work - URL-encode spaces and special characters (e.g.
Roland%20GarrosorRoland+Garros) - Each category returns at most 5 results; use
totalto know if there are more matches - To look up a specific player's full profile after searching, pass their
nameto the Players endpoint