# Tennis Match History: ATP & WTA Player Results (`trovevault/tennis-match-history`) Actor

Get the match history of any ATP or WTA tennis player: date, tournament, round, opponent, seeds, result and set-by-set score with tiebreaks. Built for AI agents, bettors and analysts.

- **URL**: https://apify.com/trovevault/tennis-match-history.md
- **Developed by:** [Trove Vault](https://apify.com/trovevault) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.85 / 1,000 matches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Tennis Match History returns the most recent matches for any tennis players you name, one row per matche, newest first. It is built for AI agents, bettors, fantasy players and analysts who need a clean, structured tennis match history instead of copying tables by hand.

### What does Tennis Match History do?

Tennis Match History looks up each name you give it, finds the right tennis player even when other sports have someone with the same name, and returns their latest matches with tournament, round, seeds, result, set-by-set score with tiebreaks, and sets won and lost.

- Type names in plain text (Jannik Sinner, Carlos Alcaraz, Iga Swiatek, Aryna Sabalenka); no IDs needed.
- Get recent form in one call: the newest matches first, across seasons when needed.
- Ask for many names in one run and get one combined table.
- Export to JSON, CSV, Excel or straight into your AI agent through MCP.

### What data can you extract?

| Field | Meaning |
| --- | --- |
| `query` | Query |
| `sport` | Sport identifier |
| `tour` | ATP or WTA |
| `entityType` | Player, team or fighter |
| `entityId` | ESPN entity ID |
| `entityName` | Player |
| `date` | Date |
| `tournament` | Tournament |
| `location` | Location |
| `indoor` | Indoor |
| `round` | Round |
| `statusDetail` | Match status |
| `matchType` | Match category |
| `seed` | Seed |
| `opponent` | Opponent |
| `opponentId` | ESPN opponent ID |
| `opponentSeed` | Opponent seed |
| `result` | Result |
| `score` | Score |
| `sets` | Set-by-set scores and tiebreaks |
| `eventId` | ESPN event ID |
| `setsWon` | Sets won |
| `setsLost` | Sets lost |
| `scrapedAt` | When this run retrieved the row |
| `runId` | Your optional workflow identifier |

Every row also includes `query` (the name you entered), `entityId`, `scrapedAt` and your optional `runId`.

### How to use Tennis Match History

1. Open Tennis Match History on Apify and sign in or create a free account.
2. Add one or more names in **Players**.
3. Set **Maximum matches per name** (10 is a good default for recent form).
4. Click **Start** and download the results, or call the Actor from the API or an AI agent.

#### Input examples

```json
{
  "players": [
    "Jannik Sinner",
    "Carlos Alcaraz"
  ],
  "maxItems": 10
}
```

```json
{
  "players": [
    "Iga Swiatek"
  ],
  "season": "2025",
  "maxItems": 60
}
```

#### Output example

```json
{
  "query": "Jannik Sinner",
  "sport": "tennis",
  "tour": "ATP",
  "entityType": "player",
  "entityId": "3623",
  "entityName": "Jannik Sinner",
  "date": "2026-07-12T15:05Z",
  "tournament": "Wimbledon",
  "location": "London, Great Britain",
  "indoor": false,
  "round": "Final",
  "statusDetail": "Final",
  "matchType": "Men's Singles",
  "seed": 1,
  "opponent": "Alexander Zverev",
  "opponentId": "2375",
  "opponentSeed": 2,
  "result": "W",
  "score": "6-7(7) 7-6(2) 6-3 6-4",
  "sets": [
    {
      "player": 6,
      "opponent": 7,
      "tiebreak": 7
    },
    {
      "player": 7,
      "opponent": 6,
      "tiebreak": 7
    },
    {
      "player": 6,
      "opponent": 3,
      "tiebreak": null
    },
    {
      "player": 6,
      "opponent": 4,
      "tiebreak": null
    }
  ],
  "eventId": "188-2026",
  "setsWon": 3,
  "setsLost": 1,
  "scrapedAt": "2026-10-09T12:00:00.000Z",
  "runId": null
}
```

### Who uses Tennis Match History?

- **Betting and prediction-market research:** check a player's recent form, three-set record and tiebreak results before a match market closes.
- **Tennis media and fantasy:** build form guides and head-to-head context for previews.
- **Analysts:** track a player's results through a season, tournament by tournament.

Schedule a run before each game day if you track the same names every week.

### Why use Tennis Match History?

| Feature | Typical sports scrapers | Tennis Match History |
| --- | --- | --- |
| Input | Site-specific slugs or IDs | Plain names, URLs or IDs |
| Same-name athletes | Often picks the wrong person | Filtered to tennis only |
| Output shape | Raw page tables | One clean row per matche, newest first |
| Several names per run | Usually one | Up to 50 |
| AI agent use | Not described | Short, predictable rows for MCP tools |

### How much will Tennis Match History cost?

Tennis Match History uses pay-per-event pricing. At current Free-tier rates, the default 4 GB run-start charge is about $0.004, plus $0.001 per returned matche; 10 rows therefore cost about $0.014. Your plan tier and Apify's current rates may change the total. Check the Pricing tab and request only the rows you need.

### Run it through the Apify API

```bash
curl -X POST "https://api.apify.com/v2/acts/trovevault~tennis-match-history/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"players": ["Jannik Sinner", "Carlos Alcaraz"], "maxItems": 10}'
```

### Limitations

- Singles only. Byes are skipped. Surface is not part of ESPN's data; use the tournament name to infer it.
- Data comes from ESPN's public sports data, so coverage and update timing follow ESPN and may lag the end of an event.
- Only completed matches are returned; scheduled ones are skipped.

### Troubleshooting

- **No rows returned:** check the spelling or use an ESPN URL or ID. Some names are not present in ESPN's database, and upcoming matches are not included.
- **Fewer rows than requested:** the source may have fewer completed results for that name, season or competition.
- **Some names failed:** successful names are still returned. Check the `RUN_SUMMARY` key-value record for the per-name errors and retry only those names.
- **Rows are missing from your existing dataset:** confirm the `datasetId` belongs to a dataset you can write to. The run's default dataset is still populated separately.

### FAQ

#### Can I use Tennis Match History with MCP and AI agents?

Yes. Tennis Match History works through the Apify MCP server in Claude, ChatGPT, Cursor and other MCP clients. Ask your agent for a tennis player's last 10 matches and it can call the Actor directly.

#### Can I use Tennis Match History with the Apify API?

Yes. Use the `run-sync-get-dataset-items` endpoint shown above, or the Apify JavaScript and Python clients.

#### How many matches can I get per run?

Up to 200 matches per name and up to 50 names per run.

#### Can I get historical matches?

Yes. Set **Season** to read a past season, or raise **Maximum matches per name** and the Actor goes back across seasons.

#### Does it work with integrations?

Yes. Send results to Google Sheets, Make, Zapier, n8n, Slack or webhooks with Apify integrations, or append them to an existing dataset with **Dataset ID**.

#### Is it legal to collect this data?

Tennis Match History collects factual sports results and statistics that are publicly available. You are responsible for how you use the data, including any terms of the sources and betting rules in your country.

### Your feedback

Found a missing matche or a wrong name match? Open an issue on the Issues tab and include the name you entered.

# Actor input Schema

## `players` (type: `array`):

ATP or WTA players by name, ESPN player URL or ESPN id. The tour is detected automatically. Format: one name per line. Examples: Jannik Sinner, Carlos Alcaraz, Iga Swiatek, Aryna Sabalenka.

## `maxItems` (type: `integer`):

How many of the most recent matches to return for each name, newest first. Example: 10 for recent form, 82 for a full NBA regular season. Each matche is one dataset row.

## `season` (type: `string`):

Calendar year to read. Example: 2025. Leave empty to get the most recent matches, going back up to three seasons until maxItems is reached.

## `datasetId` (type: `string`):

Existing Apify dataset to append the same rows to, in addition to this run's default dataset. Useful when several runs feed one dataset.

## `runId` (type: `string`):

Your own workflow identifier, copied into every output row as runId. Example: weekly-report-2026-10-12.

## Actor input object example

```json
{
  "players": [
    "Jannik Sinner"
  ],
  "maxItems": 10
}
```

# Actor output Schema

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

No description

# 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 = {
    "players": [
        "Jannik Sinner"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("trovevault/tennis-match-history").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 = {
    "players": ["Jannik Sinner"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("trovevault/tennis-match-history").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 '{
  "players": [
    "Jannik Sinner"
  ],
  "maxItems": 10
}' |
apify call trovevault/tennis-match-history --silent --output-dataset

```

## MCP server setup

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

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/fhjerIZHPSeJX8kpJ/builds/bX2S5vTTHqBZqjZia/openapi.json
