# Tennis Abstract Scraper - Rankings, Elo & Player Match (`serj_henrique/tennis-abstract-scraper`) Actor

Extract complete tennis player data from TennisAbstract.com: career match history, per-match statistics (aces, hold %, break %, dominance ratio), tour-level and challenger seasonal summaries, and year-end Elo rankings — delivered as clean JSON on Apify.

- **URL**: https://apify.com/serj\_henrique/tennis-abstract-scraper.md
- **Developed by:** [Sergio Henrique](https://apify.com/serj_henrique) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.90 / 1,000 all-results-sections

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?

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 Abstract Scraper — Player Profiles, Match Results & Seasonal Statistics

Extract complete tennis player data from TennisAbstract.com: career match history, per-match statistics (aces, hold %, break %, dominance ratio), tour-level and challenger seasonal summaries, and year-end Elo rankings — delivered as clean JSON on Apify.

***

### What it does

The **Tennis Abstract Scraper** is an Apify Actor that pulls structured, analysis-ready tennis data for any ATP or WTA player. Rather than leaving you to manually browse [TennisAbstract.com](https://www.tennisabstract.com), this Actor automates the entire data extraction pipeline and returns well-formed JSON organized into five distinct datasets:

- **Player Profile** — biographical and ranking data (full name, country, date of birth, playing hand, current and peak ATP rank, Elo rating, age, and playing style).
- **All Match Results** — every recorded match with tournament, surface, round, score, opponent details, and per-match serving / returning statistics.
- **Tour-Level Seasons** — year-by-year statistical summaries for ATP/WTA Tour events (win-loss, hold %, break %, aces, service/return percentages, dominance ratio).
- **Challenger Seasons** — the same statistical template, aggregated for Challenger-level events.
- **Year-End Rankings** — end-of-season ATP, WTP, and Elo rankings broken down by overall, hard-court, clay-court, and grass-court surfaces.

Each section can be toggled on or off independently, so you only pay for the data you actually need.

***

### Use cases

- **Tennis analytics & scouting** — feed match-by-match statistics into a modeling pipeline to identify performance trends, surface-specific strengths, or head-to-head patterns.
- **Betting & prediction models** — use hold %, break %, dominance ratio, and Elo ratings as features for match outcome or total-games predictors.
- **Historical player comparison** — pull profile and seasonal data for multiple players (e.g., Federer vs. Nadal vs. Djokovic) and compare career trajectories in a spreadsheet or BI tool.
- **Fan & media research** — quickly gather career summaries, match logs, and ranking histories without navigating the source website.
- **Academic & statistical research** — access structured, time-series tennis statistics for publications, theses, or data journalism projects.

***

### Input

| Parameter | Type | Default | Description |
|---|---|---|---|
| `player_name` | string | `Jannik Sinner` | The player's name as it appears on TennisAbstract.com. |
| `include_all_results_section` | boolean | `true` | Fetch the complete career match log with per-match statistics. |
| `include_tour_level_seasons_section` | boolean | `true` | Fetch year-by-year ATP/WTA Tour-level seasonal summaries. |
| `include_challenger_seasons_section` | boolean | `false` | Fetch year-by-year Challenger-level seasonal summaries. |
| `include_year_end_rankings_section` | boolean | `false` | Fetch year-end ATP, WTP, and Elo rankings for each season. |
| `max_results` | integer | `1000` | Hard cap on the total number of records returned across all sections. |

***

### Output

The Actor returns a single **Player Profile** record (in the **default** Apify dataset) containing the player's biographical and ranking data plus four embedded arrays — one for each data section that was requested:

| List field | Contents |
|---|---|
| `allResults` | Individual match records with score, opponent details, and per-match stats (aces, break points, dominance ratio, etc.) |
| `tourLevelSeasons` | Year-by-year ATP/WTA Tour-level statistical summaries |
| `challengerSeasons` | Year-by-year Challenger-level statistical summaries |
| `yearEndRankings` | Year-end ATP, WTP, and Elo rankings broken down by surface |

Each of these arrays is also written to its own dedicated Apify dataset, so you can consume either the combined profile or pull the granular records independently from the **Storage** tab.

#### Profile record

```json
{
  "fullname": "Jannik Sinner",
  "country": "ITA",
  "dateOfBirth": "2002-08-30",
  "hand": "R",
  "backhand": "2",
  "currentRank": 1,
  "peakRank": 1,
  "peakRankDate": "2024-06-10",
  "eloRank": 1,
  "eloRating": 2485,
  "age": 23,
  "plays": "Right (two)-handed backhand"
}
```

#### `allResults` — sample match record

```json
{
    "rawDate": "20260629",
    "tourn": "Wimbledon",
    "surf": "Grass",
    "level": "G",
    "wl": "W",
    "rank": "1",
    "seed": "1",
    "entry": "",
    "round": "F",
    "score": "6-7(7) 7-6(2) 6-3 6-4",
    "maxSets": 5,
    "opponent": "Alexander Zverev",
    "opponentRanking": "3",
    "opponentSeed": "2",
    "opponentEntry": "",
    "opponentHand": "R",
    "opponentBirthDate": "19970420",
    "opponentHeight": 198,
    "opponentCountry": "GER",
    "opponentActive": false,
    "aces": 15,
    "dfs": 2,
    "pts": 136,
    "firsts": 87,
    "fwon": 70,
    "swon": 32,
    "games": 22,
    "saved": 1,
    "chances": 1,
    "oaces": 17,
    "odfs": 2,
    "opts": 139,
    "ofirsts": 105,
    "ofwon": 76,
    "oswon": 20,
    "ogames": 21,
    "osaved": 3,
    "ochances": 5,
    "opponentBackhand": "2",
    "chartlink": "20260712-M-Wimbledon-F-Jannik_Sinner-Alexander_Zverev",
    "pslink": "",
    "whserver": "",
    "matchid": "2026-540-603",
    "wh": "",
    "roundnum": "",
    "matchnum": "",
    "dominanceRatio": 1.24,
    "aceRate": 11,
    "doubleFaultRate": 1.5,
    "firstServePercentage": 64,
    "firstServePointsWon": 80.5,
    "secondServePointsWon": 65.3,
    "breakPointOpportunitiesSaved": 1,
    "durationTime": "03:46:00",
    "matchDate": "2026-06-29",
    "opponentBirthDateObj": "1997-04-20",
    "winner": "Player",
    "loser": "Alexander Zverev"
  }
```

#### `tourLevelSeasons` — sample seasonal summary

```json
{
  "year": 2024,
  "matchesPlayed": 70,
  "matchesWon": 63,
  "matchesLost": 7,
  "matchWinningPercentage": 90.0,
  "setW-L": "128-32",
  "setWinningPercentage": 80.0,
  "gameW-L": "680-340",
  "gameWinningPercentage": 66.7,
  "tiebreakWonLossRecord": "18-6",
  "tiebreakWinningPercentage": 75.0,
  "numberOfMatchesWithTheNextStats": 65,
  "holdPercentage": 84.3,
  "breakPercentage": 31.2,
  "aceRate": 8.1,
  "doubleFaultRate": 2.4,
  "firstServePercentage": 63.5,
  "firstServePointsWon": 79.4,
  "secondServePointsWon": 55.8,
  "servicePointsWon": 70.2,
  "returnPointsWon": 42.1,
  "totalPointsWon": 56.8,
  "dominanceRatio": 1.42,
  "best": "Won Australian Open"
}
```

#### `challengerSeasons` — sample challenger summary

```json
{
  "year": 2020,
  "matchesPlayed": 22,
  "matchesWon": 17,
  "matchesLost": 5,
  "matchWinningPercentage": 77.3,
  "setW-L": "38-14",
  "setWinningPercentage": 73.1,
  "gameW-L": "240-170",
  "gameWinningPercentage": 58.5,
  "tiebreakWonLossRecord": "8-3",
  "tiebreakWinningPercentage": 72.7,
  "numberOfMatchesWithTheNextStats": 20,
  "holdPercentage": 79.5,
  "breakPercentage": 27.8,
  "aceRate": 6.2,
  "doubleFaultRate": 2.9,
  "firstServePercentage": 61.0,
  "firstServePointsWon": 74.8,
  "secondServePointsWon": 52.1,
  "servicePointsWon": 66.3,
  "returnPointsWon": 38.5,
  "totalPointsWon": 52.9,
  "dominanceRatio": 1.15,
  "best": "Won Challenger final"
}
```

#### `yearEndRankings` — sample ranking record

```json
{
  "year": 2024,
  "atpRank": 1,
  "wtpRank": 1,
  "eloRank": 1,
  "elo": 2485,
  "hEloRank": 1,
  "hElo": 2510,
  "cEloRank": 2,
  "cElo": 2460,
  "gEloRank": 1,
  "gElo": 2520
}
```

***

### Notes & behavior

- **No login required.** The Actor accesses public player pages on TennisAbstract.com.
- **Data freshness.** Data is scraped on-demand at the time of the run; results reflect the state of TennisAbstract.com when the Actor executes.
- **Rate limiting.** The Actor uses Apify's built-in charge system to stay within the host site's rate limits and avoid disruptions.
- **Max results cap.** Setting `max_results` stops data collection once the threshold is reached, regardless of how many records remain on the source page.
- **Section toggles.** Disable sections you don't need to reduce compute time and API cost.

***

# Actor input Schema

## `player_name` (type: `string`):

The unique identifier for the tennis player (e.g., 'Jannik Sinner' or 'Roger Federer').

## `include_all_results_section` (type: `boolean`):

Whether to include the player's complete match history in the output.

## `include_tour_level_seasons_section` (type: `boolean`):

Whether to include seasonal summaries for ATP/WTA tour-level events.

## `include_challenger_seasons_section` (type: `boolean`):

Whether to include seasonal summaries for Challenger-level events.

## `include_year_end_rankings_section` (type: `boolean`):

Whether to include the player's year-end ranking history.

## `maxResults` (type: `integer`):

The maximum number of results

## Actor input object example

```json
{
  "player_name": "Jannik Sinner",
  "include_all_results_section": true,
  "include_tour_level_seasons_section": true,
  "include_challenger_seasons_section": false,
  "include_year_end_rankings_section": false,
  "maxResults": 1000
}
```

# Actor output Schema

## `default` (type: `string`):

No description

## `all_results` (type: `string`):

No description

## `tour_level_season` (type: `string`):

No description

## `challenger_season` (type: `string`):

No description

## `year_end_rankings` (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 = {
    "player_name": "Jannik Sinner"
};

// Run the Actor and wait for it to finish
const run = await client.actor("serj_henrique/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 = { "player_name": "Jannik Sinner" }

# Run the Actor and wait for it to finish
run = client.actor("serj_henrique/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 '{
  "player_name": "Jannik Sinner"
}' |
apify call serj_henrique/tennis-abstract-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,serj_henrique/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/MNrnmZQWpvz8Heb3E/builds/rJu6Ice1zbQCH22z6/openapi.json
