# Tennis Data & Analytics (`livetennisapi/tennis-data-analytics`) Actor

Real-time tennis scores, players, match-winner market prices, and model win-probability analysis. Live match streaming to dataset.

- **URL**: https://apify.com/livetennisapi/tennis-data-analytics.md
- **Developed by:** [Live Tennis API](https://apify.com/livetennisapi) (community)
- **Categories:** Developer tools, AI, News
- **Stats:** 6 total users, 2 monthly users, 99.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 list fetches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Tennis Data & Analytics

Real-time tennis data for **ATP, WTA, Challenger and ITF** — singles and doubles.
Live scores, players and rankings, match-winner market prices, and model-driven
win-probability, delivered straight into an Apify dataset.

Pay per event. No subscription, no API key to manage.

### What you can fetch

| Resource | What you get |
|---|---|
| `live` | Every match currently in progress, with live score state |
| `history` | Recently completed matches with the derived winner |
| `players` | Player search — bio, ranking, country, tour |
| `match` | Full detail for one match |
| `score` | Current score only — the lowest-latency read |
| `analysis` | Model win-probability, confidence and key factors |
| `stream` | Live WebSocket feed streamed to your dataset for N minutes |

### Score format

`sets` is `[sets_p1, sets_p2]`.

`games` is `[games_p1, games_p2]` where **each side is a per-set list** — so
`[[6,3,2],[4,6,1]]` reads 6-4, 3-6, 2-1. It is player-major, not set-major;
reading it the other way gives a plausible-looking but wrong scoreline.

All timestamps are UTC ISO 8601 with a `Z` suffix.

### Prefer to call the API directly?

This Actor wraps the [Live Tennis API](https://livetennisapi.com). If you would
rather integrate it into your own application, there are official clients:

| Language | Install |
|---|---|
| Python | `pip install livetennisapi` |
| JavaScript / TypeScript | `npm install livetennisapi` |
| MCP server for LLM agents | `npx livetennisapi-mcp` |

Both SDKs are typed, MIT licensed, and ship a `livetennis` CLI plus a
reconnecting client for the WebSocket feed. The MCP server gives Claude, Cursor
and other agents 12 read-only tools over the same data, and is listed in the
official MCP Registry.

- **Full API reference** — https://docs.livetennisapi.com/reference.html
- **OpenAPI 3.1 specification** — https://github.com/livetennisapi/openapi
- **Source, all MIT** — https://github.com/livetennisapi
- **Plans and pricing** — https://livetennisapi.com

### What this Actor returns, and what else we publish

This Actor is pay-per-result, so there are no tiers to choose between here — every run
returns the same full data set, and you pay only for the rows you take. Tiered
subscriptions exist on the direct plans, where the difference is request volume and a
few extra surfaces; if you would rather subscribe than pay per result, the comparison
lives at https://livetennisapi.com/#pricing.

Two sibling products cover jobs this Actor is not shaped for:

| Product | What it is for |
|---|---|
| [Break-point Alerts](https://livetennisapi.com/break-point-alerts) | Push notification the moment a break point forms, with live win-probability and a swing score. Telegram, Discord, email, SMS or WhatsApp — no polling. |
| [Historical Data API](https://livetennisapi.com/historical-tennis-data-api) | Completed-match archive: point-by-point tape with model win-probability per point, plus bulk monthly exports for backtesting. |

Use this Actor when you want tennis data landing in an Apify dataset on a schedule; use
the alerts product when you need to be told about a moment rather than poll for it; use
the history API when you are training or backtesting against finished matches.

### Support

Questions or a data problem? Open an issue at
https://github.com/livetennisapi/openapi/issues or see https://livetennisapi.com

# Actor input Schema

## `resource` (type: `string`):

What to fetch.

## `matchId` (type: `integer`):

Required for match / score / analysis.

## `search` (type: `string`):

Name substring for resource=players.

## `limit` (type: `integer`):

Page size for list resources (max 200).

## `streamMinutes` (type: `integer`):

resource=stream: how long to stream live scores into the dataset (1-60).

## Actor input object example

```json
{
  "resource": "live",
  "limit": 50,
  "streamMinutes": 5
}
```

# Actor output Schema

## `results` (type: `string`):

All rows returned by this run, in the default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("livetennisapi/tennis-data-analytics").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("livetennisapi/tennis-data-analytics").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call livetennisapi/tennis-data-analytics --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,livetennisapi/tennis-data-analytics"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ehKLegQeHoshVHCuG/builds/0QkIt7lq9qOcqrrgf/openapi.json
