Build a Python ATP & WTA live tennis scoreboard
Poll GET /tennis/matches/live with ETag 304 conditional caching, drill into live point_history, pair matches with the daily schedule, and switch to SSE push when you want real-time updates without polling.
Pro $59/mo: real-time scores, full archive since 1968, match webhooks. Free: 500 calls/month, live 60 s delayed, last 30 days. Read the docs
$ curl "https://api.citoapi.com/api/v1/tennis/matches/live?page_size=2" \
-H "x-api-key: YOUR_API_KEY"In short
Call GET /api/v1/tennis/matches/live with x-api-key and If-None-Match to render live ATP, WTA, Challenger, and ITF scoreboards in Python, then use /matches/live/{id} for point-by-point game state or /tennis/live/stream for Server-Sent Events.
1. What GET /tennis/matches/live returns
Every in-progress singles match across ATP, WTA, Grand Slams, Challengers, WTA 125s, and tracked ITF events appears in items[]. Each row gives canonical player ids, sets won, set scores, current game_score, server indicator (1 or 2), tiebreak_score, and live stats.
Live scoreboard payload
curl "https://api.citoapi.com/api/v1/tennis/matches/live?page_size=2" \
-H "x-api-key: YOUR_API_KEY"{
"success": true,
"items": [
{
"id": "m_2026_4893994",
"tour": "ATP",
"tournament_name": "John McEnroe",
"round_name": "Round not recorded",
"surface": "Unknown",
"best_of": 3,
"status": "IN_PROGRESS",
"player1": {
"id": "atp_210097",
"name": "Ben Shelton",
"ioc": "USA",
"seed": null,
"sets_won": 1,
"current_game_score": "15",
"is_serving": true
},
"player2": {
"id": "atp_209950",
"name": "Arthur Fils",
"ioc": "FRA",
"seed": null,
"sets_won": 1,
"current_game_score": "15",
"is_serving": false
},
"current_set": 3,
"game_score": "15-15",
"server": 1,
"tiebreak_score": null,
"sets": [
{
"set_number": 1,
"score": "6-2",
"tiebreak": null,
"is_completed": true
},
{
"set_number": 2,
"score": "3-6",
"tiebreak": null,
"is_completed": true
},
{
"set_number": 3,
"score": "5-3",
"tiebreak": null,
"is_completed": false
}
],
"last_updated_at": "2026-11-15T21:37:36.349237+00:00"
}
],
"total": 5
}Real response captured from production. Each match also carries stats when recorded.
2. Poll cleanly with ETag 304 Not Modified
The live board sets an ETag header on every 200 response. Sending that value back in If-None-Match makes unchanged polls return 304 Not Modified with no JSON body — the cleanest way to render a terminal or web scoreboard without wasting monthly credits.
live_scoreboard.py — ETag-cached ATP & WTA live ticker
import os
import time
import requests
API = "https://api.citoapi.com/api/v1/tennis"
KEY = os.environ["CITO_API_KEY"]
SESSION = requests.Session()
SESSION.headers.update({"x-api-key": KEY})
def format_match(m: dict) -> str:
p1, p2 = m["player1"], m["player2"]
s1 = "*" if p1.get("is_serving") else " "
s2 = "*" if p2.get("is_serving") else " "
sets = " ".join(s["score"] for s in m.get("sets", []))
game = m.get("tiebreak_score") or m.get("game_score") or "0-0"
return (
f"[{m.get('tour', '?')}] {m.get('tournament_name', '')} ({m.get('round_name', '')}) | "
f"{s1}{p1['name']} ({p1.get('sets_won', 0)}) vs {s2}{p2['name']} ({p2.get('sets_won', 0)}) | "
f"Sets: {sets} | Game: {game}"
)
def watch_live_board(interval_s: int = 5) -> None:
etag = None
while True:
headers = {"If-None-Match": etag} if etag else {}
resp = SESSION.get(f"{API}/matches/live", params={"page_size": 100}, headers=headers, timeout=10)
if resp.status_code == 200:
etag = resp.headers.get("ETag")
payload = resp.json()
print(f"\n--- Live matches: {payload.get('total', len(payload['items']))} ---")
for match in payload["items"]:
print(format_match(match))
elif resp.status_code == 304:
pass # Unchanged since last poll
else:
resp.raise_for_status()
time.sleep(interval_s)
if __name__ == "__main__":
watch_live_board()3. Read live point-by-point and daily schedules
Pass a live match id to GET /tennis/matches/live/{match_id} to read point_history (game-by-game points, server_id, winner_id, and points_seen_at timestamps). Once a match finishes, call GET /tennis/matches/{match_id}/timeline for the archived point timeline, or GET /tennis/schedule?date=YYYY-MM-DD to list the entire day's slate before matches start.
Live point-by-point detail
curl "https://api.citoapi.com/api/v1/tennis/matches/live/m_2026_4893994" \
-H "x-api-key: YOUR_API_KEY"{
"id": "m_2026_4893994",
"status": "IN_PROGRESS",
"current_set": 3,
"game_score": "15-15",
"server": 1,
"point_history": [
{
"set": 3,
"game": 8,
"server_id": "atp_209950",
"winner_id": "atp_209950",
"points": ["0:15","0:30","15:30","15:40"],
"points_seen_at": ["2026-11-15T21:34:47+00:00","2026-11-15T21:35:00+00:00","2026-11-15T21:35:20+00:00","2026-11-15T21:35:52+00:00"]
},
{
"set": 3,
"game": 9,
"server_id": "atp_210097",
"winner_id": null,
"points": ["15:0","15:15"],
"points_seen_at": ["2026-11-15T21:37:09+00:00","2026-11-15T21:37:29+00:00"]
}
]
}points_and_schedule.py — Live point log + SSE stream listener
import os
import requests
API = "https://api.citoapi.com/api/v1/tennis"
H = {"x-api-key": os.environ["CITO_API_KEY"]}
# 1. Today's ATP & WTA schedule
slate = requests.get(f"{API}/schedule", params={"date": "today", "tour": "ATP", "page_size": 20}, headers=H, timeout=10).json()
for item in slate["items"][:5]:
print(item["status"], item["tournament_name"], item["player1"]["name"], "vs", item["player2"]["name"])
# 2. Live point-by-point for one match
live = requests.get(f"{API}/matches/live", params={"page_size": 5}, headers=H, timeout=10).json()["items"]
if live:
mid = live[0]["id"]
detail = requests.get(f"{API}/matches/live/{mid}", headers=H, timeout=10).json()
for game in detail.get("point_history", [])[-2:]:
print(f"Set {game['set']} Game {game['game']} | Server {game['server_id']} | Points: {game['points']}")import json
import os
import requests
# Server-Sent Events works on every plan (60s delayed on Free/Starter; real-time on Pro+)
with requests.get(
"https://api.citoapi.com/api/v1/tennis/live/stream",
params={"tour": "ATP"},
headers={"x-api-key": os.environ["CITO_API_KEY"], "Accept": "text/event-stream"},
stream=True,
timeout=60,
) as resp:
resp.raise_for_status()
event_name = "message"
for raw in resp.iter_lines(decode_unicode=True):
if raw.startswith("event:"):
event_name = raw.split(":", 1)[1].strip()
elif raw.startswith("data:") and event_name in ("snapshot", "match_start", "match_update", "match_end"):
print(event_name, json.loads(raw.split(":", 1)[1]))4. Live freshness and plan behavior
| Live freshness | Measured / configured |
|---|---|
| Live board refresh | Every in-play match at least every 8 s; featured matches every 2.5 s |
| Newest in-play update when sampled | 0.5 to 2.3 s old (15 samples, 11 Nov 2026) |
| REST /tennis/matches/live | Served from the live board; responses cached at most 5 s |
| SSE /tennis/live/stream | Reads the board every 4 s and pushes only what changed |
| WebSocket | Pushes each point as it lands on the board (Scale, or Pro + $15) |
| Free and Starter | Live scores 60 s behind |
We do not quote a point-to-API latency: we cannot time a point against the umpire's clock.
Free keys give 500 calls/month with a 60-second live delay so you can build and test the scoreboard locally. Pro ($59/mo) removes the delay and unlocks real-time scores, odds, and webhooks.
Plans for tennis
| Free | Starter | Pro | Scale | Business CSV | |
|---|---|---|---|---|---|
| Price | $0 | $15/mo | $59/mo | $100/mo | $299/mo (+$99/mo extra sport) |
| Credits / mo | 500/month | 10,000/month | 250,000/month | 1,000,000/month | 3,000,000/month |
| Rate limit | 10/min | 30/min | 100/min | 400/min | 600/min |
| Live scores | 60 s delayed | 60 s delayed | Real time | Real time | Real time |
| History | Last 30 days | Last 90 days | Full archive (1968-) | Full archive (1968-) | Full archive (1968-) + Master/Delta CSV |
| Deep-history (>90d) sub-cap | 0 | 0 | 50,000/mo (5x narrow / bulk) | 100,000/mo (5x narrow / bulk) | Unlimited in quota |
| Prediction-market odds | 3-day free trial | Upgrade to Pro | Pre-match, live & history | Pre-match, live & history | API + opening/closing CSV |
| Point-in-time Elo | 3-day free trial | Career & leaders | Full 1968- history | Full 1968- history | API + pre-match CSV |
| Webhooks | No | No | Yes | Yes | Yes |
| WebSockets | No | No | +$15/mo (points + odds) | Included | Included (points + odds) |
| Bulk CSV exports | Sample CSV | — | — | — | Master + Daily Delta CSV (0 REST credits) |
| Commercial use | No | 1 product | Yes | Yes | Yes |
Tennis on each plan, as the API enforces it (checked 15 Nov 2026). Paid API plans: 7-day money-back guarantee.
Frequently asked
Ready to go
live ?
Pro unlocks real-time scores, point-by-point, prediction-market odds, point-in-time Elo back to 1968, and webhooks for $59/mo with a 7-day money-back guarantee. Free includes a 3-day odds & Elo trial; Business ($299/mo) delivers full CSV datasets.
Compare every plan