# Tennis Scraper — ATP & WTA Scores, Draws, Set Scores (`pixflor/tennis-scraper`) Actor

Scrape every ATP and WTA match: both players or doubles pairs, set-by-set scores with tiebreaks, seeds, round, division, winner, walkovers and retirements. History back to 2010.

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

## Pricing

from $0.70 / 1,000 match scrapeds

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 Scraper — ATP & WTA Scores, Draws and Set Scores

Every ATP and WTA match as a clean row: both players **or both doubles pairs**, set-by-set
scores with tiebreaks, seeds, round, division, winner, walkovers and retirements.

No API key. No login. History back to **2010**. Pick a date range, export CSV or JSON.

***

### What you get

| Column | Example |
|---|---|
| `day` / `date` | `2026-07-04` · `2026-07-04T13:30Z` |
| `tour` | `atp` · `wta` |
| `tournament` | Wimbledon |
| `division` / `isDoubles` | Men's Doubles · `true` |
| `round` / `isQualifying` | Quarterfinal · `false` |
| `player1` / `player2` | Hugo Nys / Edouard Roger-Vasselin · Daniel Evans / Henry Searle |
| `player1Players` / `player2Players` | `["Hugo Nys","Edouard Roger-Vasselin"]` |
| `player1Seed` / `player2Seed` | `3` / `null` |
| `setScores` | `7-6(8), 6-4, 6-4` — player 1 first, tiebreaks in brackets |
| `player1Sets` / `player2Sets` | `[7,6,6]` / `[6,4,4]` |
| `player1SetsWon` / `player2SetsWon` | `3` / `0` |
| `winner` / `loser` | Hubert Hurkacz · Sebastian Ofner |
| `status` / `statusDetail` / `completed` | `STATUS_FINAL` · Final · `true` |
| `isWalkover` / `isRetirement` | `false` / `false` |
| `resultLine` | `Hubert Hurkacz (POL) bt Sebastian Ofner (AUT) 7-6 (10-8) 6-4 6-4` |
| `player1Country` / `player2Country` | Poland / Austria |
| `venue` / `venueCity` | All England Club · London |

***

### Why this one

#### 1. Doubles actually have names

The obvious way to read this data gives you the players for singles and **`null` for every
doubles match**, because a singles competitor is an `athlete` while a doubles pair is a
`roster`. Measured on ATP July 2026: **590 of 2,252 competitor slots — 26% — come back
anonymous** that way. That is a quarter of a Grand Slam.

Here, every pair resolves, and you get the joint name *and* the two players individually, so
you can filter by either. Searching `player: "Venus"` finds Michael Venus inside
`Petr Nouza / Michael Venus`.

#### 2. One request per month, and the month means the month

A date range is fetched a calendar month at a time — a full Grand Slam month is a handful of
requests, not thirty.

That sounds obvious, and it is where most tennis datasets quietly go wrong. ESPN answers
"which tournaments were active in that window, in full", not "which matches were played in
it". Asking for **a single day, 1 July 2026, returns 635 matches spanning 22 June to 12 July**
— the whole of Wimbledon. Asking for July returns 1,126 matches of which only **763 are
actually in July**. Every row here is filtered to the days you asked for, using the US Eastern
calendar date ESPN files matches under, so a late-night match is not dated to tomorrow.

#### 3. You are not billed twice for the same match

The source has two tour feeds, `atp` and `wta`, and they are **not** a men's/women's split —
each one returns every draw of the tournaments it carries. So the ATP feed is full of Women's
Singles and the WTA feed is full of Men's Singles.

Measured over 1–12 July 2026: the ATP feed held 364 matches, the WTA feed 480, and **340 were
the same matches.** Read both and concatenate, which is the obvious thing to do, and roughly
40% of your rows are duplicates — on per-row pricing, that is 40% of your bill for nothing.

Both feeds are still read here, because each carries tournaments the other misses (2
tournaments only in ATP, 7 only in WTA over that same fortnight), and the results are merged
and deduplicated by match id. A real Wimbledon fortnight run: 1,094 rows fetched, **465
duplicates removed, 629 unique matches** charged.

To select men's or women's matches, use the **Divisions** filter — not the tour.

#### 4. Walkovers and retirements are not quietly wrong

A **walkover** has a winner and no scores at all. Reporting it as `0-0` is a lie, so
`setScores` is `null` and `isWalkover` is `true`.

A **retirement** does have set scores, and this is the trap: the player who won more sets can
still be the loser. One real example — Darwin Blanch led Dane Sweeny by a set and retired; the
winner is Sweeny. `winner` is read from the result, never inferred from the set count.

In one sampled Grand Slam month: 8 walkovers, 12 retirements, both labelled.

#### 5. The whole draw, including qualifying and mixed doubles

All five draws — Men's and Women's Singles, Men's and Women's Doubles, and Mixed Doubles — and
the full ladder from Qualifying 1st Round through to the Final. Qualifying is a big share of a
Slam (329 of 1,126 ATP matches in July 2026), so there is a switch to exclude it when you only
want the main draw, which also lowers your bill.

#### 6. Nothing content-free is ever billed

An unplayed slot in a draw comes back from the source as the literal string **`TBD`**, not as
a null — 294 of them across sampled windows. Those are dropped rather than charged for. A
half-known match (`Alcaraz vs TBD`) keeps its one real player, because that is genuine draw
information.

***

### Example input

Wimbledon fortnight, main draw singles only:

```json
{
  "tours": ["atp", "wta"],
  "dateFrom": "2026-06-29",
  "dateTo": "2026-07-12",
  "divisions": ["Singles"],
  "includeQualifying": false,
  "sortBy": "round",
  "maxItems": 1000
}
```

Everything on right now, both tours:

```json
{ "tours": ["atp", "wta"] }
```

One player's whole season, singles and doubles:

```json
{ "tours": ["atp"], "player": "Alcaraz", "dateFrom": "2026-01-01", "dateTo": "2026-10-01" }
```

Finals only, for a season summary:

```json
{ "tours": ["wta"], "dateFrom": "2026-01-01", "dateTo": "2026-06-30", "rounds": ["Final"] }
```

***

### Settings that matter

These are the ones that change your **bill**, not just your results:

- **`maxItems`** is a hard cap on rows written. A Grand Slam month can exceed 1,700 matches, so
  set it deliberately before pulling a wide range.
- **`includeQualifying: false`** removes roughly a quarter to a third of a Slam's matches. If
  you only want main-draw results, this is the cheapest filter you can apply.
- **`divisions: ["Singles"]`** drops every doubles and mixed match — about a quarter of a Slam.
- **`dateFrom` + `dateTo`** is fetched a month at a time, so widening a range by a month costs
  one extra request, not thirty.

All filtering happens before anything is written, so you are never charged for rows you then
discard.

***

### Typical uses

- **Betting and modelling datasets.** Set-by-set scores with tiebreaks, seeds and rounds across
  years, in one table.
- **Player form and head-to-head.** Filter by player across a whole season, doubles included.
- **Draw and results pages.** Sort by round to get a draw in the order it was played.
- **Doubles analysis**, which most datasets simply cannot do because the pairs come back empty.

***

### Reliability

Straight HTTP against a public JSON API — no HTML parsing, no headless browser, no
bot-detection games, so nothing breaks because a web page was redesigned.

The self-test that gates every release runs against the live API and asserts the numbers in
this README, including that doubles pairs resolve, that a month request really is the month,
and that no placeholder row can be billed.

***

### Notes

- Data is provided **as-is for research and analysis**, with no warranty of accuracy or
  timeliness. It is not betting advice.
- The tennis calendar has gaps. Empty results for a given week usually mean no tournament was
  on, and the off-season runs from late November to late December.
- Only the ATP and WTA tours are available. ITF and Challenger events are not served by this
  source, and doubles is a division inside each tour rather than a separate tour.
- Seeds exist for main-draw matches, so `seededOnly` also excludes most qualifying.
- A retirement can show a partial final set, e.g. `6-3, 0-0` where play had just started in the
  second set when a player retired. `isRetirement` tells you that is what happened.
- A single run covers up to 24 months. For more, split the range across runs.

***

### Questions or a bug?

Open an issue on the **Issues** tab with your input JSON and the run ID — that's usually
enough to reproduce it immediately.

If it saved you time, a quick rating on the **Reviews** tab is the most useful thing you can do
for it — it's how other people find a tool in the Store, and it tells me what to improve next.

# Actor input Schema

## `tours` (type: `array`):

Which ESPN tour feeds to read. These are NOT a men's/women's split: each feed carries every draw of the tournaments it covers, so they overlap heavily (measured: 340 of 364 matches in common over one fortnight). Both are read by default because each also carries tournaments the other misses, and duplicates are removed automatically. To pick men's or women's matches, use the Divisions filter.

## `dateFrom` (type: `string`):

Start date (YYYY-MM-DD). Leave both dates empty for whatever tournaments are on right now. History reaches back to at least 2010.

## `dateTo` (type: `string`):

End date (YYYY-MM-DD). Set with Date from to pull a historical range; a range is fetched one calendar month per request, up to 24 months in a single run.

## `player` (type: `string`):

Keep only matches involving this player, matched as a case-insensitive substring against both sides — including the individual members of a doubles pair. Example: Alcaraz

## `country` (type: `string`):

Keep only matches where either side's country matches this text, case-insensitive. Example: Spain

## `divisions` (type: `array`):

Keep only these draws, matched as substrings of the division name. This — not the Tours setting — is how you select men's or women's matches. Leave empty for all five draws. Example: pick Men's Singles for the men's main draw only.

## `rounds` (type: `array`):

Keep only these rounds, matched as substrings of the round name. Leave empty for the whole draw. Example: pick Final and Semifinal for the business end only.

## `includeQualifying` (type: `boolean`):

Qualifying rounds are included by default and are a large share of a Grand Slam — 329 of 1,126 ATP matches in July 2026. Turn this off for main-draw results only, which also lowers the bill.

## `seededOnly` (type: `boolean`):

Keep only matches where at least one side carries a seed. Seeds exist for main-draw matches, so this also excludes most qualifying.

## `statusFilter` (type: `string`):

Filter by state of play. Walkovers and retirements both count as completed, and are flagged separately in the isWalkover and isRetirement columns.

## `sortBy` (type: `string`):

Row order in the dataset. 'Round' orders a draw the way it is actually played, qualifying first through to the final.

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

Hard cap on rows written, and therefore on the bill. A Grand Slam month can exceed 1,700 matches, so set this deliberately when pulling a wide range.

## Actor input object example

```json
{
  "tours": [
    "atp",
    "wta"
  ],
  "divisions": [],
  "rounds": [],
  "includeQualifying": true,
  "seededOnly": false,
  "statusFilter": "all",
  "sortBy": "date",
  "maxItems": 500
}
```

# Actor output Schema

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

ATP and WTA matches as dataset items. Each item carries player1/player2 (or both doubles pairs plus their individual members), setScores, player1Sets/player2Sets, seeds, countries, division, round, winner, status flags for walkovers and retirements, and venue.

# 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 = {
    "tours": [
        "atp",
        "wta"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pixflor/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 = { "tours": [
        "atp",
        "wta",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("pixflor/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 '{
  "tours": [
    "atp",
    "wta"
  ]
}' |
apify call pixflor/tennis-scraper --silent --output-dataset

```

## MCP server setup

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