# Tennis Abstract match history scraper (`data_dino/tennis-abstract-scraper`) Actor

Collect a tennis player's complete match history from Tennis Abstract — tournament, round, result, surface, opponent, score, and ranks — one dataset item per match, via the site's own data path with no login or API key.

- **URL**: https://apify.com/data_dino/tennis-abstract-scraper.md
- **Developed by:** [Data Dino](https://apify.com/data_dino) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

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?

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 Abstract match history scraper

Collects a tennis player's **complete match history** from [Tennis Abstract](https://www.tennisabstract.com/) as structured records — one dataset item per match. No login, no API key, no quota.

### What you get

For each match, the scraper captures:

- **Player** – slug, full name, country, and tour (`ATP` / `WTA`).
- **Match context** – `date`, `tournament`, `surface`, tournament `level` and its human-readable `levelName`.
- **Result** – `round`, outcome (`win` / `loss`), `result` details, and the `score` line.
- **Seeding** – the player's `rank`, `seed`, and `entry` status.
- **Opponent** – name, rank, seed, entry, `opponentHand`, and country.
- **Details** – `bestOf` (sets), `minutes` when reported, and a stable `matchId`.
- **Source** – `matchUrl` and `sourceUrl` linking back to the match on Tennis Abstract.

### How to use

Just hit **Run** — the defaults pull Novak Djokovic's match history. Replace the player with anyone you want.

To customize:

1. Add one or more **players** — a slug (`NovakDjokovic`), a name (`Carlos Alcaraz`), or a full Tennis Abstract player URL.
2. Set a **max matches** cap (default 200, total across all players) — raise it for a fuller career pull.
3. Optionally filter by **start/end date**, **surface**, or **tournament level**.
4. Run. Results appear in the dataset as one item per match.

### Options

| Field | What it does |
| --- | --- |
| Players | Players to pull match histories for (one or more). |
| Max matches | Stop after N matches total across all players (default 200). |
| Start / End date | Inclusive date range filter (YYYY-MM-DD). |
| Surface | Only keep matches on Hard / Clay / Grass / Carpet. |
| Tournament level | Only keep matches at a given level (Grand Slam, Challenger, ITF, etc.). |
| Request pacing | Minimum seconds between requests to tennisabstract.com (default 3.0). |

### Notes

- The scraper uses the same data path as the Tennis Abstract website itself and needs no login or API key.
- It paces requests automatically and retries transient failures.
- Output is one JSON item per match in the default dataset, viewable and downloadable from the Output tab.

# Actor input Schema

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

One or more player identifiers: a slug (NovakDjokovic), a name (Carlos Alcaraz), or a full tennisabstract.com player URL. The scraper resolves each to the player's complete match history.

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

Stop after this many matches total across all players (keeps the most recent N). Leave empty for the full career.

## `since` (type: `string`):

Inclusive start date, YYYY-MM-DD. Leave empty for no lower bound.

## `until` (type: `string`):

Inclusive end date, YYYY-MM-DD. Leave empty for no upper bound.

## `surface` (type: `string`):

Only keep matches on this surface. Leave unset for all surfaces.

## `level` (type: `string`):

Only keep matches at this tournament level. Leave unset for all levels.

## `pacing` (type: `number`):

Minimum seconds between requests to tennisabstract.com. Leave at 3.0 unless you know the host tolerates faster pacing.

## Actor input object example

```json
{
  "players": [
    "RogerFederer"
  ],
  "maxItems": 200,
  "pacing": 3
}
```

# Actor output Schema

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

All scraped matches, one item per row. Key fields: playerSlug, playerName, tour, date, tournament, surface, level, round, result, rank, seed, entry, opponent, opponentRank, opponentHand, opponentCountry, bestOf, score, minutes, matchId, stats, sourceUrl.

# 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("data_dino/tennis-abstract-scraper").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("data_dino/tennis-abstract-scraper").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 data_dino/tennis-abstract-scraper --silent --output-dataset

```

## MCP server setup

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

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/MsUXudvo8K0h8MYPr/builds/wtaw9MnVrvZPx6Jc8/openapi.json
