# Tennis Abstract Scraper - Rankings, Elo & Player Stats (`scrapesage/tennis-scraper`) Actor

Scrape ATP & WTA tennis data: official rankings, Tennis Abstract Elo ratings with hard/clay/grass surface splits, and full player profiles with career match history. No key, no login. Export JSON, CSV, Excel. Independent tool, not affiliated with Tennis Abstract.

- **URL**: https://apify.com/scrapesage/tennis-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.10 / 1,000 ranking rows

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 - ATP & WTA Rankings, Elo Ratings & Player Stats

> **Disclaimer:** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Tennis Abstract or any of its subsidiaries. All trademarks mentioned are the property of their respective owners. "Tennis Abstract" is referenced only to describe the publicly available website this Actor collects data from.

Scrape structured **ATP and WTA tennis data** from [Tennis Abstract](https://www.tennisabstract.com): official **rankings**, **Elo ratings** with hard / clay / grass **surface splits**, and full **player profiles** with **career match history**. No login, no API key, no browser - just clean JSON, CSV or Excel.

> **Why this actor exists (demand):** the tennis-data niche on Apify Store draws **~1,750 monthly users** across a fragmented field of single-purpose scrapers (leader ~988 users/30d, no reviews). This actor consolidates rankings, Elo and player stats into one reliable, richly-typed export - the data tennis analysts, bettors, journalists and model builders actually ask for.

### What you can scrape

| Mode | What you get | Record type |
|---|---|---|
| **Rankings** | The current official ATP or WTA ranking table - rank, player, country, birthdate, age. | `ranking` |
| **Elo ratings** | Tennis Abstract Elo - overall Elo, **surface-specific Elo (hard / clay / grass)** with per-surface ranks, peak Elo and peak month, and the matching ATP/WTA rank. This is the premium signal you cannot get from the official tour sites. | `eloRating` |
| **Players** | Full player profiles: current & peak rank, date of birth, height, plays (right/left), backhand (one/two-handed), country, Elo, ATP/ITF/Wikipedia ids, Twitter, and a **career win/loss summary**. Optionally every **match** (date, tournament, surface, level, round, score, opponent + opponent rank/country). | `player`, `match` |

### Example input

Top 100 ATP Elo ratings with surface splits:

```json
{ "mode": "elo", "tour": "atp", "maxResults": 100 }
```

Current WTA rankings:

```json
{ "mode": "rankings", "tour": "wta", "maxResults": 150 }
```

Player profiles + recent matches (ATP and WTA in one run):

```json
{ "mode": "players", "players": ["Carlos Alcaraz", "Iga Swiatek", "Novak Djokovic"], "includeMatches": true, "maxMatchesPerPlayer": 50 }
```

Players resolve against Tennis Abstract's official index and are matched **exactly** - a misspelled name is skipped, never silently swapped for the wrong player. You can also pass Tennis Abstract player URLs, or import a list of names / URLs from a pasted block or a linked `.txt`/`.csv`/Google Sheet via **Import players from a file**.

### Output fields (highlights)

- **ranking**: `rank`, `player`, `country`, `birthDate`, `age`, `tour`, `playerUrl`
- **eloRating**: `rank`, `player`, `elo`, `hardElo`, `clayElo`, `grassElo`, `peakElo`, `peakEloMonth`, `atpRank`, per-surface ranks
- **player**: `name`, `country`, `currentRank`, `peakRank`, `birthDate`, `heightCm`, `hand`, `backhand`, `eloRating`, `matchCount`, `wins`, `losses`, `winPct`, `atpId`, `itfId`, `wikiId`, `twitter`
- **match**: `date`, `tournament`, `surface`, `level`, `round`, `result`, `score`, `opponent`, `opponentRank`, `opponentCountry`, plus raw serve/return stats

Every run finishes with a clear status message; empty/blocked runs never crash and never bill.

### Use with AI assistants (MCP)

This actor is available through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp), so assistants like Claude can call it as a tool - ask for "the top 20 ATP Elo ratings" or "Carlos Alcaraz's last 10 matches" and get structured data back.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** - AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** - an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) - no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** - agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### Pricing

Pay-per-event, tiered by volume (the more you pull, the lower the per-row price): ranking / Elo rows from **$0.002**, player profiles from **$0.004**, match records from **$0.001** - dropping to a quarter of that at the top tier. You pay only for rows actually returned.

### Automate & schedule

Run this Actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** - start runs, fetch datasets and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** - official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** - run it hourly, daily or weekly and keep your dataset current.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** - trigger downstream actions (CRM import, Slack alert, email sequence) the moment a run finishes.

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

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/tennis-scraper').call({
    "mode": "elo",
    "tour": "atp",
    "maxResults": 50
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} records`);
```

### Integrate with any app

Connect the dataset to thousands of apps - no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** - multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** - push new records straight into your CRM or spreadsheet.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** - get notified when a scheduled run finds something new.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** - auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** - pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** - trigger runs from commits or releases.

### FAQ

**Where does the data come from?** Tennis Abstract (tennisabstract.com), the public tennis-statistics site maintained by Jeff Sackmann. This actor reads its public pages and data files; it does not use any private API.

**Is it reliable?** Yes - the source is a plain public site with no anti-bot, and the actor self-limits its runtime so it never times out, fails gracefully on any transient error, and returns partial data with an explanation rather than crashing.

**Note on match recency:** ATP match history is current; WTA structured match history reflects Tennis Abstract's published match files, so check the `date` on each match for recency.

***

*This is an independent scraper for publicly available data. It is not affiliated with, endorsed by, or sponsored by Tennis Abstract, the ATP, the WTA, or any related organization. "Tennis Abstract", "ATP" and "WTA" are trademarks of their respective owners and are used here for descriptive purposes only. Use the data in compliance with the source's terms and applicable law.*

### Disclaimer

**This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Tennis Abstract or any of its subsidiaries. All trademarks mentioned are the property of their respective owners.**

"Tennis Abstract" and any related marks are the property of their respective owners and are used here only in a descriptive, nominative sense - to identify the publicly accessible website from which this Actor collects data. This Actor is not an official Tennis Abstract product, is not authorised or certified by Tennis Abstract, and does not distribute Tennis Abstract software. It collects only publicly available information; you are responsible for ensuring your use of that data complies with applicable laws, regulations and the terms of the source website.

### Need help?

Open an issue on the Actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome - this Actor is actively maintained.

# Actor input Schema

## `mode` (type: `string`):

Choose the data set. <b>Rankings</b> = the official ATP/WTA ranking table (rank, points, country, age). <b>Elo ratings</b> = Tennis Abstract Elo including surface splits (hard/clay/grass) and peak Elo. <b>Players</b> = full profiles + optional match history for the players you name.

## `tour` (type: `string`):

Which tour to pull for the Rankings and Elo modes.

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

Player names (e.g. <code>Carlos Alcaraz</code>, <code>Iga Swiatek</code>) or Tennis Abstract player URLs. Names resolve against the official player index and are matched exactly, so a misspelled name is skipped rather than returning the wrong player.

## `playersFromFile` (type: `string`):

Paste a block of player names / Tennis Abstract URLs (one per line), or a single link to a .txt/.csv file or Google Sheet of them. Used together with the Players field.

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

For each player, also output their match results (date, tournament, surface, round, score, opponent, opponent rank/country) as separate <code>match</code> records.

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

Cap on match records per player when match history is on. Tennis Abstract holds a player's entire career, so a cap keeps runs fast. Set 0 to skip matches.

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

Maximum rows (ranking/Elo rows, or players) to return.

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

Proxies to use. Tennis Abstract is a public site with no anti-bot, so the default Apify datacenter proxy is plenty.

## Actor input object example

```json
{
  "mode": "rankings",
  "tour": "atp",
  "players": [
    "Carlos Alcaraz",
    "Iga Swiatek"
  ],
  "includeMatches": false,
  "maxMatchesPerPlayer": 100,
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped ranking, player and match records as JSON items 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 = {
    "mode": "rankings",
    "tour": "atp",
    "players": [
        "Carlos Alcaraz",
        "Iga Swiatek"
    ],
    "maxMatchesPerPlayer": 100,
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/tennis-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 = {
    "mode": "rankings",
    "tour": "atp",
    "players": [
        "Carlos Alcaraz",
        "Iga Swiatek",
    ],
    "maxMatchesPerPlayer": 100,
    "maxResults": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/tennis-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 '{
  "mode": "rankings",
  "tour": "atp",
  "players": [
    "Carlos Alcaraz",
    "Iga Swiatek"
  ],
  "maxMatchesPerPlayer": 100,
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapesage/tennis-scraper --silent --output-dataset

```

## MCP server setup

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