Tennis API documentation

57 REST endpoints and a live WebSocket, documented from the API's own specification with real responses.

Real-time scores, the full archive since 1968 and webhooks are on Pro. Free keys: 500 calls/month, live 60 s delayed, last 30 days.

Credit metering & bulk CSVs: 0–90 day, live, and bio metadata queries cost 1 credit (ceil(ids/10) for batches). Queries spanning >= 91 days cost 5x narrow (+5/?include=) or 10 * ceil(limit/25) bulk (+5 * ceil(limit/25)/?include=) against both monthly credits and your >90d sub-cap (Free/Starter 0, Legacy 25k, Pro 50k, Scale/Business REST 100k, Business CSV $299/mo & Enterprise unlimited; 429 HISTORICAL_ARCHIVE_CAP_EXCEEDED only on >90d while <=90d & live stay 200 OK). For full backtests at 0 REST credits, Business CSV ($299/mo) delivers Master Baseline + Daily Delta CSVs.

The Tennis API is a REST API over HTTPS that returns JSON. Live scores also stream over a WebSocket. Every endpoint below is documented from the API's own OpenAPI document, and every example response is real output captured from the production API.

Base URL

text
https://api.citoapi.com/api/v1/tennis

Authentication

Send your API key in the x-api-key header (Authorization: Bearer <key> also works). For real-time scores, prediction-market odds, the full 1968+ Elo archive and webhooks, get Pro at citoapi.com/pricing?game=tennis; for bulk CSV datasets (2.1M+ matches + Elo + opening/closing odds) get Business ($299/mo); to evaluate, get a free key (includes a 3-day live odds & Elo trial) at citoapi.com/dashboard/keys?game=tennis. Keys are secret: call the API from your server, not from a browser.

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.citoapi.com/api/v1/tennis/matches/live"

Response format

Every response carries success: true or false. List endpoints return items with total, page, page_size and total_pages; single resources return their fields at the top level next to success.

json
{
  "success": true,
  "items": [ { "id": "m_2026_4764920", "tournament_name": "Wimbledon", "round": "F", "score": "6-7 7-6 6-3 6-4", "winner_id": "atp_206173" } ],
  "total": 31,
  "page": 1,
  "page_size": 2,
  "total_pages": 16
}

Pagination

List endpoints take page (from 1) and page_size. Each endpoint's maximum page_size is listed in its parameter table.

Conditional requests

Responses carry an ETag. Send it back in If-None-Match and an unchanged resource answers 304 Not Modified with no body, which is the cheapest way to poll.

Errors

Errors return success: false and an error object with a stable code, a message that says what to fix, and details for validation problems.

json
{
  "success": false,
  "error": {
    "code": "VALIDATION",
    "message": "date: Field required",
    "status": 422,
    "details": [ { "type": "missing", "loc": ["query", "date"], "msg": "Field required" } ]
  }
}
HTTPerror.codeMeaning
401MISSING_API_KEY / invalid keyNo key, or a key that is not valid.
403TRIAL_EXPIRED / PLAN_REQUIREDYour 3-day free odds & Elo trial ended or the requested extra requires Pro or Business.
403GAME_NOT_INCLUDEDA Starter key chose another sport; tennis is not on this key.
403HISTORY_WINDOW_EXCEEDEDThe record is older than your plan's history window (Free 30 days, Starter 90 days). The message names the window.
404NOT_FOUNDNo resource with that id.
422VALIDATIONA parameter is missing or invalid; details names it.
429RATE_LIMITToo many calls. Retry-After and X-RateLimit-* headers say when to retry.
503SERVICE_UNAVAILABLEThe data service is briefly unavailable. Safe to retry.

Plans and limits

Limits and credit multipliers are enforced by the API on every account without grandfathering. Calls inside 0–90 days, live/upcoming endpoints, and player bio lookups cost 1 credit (or ceil(ids/10) for batch lookups). Requests spanning >= 91 days incur historical multipliers: 5x (+5 per ?include=) for narrow lookups (limit <= 50, span <= 30d, page <= 1, offset = 0, no cursor/year/season), or 10 * ceil(limit / 25) (+5 * ceil(limit / 25) per ?include=) for bulk or paginated scans, enforced both pre-handler and post-response. The archive back to 1968, real-time scores, and prediction-market odds start on Pro (Free includes a 3-day live odds & Elo trial). Business CSV ($299/mo, +$99/mo per extra sport) adds 3M credits/mo, 600 req/min, unlimited >90d REST sub-cap, and full Master Baseline + Rolling Daily Delta CSV exports at 0 REST credits.

PlanCredits / mo>90d sub-capCalls / minHistory & EloLive scores & OddsWebhooksWebSockets
Free500010Last 30 days + 3-day Elo trial60-second delay + 3-day odds trialNoNo
Starter ($15, tennis)10,000030Last 90 days + career/leader Elo60-second delay (odds on Pro)NoNo
Pro ($59)250,00050,000/mo (5x/bulk)100Full archive (1968-) + 2.1M EloReal time + pre-match & live oddsYes+$15/mo (points + odds)
Scale ($100)1,000,000100,000/mo (5x/bulk)400Full archive (1968-) + 2.1M EloReal time + pre-match & live oddsYesIncluded
Business ($299 CSV)3,000,000Unlimited in quota600Full archive + Master & Delta CSV (0 REST credits)Real time + opening/closing odds CSVYesIncluded (points + odds)

Real-time scores, the full archive since 1968 and webhooks are on Pro. Free keys: 500 calls/month, live 60 s delayed, last 30 days.