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 |
Get Countries
Response Properties
| Parameter | Type | Description |
|---|---|---|
data[0].country_name | string | Full English country name (e.g. Spain, United States). |
data[0].country_acronym | string | 3-letter country code following IOC/tennis convention (e.g. ESP, USA, GBR). This is the same value used in countryAcr fields across Players, Fixtures, and Tournaments. |
Get 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 Properties
| Parameter | Type | Description |
|---|---|---|
data[0].rank_id | string | Tier ID β matches the rankId field on Tournament objects. |
data[0].rank_name | string | Human-readable tier label. Typical values include Grand Slam, ATP Masters 1000, ATP 500, ATP 250, WTA 1000, WTA 500, WTA 250, ITF. |
Get 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 Properties
| Parameter | Type | Description |
|---|---|---|
data[0].round_id | string | Round ID β matches the 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. |
data[0].round_name | string | Round name. Typical values: Final, Semi-Final, Quarter-Final, Round of 16, Round of 32, Round of 64, Round of 128, Qualifying Round 1, Qualifying Round 2. |
Get 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 Properties
| Parameter | Type | Description |
|---|---|---|
data[0].court_id | string | Court surface ID β matches courtId in Tournament objects and the TourCourt filter parameter. |
data[0].court_name | string | Surface name. Typical values: Hard (outdoor), Clay, Grass, Carpet, Indoor Hard. Outdoor hard and indoor hard are tracked separately in player surface statistics. |
Get 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 Parameter
| Parameter | Type |
|---|---|
{search}Required | string |
Search term. Partial names work β Alcar matches Carlos Alcaraz. URL-encode spaces as %20. Example: search=Carlos Alcaraz | |
Response Properties
| Parameter | Type | Description |
|---|---|---|
data[0].category | string | One of: player_atp, player_wta, tournament_atp, tournament_wta. |
data[0].total | number | Total number of matching records in the database for this category (may be larger than the 5 returned in result). |
data[0].result | array | Up to 5 matching objects. See Player Result and Tournament Result schemas below. |