← Developer Blog

Tennis Stats API & Player Database

A tennis stats API for player profiles, ATP/WTA rankings and Elo ratings. Free player lookups, Pro ranking tables. Real endpoints, curl + Python + JS.

· · By the Live Tennis API team

A tennis stats API is an HTTP service that returns structured player data — profiles, current ATP/WTA rankings, and Elo ratings — instead of scraped HTML. Live Tennis API serves a player's own profile and ranking on the free tier via GET /players/{id}; the full rank-ordered ranking table is a Pro endpoint.

All requests go to the base URL https://api.livetennisapi.com/api/public/v1 and authenticate with an X-API-Key header. Grab a free key (no card) at livetennisapi.com/subscribe/free, then read on.

What the player database returns

GET /players/{id} is the core of the stats surface. It returns a player's profile plus their current world ranking and Elo rating — and it is available on the free tier. Coverage spans ATP, WTA, Challenger and ITF.

curl -s https://api.livetennisapi.com/api/public/v1/players/1 \
  -H "X-API-Key: $LIVE_TENNIS_API_KEY"

The response carries the player's identity (name, country, handedness, date of birth) alongside their live standing — the current ranking position and Elo. Because it is the current state, a free key is enough for a "who is this player, and where do they sit right now" lookup.

Ranking tables: ATP, WTA, Elo, UTR

To pull a rank-ordered leaderboard rather than one player, use GET /rankings with a system parameter. The listing endpoint is Pro ($29.99/mo); a single player's own ranking on /players/{id} stays free.

# The top of the current ATP table (Pro)
curl -s "https://api.livetennisapi.com/api/public/v1/rankings?system=atp&limit=20" \
  -H "X-API-Key: $LIVE_TENNIS_API_KEY"

system accepts atp, wta, elo, and utr. The ATP and WTA systems return the official published tables; elo returns our Elo-rating order, a strength metric that reacts to results faster than the ranking points cycle.

Quickstart in Python

Every call is the same three pieces — base URL, path, and the X-API-Key header:

import os, requests

BASE = "https://api.livetennisapi.com/api/public/v1"
headers = {"X-API-Key": os.environ["LIVE_TENNIS_API_KEY"]}

# Free: one player's profile, current ranking and Elo
r = requests.get(f"{BASE}/players/1", headers=headers, timeout=10)
r.raise_for_status()
print(r.json())

# Pro: the ordered ATP table, top 20
r = requests.get(f"{BASE}/rankings", params={"system": "atp", "limit": 20},
                 headers=headers, timeout=10)
r.raise_for_status()
print(r.json())

There's also an official Python SDK (pip install livetennisapi) that wraps these same endpoints.

Quickstart in JavaScript

const BASE = "https://api.livetennisapi.com/api/public/v1";
const headers = { "X-API-Key": process.env.LIVE_TENNIS_API_KEY };

// Free: player profile + current ranking + Elo
const player = await (await fetch(`${BASE}/players/1`, { headers })).json();
console.log(player.name, player.ranking, player.elo);

// Pro: rank-ordered WTA table
const table = await (await fetch(`${BASE}/rankings?system=wta&limit=20`, { headers })).json();
console.log(table);

An official JavaScript SDK (npm i livetennisapi) wrapping these same endpoints is available too.

Tiers at a glance

The free tier answers "current state of play" questions; the ranking table endpoint is where Pro begins. Completed-match history and point-by-point tape live on Basic — see the point-by-point data guide.

Where this fits

Player stats pair naturally with live scores and the broader surface. For the full endpoint map, tiers and a longer quickstart, start at the tennis API developer guide. For live ATP/WTA scores specifically, see the tennis scores API.

Every endpoint is documented at docs.livetennisapi.com with an OpenAPI spec at github.com/livetennisapi/openapi. An MCP server at mcp.livetennisapi.com exposes the same data to LLM agents.

Frequently asked questions

Is the tennis stats API free?

Yes, in part. A free key (no card, from livetennisapi.com/subscribe/free) covers player profiles with their current ranking and Elo rating via GET /players/{id}, at 30 requests/minute and 100/day. The full rank-ordered ranking table (GET /rankings) is a Pro-tier endpoint at $29.99/mo.

How do I get ATP and WTA rankings?

Call GET /rankings with a system parameter — atp or wta — plus an optional limit, authenticating with your X-API-Key header. The listing is on the Pro tier. A single player's own current ranking is available for free on GET /players/{id}.

Does the API include Elo ratings?

Yes. Each player's current Elo rating is returned on their free GET /players/{id} profile. You can also list players in Elo order with GET /rankings?system=elo, which is a Pro endpoint. Elo reacts to match results faster than the official points cycle.

Which tours does the player database cover?

ATP, WTA, Challenger and ITF. It does not cover table tennis. Profiles carry identity fields (name, country, handedness, date of birth) plus the player's current ranking and Elo rating.

What ranking systems are supported?

The /rankings listing accepts system=atp, wta, elo and utr. ATP and WTA return official published tables; elo returns our Elo-rating order; utr returns Universal Tennis Rating order. The listing endpoint requires the Pro plan.

Built with the Live Tennis API — real-time scores, players, odds and model win-probability for ATP, WTA, Challenger and ITF.

API reference SDKs on GitHub Plans from $9.99/mo