# Tennis Abstract Scraper - Match History, Serve Stats, Elo (`pshivam/tennis-abstract-scraper`) Actor

Scrape Tennis Abstract without login: every ATP match of a player with score, surface, level, round, rank, serve and return stats and dominance ratio, plus the player profile and the ATP and WTA Elo ratings (overall, hard, clay, grass). Filter by year, surface and level. Export to Excel, CSV or API.

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

## Pricing

from $2.10 / 1,000 records

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 Abstract Scraper - Match History, Serve Stats, Elo

**Get tennis data from Tennis Abstract as clean rows: every ATP match of a player with the score, surface, level, round, both players' ranks, serve and return stats and the dominance ratio, plus player profiles and the ATP and WTA Elo ratings (overall, hard, clay and grass).** No login, no cookies, no API key. Pick players by name, filter by year, surface and level, and export to Excel, CSV, JSON or the API.

**Actively maintained.** Last update: 2026-11-19. Every release passes 100+ automated tests on real saved Tennis Abstract pages.

### What can you use it for?

- **Betting models and analysis.** Match results with serve and return stats, opponent rank and surface for every match of a player: train a model, test a system, price a match.
- **Scouting and coaching.** How a player does on clay against left-handers, in deciding sets or against the top 20: filter the rows, work out the rest in a spreadsheet.
- **Fantasy and content.** Head-to-head history, recent form (`matchesSince`) and the Elo rating of both players for a preview.
- **Data science projects.** A player's whole career in one table, with the same columns for every player.
- **Rating tracking.** Schedule the Actor every week for the Elo ratings of both tours (`eloRankings`) and chart who rises and who falls.
- **Rankings by surface.** `hardElo`, `clayElo` and `grassElo` rank players by what they are good at.

### What data can you get?

Give player names, or ask for the top players by Elo. Every row is a player profile, a match or a line of a rating. `recordType` says which.

| You give | You get |
|---|---|
| `players`: names or Tennis Abstract links | A profile and every match of each player, newest first |
| `topEloPlayers`: 25 | The same for the 25 best ATP players by Elo |
| `eloRankings`: atp, wta | One line per player of the Elo rating of each tour |
| `matchesSince`, `surfaces`, `levels`, `maxMatchesPerPlayer` | Only the matches you want |

#### Fields

A field that does not belong to a record's type, or that the site does not hold, is `null`.

##### Every record

| Field | What it is |
|---|---|
| `recordType` | What the record is: player (a profile), match (one match of a player) or eloRanking (a line of an Elo rating). |
| `playerSlug` | The player's name in the site's address form, for example JannikSinner. |
| `playerName` | The player's name. |
| `sourceUrl` | The Tennis Abstract page the record was read from. |
| `scrapedAt` | When the record was collected (UTC). |

##### Player profile (recordType = player)

| Field | What it is |
|---|---|
| `country` | The player's country as a three-letter code, for example ITA. |
| `hand` | The playing hand: right or left. |
| `backhand` | The backhand: one-handed or two-handed. |
| `heightCm` | The height in centimetres. |
| `birthDate` | The birth date (YYYY-MM-DD). |
| `currentRank` | The current ATP singles rank. |
| `peakRank` | The best ATP singles rank so far. |
| `peakRankSince` | The first day of the player's best rank (YYYY-MM-DD). |
| `eloRating` | The current Elo rating. |
| `eloRank` | The current rank by Elo rating. |
| `atpId` | The player's ATP Tour id. |
| `twitter` | The player's Twitter or X handle. |
| `wikipediaId` | The player's Wikipedia page name. |
| `isActive` | True for a player the site still counts as active. |
| `matchesInData` | How many matches the site holds for the player (all levels, before your filters). |
| `firstMatchDate` | The date of the oldest match the site holds (YYYY-MM-DD). |
| `lastMatchDate` | The date of the newest match (YYYY-MM-DD). |
| `wins` | The wins among the matches the site holds. |
| `losses` | The losses among the matches the site holds. |
| `profileUrl` | The player's page on Tennis Abstract. |

##### Match (recordType = match)

| Field | What it is |
|---|---|
| `matchId` | The site's id of the match: date, level letter, tournament, round and both names. Empty for old minor events. |
| `date` | The day the tournament round started (YYYY-MM-DD). |
| `tournament` | The tournament. |
| `tournamentId` | The site's id of the tournament edition. |
| `surface` | The surface: Hard, Clay, Grass or Carpet. |
| `level` | The level in words: Grand Slam, Masters 1000, ATP Tour, Tour Finals, Davis Cup, Challenger, ITF and satellite events. |
| `levelCode` | The level as the site's letter: G, M, A, F, D, C or S. |
| `round` | The round: F, SF, QF, R16, R32, R64, R128, RR, Q1 ... |
| `result` | W when the player won the match, L when the player lost. |
| `score` | The score, always written from the winner's side (6-7(7) 7-6(2) 6-3 6-4), also for a loss. |
| `bestOf` | Best of 3 or 5 sets. |
| `minutes` | The length of the match in minutes, when the site has it. |
| `playerRank` | The player's rank when the tournament started. |
| `playerSeed` | The player's seed. |
| `opponent` | The opponent. |
| `opponentRank` | The opponent's rank when the tournament started. |
| `opponentSeed` | The opponent's seed. |
| `opponentHand` | The opponent's playing hand: R, L or U (unknown). |
| `opponentCountry` | The opponent's country (three letters). |
| `opponentBirthDate` | The opponent's birth date (YYYY-MM-DD). |
| `opponentHeightCm` | The opponent's height in centimetres. |

##### Match: the player's serve

| Field | What it is |
|---|---|
| `aces` | The player's aces. |
| `doubleFaults` | The player's double faults. |
| `servePoints` | The points the player served. |
| `firstServesIn` | The player's first serves in. |
| `firstServePointsWon` | The points the player won on first serve. |
| `secondServePointsWon` | The points the player won on second serve. |
| `serviceGames` | The player's service games. |
| `breakPointsSaved` | The break points the player saved. |
| `breakPointsFaced` | The break points the player faced. |

##### Match: the opponent's serve

| Field | What it is |
|---|---|
| `opponentAces` | The opponent's aces. |
| `opponentDoubleFaults` | The opponent's double faults. |
| `opponentServePoints` | The points the opponent served. |
| `opponentFirstServesIn` | The opponent's first serves in. |
| `opponentFirstServePointsWon` | The points the opponent won on first serve. |
| `opponentSecondServePointsWon` | The points the opponent won on second serve. |
| `opponentServiceGames` | The opponent's service games. |
| `opponentBreakPointsSaved` | The break points the opponent saved. |
| `opponentBreakPointsFaced` | The break points the opponent faced. |

##### Match: worked out for you

| Field | What it is |
|---|---|
| `acePct` | Aces as a percent of the player's serve points. |
| `doubleFaultPct` | Double faults as a percent of the player's serve points. |
| `firstServeInPct` | First serves in as a percent of serve points. |
| `firstServeWonPct` | Points won on first serve as a percent of first serves in. |
| `secondServeWonPct` | Points won on second serve as a percent of second serves. |
| `returnPointsWonPct` | The share of the opponent's serve points the player won. |
| `dominanceRatio` | The site's dominance ratio: the player's return points won divided by the opponent's. Above 1 means the player dominated. |

##### Elo rating line (recordType = eloRanking)

| Field | What it is |
|---|---|
| `tour` | The tour of the rating: atp or wta. |
| `rank` | The rank in the Elo rating. |
| `elo` | The overall Elo rating. |
| `age` | The player's age in years. |
| `hardEloRank` | The rank in the hard-court Elo rating. |
| `hardElo` | The hard-court Elo rating. |
| `clayEloRank` | The rank in the clay-court Elo rating. |
| `clayElo` | The clay-court Elo rating. |
| `grassEloRank` | The rank in the grass-court Elo rating. |
| `grassElo` | The grass-court Elo rating. |
| `peakElo` | The best overall Elo rating the player ever had. |
| `peakMonth` | The month of the best rating (YYYY-MM). |

#### Example results

```json
{"recordType": "player", "playerSlug": "JannikSinner", "playerName": "Jannik Sinner", "country": "ITA", "hand": "right", "backhand": "two-handed", "heightCm": 191, "birthDate": "2001-08-16", "currentRank": 2, "peakRank": 1, "peakRankSince": "2024-06-10", "eloRating": 2297, "eloRank": 1, "atpId": "S0AG", "twitter": "janniksin", "wikipediaId": "Jannik_Sinner", "isActive": true, "matchesInData": 565, "firstMatchDate": "2018-01-29", "lastMatchDate": "2026-06-29", "wins": 437, "losses": 128, "profileUrl": "https://www.tennisabstract.com/cgi-bin/player.cgi?p=JannikSinner", "sourceUrl": "https://www.tennisabstract.com/cgi-bin/player.cgi?p=JannikSinner", "scrapedAt": "2026-11-19T10:00:06Z"}
```

```json
{"recordType": "match", "playerSlug": "JannikSinner", "playerName": "Jannik Sinner", "matchId": "20260712-M-Wimbledon-F-Jannik_Sinner-Alexander_Zverev", "date": "2026-06-29", "tournament": "Wimbledon", "tournamentId": "2026-540-603", "surface": "Grass", "level": "Grand Slam", "levelCode": "G", "round": "F", "result": "W", "score": "6-7(7) 7-6(2) 6-3 6-4", "bestOf": 5, "minutes": 226, "playerRank": 1, "playerSeed": 1, "opponent": "Alexander Zverev", "opponentRank": 3, "opponentSeed": 2, "opponentHand": "R", "opponentCountry": "GER", "opponentBirthDate": "1997-04-20", "opponentHeightCm": 198, "aces": 15, "doubleFaults": 2, "servePoints": 136, "firstServesIn": 87, "firstServePointsWon": 70, "secondServePointsWon": 32, "serviceGames": 22, "breakPointsSaved": 1, "breakPointsFaced": 1, "opponentAces": 17, "opponentDoubleFaults": 2, "opponentServePoints": 139, "opponentFirstServesIn": 105, "opponentFirstServePointsWon": 76, "opponentSecondServePointsWon": 20, "opponentServiceGames": 21, "opponentBreakPointsSaved": 3, "opponentBreakPointsFaced": 5, "acePct": 11.0, "doubleFaultPct": 1.5, "firstServeInPct": 64.0, "firstServeWonPct": 80.5, "secondServeWonPct": 65.3, "returnPointsWonPct": 30.9, "dominanceRatio": 1.24, "sourceUrl": "https://www.tennisabstract.com/cgi-bin/player.cgi?p=JannikSinner", "scrapedAt": "2026-11-19T10:00:06Z"}
```

```json
{"recordType": "eloRanking", "playerSlug": "CarlosAlcaraz", "playerName": "Carlos Alcaraz", "profileUrl": "https://www.tennisabstract.com/cgi-bin/player.cgi?p=CarlosAlcaraz", "tour": "atp", "rank": 2, "elo": 2194.9, "age": 23.4, "hardEloRank": 2, "hardElo": 2142.2, "clayEloRank": 2, "clayElo": 2110.7, "grassEloRank": 2, "grassElo": 2038.3, "peakElo": 2308.5, "peakMonth": "2026-03", "sourceUrl": "https://www.tennisabstract.com/reports/atp_elo_ratings.html", "scrapedAt": "2026-11-19T10:00:06Z"}
```

### Input

| Input | What it does |
|---|---|
| `players`, `topEloPlayers` | Which players: names or links, and/or the best players by Elo |
| `includeProfiles`, `includeMatches` | Which records to return for each player |
| `matchesSince`, `surfaces`, `levels`, `maxMatchesPerPlayer` | Which matches to keep |
| `eloRankings`, `eloRankingRows` | The Elo ratings of the ATP and/or WTA tour and how many players of each |
| `onlyNew` | Skip records that earlier runs of the same input returned |
| `maxItems` | Stop after this many records in total |
| `maxConcurrency`, `secondsBetweenRequests`, `proxyConfiguration` | Speed and how the Actor deals with refusals |

### How much does it cost?

You pay per record: a profile, a match and a rating line each count as one. There is no start fee.

| Plan | Price per 1,000 records |
|---|---|
| Free | $3.00 |
| Bronze | $2.70 |
| Silver | $2.40 |
| Gold | $2.10 |

- A whole career of 600 matches costs about $1.80 on the Free plan.
- Use `matchesSince`, `levels` and `maxItems` to cap the cost of a run, and `onlyNew` to pay only for new matches on scheduled runs.

### Use it via API, on a schedule, or with your tools

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("pshivam/tennis-abstract-scraper").call(run_input={
    "players": ["Jannik Sinner", "Carlos Alcaraz"],
    "includeProfiles": False,
    "matchesSince": "2024",
    "surfaces": ["clay"],
    "maxItems": 500,
})
for match in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(match["date"], match["playerName"], match["result"], match["opponent"], match["score"], match["dominanceRatio"])
```

#### Use it in Clay, n8n, Make or Zapier

Use the Actor ID `pshivam/tennis-abstract-scraper` and an input like this:

```json
{"eloRankings": ["atp", "wta"], "eloRankingRows": 100, "includeProfiles": false, "includeMatches": false}
```

#### Watch the ratings

Schedule the Actor every week with `eloRankings` set to both tours and `onlyNew` turned off. Each run is a snapshot of the ratings with `scrapedAt`, so you can chart the changes.

### Good to know

- **Men's match history, both tours' ratings.** The match lists of the women's tour sit in a file the site's robots.txt does not let robots read, so the Actor does not read it. For the WTA it returns the Elo ratings only. Men's players are read in full.
- **The score is the winner's.** Tennis Abstract writes the score from the winner's side, also in a match the player lost: read `result` first. The stats (aces, break points ...) are always the player's own, with the opponent's next to them.
- **How far back.** The site holds each player's matches from the start of his career at tour level and, for many players, from the Challenger and ITF events. `matchesInData` says how many.
- **Stats are not everywhere.** Matches of top events have serve stats. Old matches and small events often have none: the fields are empty.
- **Names.** A name is matched with the ATP Elo report (the best 550 players), so spelling, accents and hyphens do not matter. A player outside it is tried by his name as the site spells it; if the site does not know it, the run says so and does not charge. A link always works.
- **Slow on purpose.** The site limits fast readers, so the Actor reads about one page every 2 seconds. A test run with one player's profile and the Elo table took under 3 seconds. When the site refuses the Actor's address it lets it rest and, if your account has Apify Proxy, reads through it meanwhile.
- **When Tennis Abstract refuses.** If the site does not answer 20 requests in a row, or no record comes back for 5 minutes while requests keep failing, the Actor stops instead of retrying for the rest of the hour. It returns what it has and says so in the run's status message; a run without any ends as failed with that message. Run it again later or lower `maxConcurrency`.
- **Independent tool.** Not affiliated with or endorsed by Tennis Abstract. The Actor reads the public pages the site shows to every visitor, at the paths its robots.txt allows. Check the site's terms before you redistribute the data.

### FAQ

#### How do I get all the matches of a tennis player?

Put the name in `players`, for example Jannik Sinner, and run. You get the profile and one row per match, newest first.

#### Does it work for women's tennis?

For the Elo ratings, yes: set `eloRankings` to wta. Match lists are men's only, because the women's lists are in a file the site does not let robots read.

#### Which stats does a match have?

Aces, double faults, serve points, first serves in, points won on first and second serve, service games and break points for both players, plus the percentages and the dominance ratio worked out for you. Matches without stats on the site have empty fields.

#### Can I get one surface or one year?

Yes. Use `surfaces`, `matchesSince` and `levels` to keep only those matches, and you pay only for what is returned.

#### What is the Elo rating?

A rating of strength that rises with wins against strong players. Tennis Abstract keeps an overall rating and one for hard, clay and grass courts. `eloRankings` returns the list of each tour.

#### Do I need an account or an API key?

No. The Actor reads public pages.

#### Is it legal to scrape Tennis Abstract?

The Actor reads public pages at the paths the site's robots.txt allows. You are responsible for how you use the data. Check the site's terms before you redistribute it.

# Actor input Schema

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

Men's players to read, one per line: a name (Jannik Sinner, Alex de Minaur) or a Tennis Abstract player link (www.tennisabstract.com/cgi-bin/player.cgi?p=JannikSinner). Names are matched with the ATP rating report, so accents and hyphens do not matter.

## `topEloPlayers` (type: `integer`):

Also read the best ATP players of the Elo rating, 1 to 600 (0 = none). Each player is a page of the site, read about every 2 seconds.

## `includeProfiles` (type: `boolean`):

One profile record per player: country, hand, height, birth date, rank, peak rank, Elo rating, win and loss count.

## `includeMatches` (type: `boolean`):

One record per match of each player, newest first: score, surface, level, round, ranks, serve stats and dominance ratio.

## `matchesSince` (type: `string`):

Only matches from this year, month or day on: 2023, 2023-06 or 2023-06-15. Leave empty for the whole career.

## `surfaces` (type: `array`):

Only matches on these surfaces. Leave empty for all.

## `levels` (type: `array`):

Only matches at these levels. Leave empty for all.

## `maxMatchesPerPlayer` (type: `integer`):

Stop each player after this many matches, newest first. 0 means all of them (a long career has 1,000 or more).

## `eloRankings` (type: `array`):

Also return the Elo rating report of these tours: one record per player with the overall, hard, clay and grass Elo, age and peak. The women's tour has ratings only, no match lists.

## `eloRankingRows` (type: `integer`):

How many players of each rating to return, best first.

## `onlyNew` (type: `boolean`):

Skip records that earlier runs of this same input already returned, so you get and pay for new ones only. The first run works as usual and remembers what it returned, in your key-value store 'tennis-abstract-scraper-only-new'.

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

Stop after this many records in total (profiles, matches and rating lines). You are charged per record.

## `maxConcurrency` (type: `integer`):

How many player pages are read at the same time. The site limits fast readers, so keep this low.

## `secondsBetweenRequests` (type: `number`):

Pause between requests. Tennis Abstract refuses an address that reads too fast: the Actor then lets it rest and lengthens the pause.

## `proxyConfiguration` (type: `object`):

The Actor reads with its own address and uses this proxy only while the site refuses that address (a new address for every request). Apify Proxy is used when your account has it. Turn the proxy off to wait instead.

## Actor input object example

```json
{
  "players": [
    "Jannik Sinner"
  ],
  "topEloPlayers": 0,
  "includeProfiles": true,
  "includeMatches": true,
  "maxMatchesPerPlayer": 0,
  "eloRankingRows": 100,
  "onlyNew": false,
  "maxItems": 50,
  "maxConcurrency": 2,
  "secondsBetweenRequests": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `matches` (type: `string`):

Matches as a table.

## `players` (type: `string`):

Players as a table.

## `ratings` (type: `string`):

Elo ratings as a table.

## `runStats` (type: `string`):

Requests made, time spent and number of records for this run (RUN_STATS record).

# 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": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("pshivam/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 = {
    "players": ["Jannik Sinner"],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("pshivam/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 '{
  "players": [
    "Jannik Sinner"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call pshivam/tennis-abstract-scraper --silent --output-dataset

```

## MCP server setup

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