# Tennis Scores & Results API: ATP, WTA Rankings, Challenger, ITF (`localwire/tennis-data`) Actor

Tennis scores, results, fixtures and order of play for ATP, WTA, Challenger and ITF tournaments, plus ATP and WTA rankings and the tournament calendar. Set-by-set scores with tie-breaks, seeds, rounds, surface, retirements and walkovers. Filter by tour, date, tournament or player; monitor mode.

- **URL**: https://apify.com/localwire/tennis-data.md
- **Developed by:** [Local Wire](https://apify.com/localwire) (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 $1.00 / 1,000 matches

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 Scores, Results & Rankings API: ATP, WTA, Challenger, ITF

Get **tennis results, fixtures, live scores and rankings** for ATP, WTA, Challenger and ITF tournaments as clean JSON, CSV or Excel, for **$1 per 1,000 matches** ($0.001 each). There is no subscription and no API key to apply for: run it and pay only for the records that come back.

One Actor covers the whole week in tennis:

- **Results** with set-by-set scores, tie-break points, winner, round, seeds, retirements and walkovers.
- **Fixtures and order of play** for the coming days, with courts and start times.
- **Live scores**: the ATP and WTA matches in play right now, with the score so far.
- **ATP and WTA rankings**: the top 150 singles players of each tour with points and movement.
- **Tournament calendar**: dates, location, level and (for Challenger and ITF) surface.
- **Monitor mode** for schedulers: each new result exactly once, with no duplicates.

It works with no input at all. Press Start and you get yesterday's and today's finished ATP and WTA singles matches, which during the season usually costs between one and ten cents.

### What you get

#### A match

Every match, from any tour and either source, has the same shape:

```json
{
  "type": "match",
  "id": "espn-186530",
  "source": "espn",
  "sourceUrl": "https://www.espn.com/tennis/scoreboard/tournament/_/eventId/148-2026/competitionType/1",
  "tour": "ATP",
  "gender": "men",
  "eventType": "singles",
  "draw": "Men's Singles",
  "tournament": {
    "id": "espn-148-2026",
    "name": "Bybit Stockholm Open",
    "category": "ATP",
    "surface": null,
    "indoor": null,
    "location": "Stockholm, Sweden",
    "country": "Sweden",
    "startDate": "2026-11-07",
    "endDate": "2026-11-14",
    "url": "https://www.espn.com/tennis/scoreboard/tournament/_/eventId/148-2026"
  },
  "round": "Round 1",
  "qualifying": false,
  "court": "Center Court",
  "startTime": "2026-11-09T17:05:00.000Z",
  "startTimeConfirmed": true,
  "status": "finished",
  "statusText": "Final",
  "bestOf": 3,
  "home": {
    "name": "Tomas Martin Etcheverry",
    "players": [{ "id": "3739", "name": "Tomas Martin Etcheverry", "country": "Argentina", "countryCode": "ARG", "ranking": 29 }],
    "seed": 5,
    "setsWon": 2
  },
  "away": {
    "name": "Max Dahlin",
    "players": [{ "id": "13232", "name": "Max Dahlin", "country": "Sweden", "countryCode": "SWE", "ranking": null }],
    "seed": null,
    "setsWon": 1
  },
  "sets": [
    { "set": 1, "home": 6, "away": 4, "homeTiebreak": null, "awayTiebreak": null },
    { "set": 2, "home": 6, "away": 7, "homeTiebreak": 6, "awayTiebreak": 8 },
    { "set": 3, "home": 6, "away": 3, "homeTiebreak": null, "awayTiebreak": null }
  ],
  "score": "6-4 6-7(6) 6-3",
  "winner": "home",
  "winnerName": "Tomas Martin Etcheverry",
  "rankingsAsOf": "2026-11-05",
  "scrapedAt": "2026-11-10T10:13:14.127Z"
}
```

Reading the record:

- **`home` and `away`** are simply the first and second side as the source lists them. Tennis has no home player; the names keep the record compatible with other sports data.
- **`status`** is one of `scheduled`, `live`, `suspended`, `finished`, `retired`, `walkover`, `cancelled`, `postponed` or `abandoned`. `statusText` is the source's own wording.
- **`sets`** holds the games of each set and, when a set went to a tie-break, the points of both sides. A doubles decider played as a match tie-break is a 1-0 set that carries the tie-break points.
- **`score`** is the score as it is usually written, from the winner's side: `6-4 6-7(6) 6-3`, `3-6 6-3 [10-8]` for a match tie-break, `2-6 7-6(7) 4-0 ret.` for a retirement and `w/o` for a walkover.
- **`winner`** is `home`, `away` or null until the match is decided. `winnerName` saves you a lookup.
- **`bestOf`** is read from the finished score (the winner took two or three sets). Before a match ends it is 5 for the men's singles main draw of a Grand Slam, 3 where that is certain, and null where it is not.
- **`players`** has one entry for singles and two for doubles. `ranking` is the player's current ATP or WTA singles ranking when *Add current rankings* is on (see below); `rankingsAsOf` says which list it came from.
- **`startTimeConfirmed`** is false while only the day is known. All times are UTC.

Matches read from Flashscore tournament pages (Challenger and ITF always, ATP and WTA when you choose that source) add the **court surface**, with shorter player names:

```json
{
  "type": "match",
  "id": "flashscore-YZjNuqsm",
  "source": "flashscore",
  "sourceUrl": "https://www.flashscore.com/match/YZjNuqsm/",
  "tour": "ATP",
  "draw": "Men's Singles",
  "tournament": { "id": "flashscore-atp-singles-stockholm", "name": "Stockholm", "category": "ATP", "surface": "hard", "indoor": true, "location": null, "country": "Sweden", "startDate": null, "endDate": null, "url": "https://www.flashscore.com/tennis/atp-singles/stockholm/" },
  "round": "1/16-finals",
  "qualifying": false,
  "startTime": "2026-11-09T17:10:00.000Z",
  "status": "finished",
  "home": { "name": "Etcheverry T. M.", "players": [{ "id": "AXL5qpKa", "name": "Etcheverry T. M.", "country": "Argentina", "countryCode": null, "ranking": null }], "seed": null, "setsWon": 2 },
  "away": { "name": "Dahlin M.", "players": [{ "id": "SvxjxyR7", "name": "Dahlin M.", "country": "Sweden", "countryCode": null, "ranking": null }], "seed": null, "setsWon": 1 },
  "score": "6-4 6-7(6) 6-3",
  "winner": "home",
  "winnerName": "Etcheverry T. M."
}
```

(That is the same match as above, shortened here; the full record has every field of the first example.)

#### A ranking row

```json
{
  "type": "ranking",
  "id": "espn-atp-singles-2375",
  "source": "espn",
  "sourceUrl": "https://www.espn.com/tennis/rankings",
  "tour": "ATP",
  "rankingType": "singles",
  "rank": 1,
  "previousRank": 1,
  "movement": 0,
  "player": "Alexander Zverev",
  "playerId": "2375",
  "country": "Germany",
  "countryCode": "GER",
  "points": 9550,
  "date": "2026-11-05",
  "scrapedAt": "2026-11-10T10:10:02.000Z"
}
```

`movement` is the number of places gained since the previous list (negative when the player dropped). `date` is the day the list was published. `playerId` is the same id that ATP and WTA match records carry in `players[].id`, so rankings and matches join cleanly.

#### A tournament

```json
{
  "type": "tournament",
  "id": "espn-148-2026",
  "source": "espn",
  "sourceUrl": "https://www.espn.com/tennis/scoreboard/tournament/_/eventId/148-2026",
  "tour": "ATP",
  "name": "Bybit Stockholm Open",
  "category": "ATP",
  "surface": null,
  "indoor": null,
  "location": "Stockholm, Sweden",
  "country": "Sweden",
  "startDate": "2026-11-07",
  "endDate": "2026-11-14",
  "status": "in-progress",
  "draws": [
    { "draw": "Men's Singles", "matches": 39 },
    { "draw": "Men's Doubles", "matches": 15 }
  ],
  "previousWinners": [
    { "draw": "Men's Singles", "name": "Casper Ruud" },
    { "draw": "Men's Doubles", "name": "Alexander Erler / Robert Galloway" }
  ]
}
```

`category` is `Grand Slam` for the four majors and otherwise the tour (`ATP`, `WTA`, `Challenger`) or the ITF level (`ITF M15`, `ITF W75`). `status` is `upcoming`, `in-progress` or `finished`.

The dataset has a **Matches**, a **Rankings** and a **Tournaments** view, and every run also saves an `OUTPUT` record that says what each source returned, how many requests were made and why the run stopped.

### Quick start

1. Press **Start** with the form as it is. You get the 50 most recent finished ATP and WTA singles matches of the last 30 days (the form looks back that far so it still finds matches in the off-season; set **From N days ago** to 1 for yesterday and today only).
2. Change **What to get** to `fixtures`, `live`, `rankings` or `tournaments` to see the other record types.
3. Add `challenger` or `itf` under **Tours** for the lower tours.
4. Open the **Matches** view of the dataset, or export it as JSON, CSV, Excel or an RSS feed.

Some inputs to copy:

**Yesterday's and today's results, singles and doubles**

```json
{ "mode": "results", "tours": ["atp", "wta"], "eventType": "all" }
```

**Tomorrow's order of play on every tour**

```json
{ "mode": "fixtures", "tours": ["atp", "wta", "challenger", "itf"], "daysAhead": 1, "maxResults": 500 }
```

**Every match of a Grand Slam, all five draws**

```json
{ "mode": "results", "tournaments": ["Wimbledon"], "dateFrom": "2026-06-22", "dateTo": "2026-07-12", "eventType": "all", "maxResults": 1000 }
```

**One player's results over three months**

```json
{ "mode": "results", "players": ["Sinner"], "daysBack": 90, "maxResults": 200 }
```

**The full ATP and WTA top 150**

```json
{ "mode": "rankings", "maxResults": 300 }
```

**A feed of new results: schedule this every 30 minutes**

```json
{ "mode": "results", "tours": ["atp", "wta"], "monitorMode": true }
```

### Input reference

Every field is optional.

| Field | Default | What it does |
|---|---|---|
| `mode` | `results` | `results`, `fixtures`, `live`, `matches`, `rankings` or `tournaments`. See the next section. |
| `tours` | `["atp", "wta"]` | Any of `atp`, `wta`, `challenger`, `itf`. |
| `eventType` | `singles` | `singles`, `doubles` (mixed doubles count as doubles) or `all`. |
| `daysBack` | `1` | Start of the date range, counted back from today (UTC). Used by results, matches and tournaments. |
| `daysAhead` | `2` | End of the date range, counted forward from today. Used by fixtures, matches and tournaments. |
| `dateFrom`, `dateTo` | – | Exact dates (`2026-06-22`) instead of the day counts. A range can span up to 366 days. |
| `tournaments` | – | Keep tournaments whose name contains any of these words, e.g. `["Wimbledon", "Finals"]`. |
| `players` | – | Keep matches (or ranking rows) where a player's name contains any of these, e.g. `["Gauff"]`. |
| `includeQualifying` | `true` | Set to false for main-draw matches only. |
| `addRankings` | `true` | Add each singles player's current ranking to ATP and WTA matches. |
| `dataSource` | `auto` | `auto`, or `flashscore` to read this week's ATP and WTA tournaments from Flashscore (adds the surface). |
| `tournamentUrls` | – | Flashscore tournament pages to read instead of the tours. |
| `monitorMode` | `false` | Return only matches that earlier runs have not returned. |
| `monitorStoreName` | `tennis-data-monitor` | The memory of one monitor. Use a different name for each separate feed. |
| `maxResults` | `100` | Stop after this many records. |

Filters are not case-sensitive. A name filter matches any part of the name, so `Williams` finds every Williams.

### The modes

#### `results`: finished matches

Matches with the status `finished`, `retired` or `walkover` that started inside the date range, newest first. With `atp` and `wta` you can ask for any range: last night, a whole tournament, a whole season, or a past year. Qualifying rounds are included unless you turn them off.

#### `fixtures`: order of play

Scheduled matches whose two sides are known, soonest first. Tournaments publish the order of play a day ahead, so `daysAhead: 1` or `2` is the useful range; later rounds appear once the players are decided. Draw slots that are still empty are never returned, so you do not pay for placeholders.

#### `live`: matches in play

The ATP and WTA matches being played at the moment of the run, with the sets so far. It is a snapshot: one run, one look. See the FAQ for what that means in practice.

#### `matches`: everything in a range

Results, matches in play and fixtures together, oldest first. Handy for building a tournament page or a results-and-schedule widget from one call.

#### `rankings`: ATP and WTA singles

The current singles ranking list of each chosen tour: rank, player, country, points, previous rank and movement, with the date of the list. Each tour has 150 rows. `maxResults` is shared between the tours, so 100 gives the top 50 of each and 300 gives everything. Use `players` to pull single rows.

#### `tournaments`: the calendar

One record per tournament that overlaps the date range. For ATP and WTA that includes tournaments that have not started (set `daysAhead` to 60 or more for a calendar) with dates, location, the draws and last edition's champions. For `challenger` and `itf` it lists the tournaments being played this week, each with its country and surface.

#### Monitor mode

Tick **Monitor mode** and put the Actor on a schedule. Each run remembers what it returned in a named key-value store and returns only what is new:

- With `mode: "results"` you get each finished match once, as soon as a run sees it.
- With `fixtures` you get each match once when it is scheduled; with `matches` you get it once as a fixture, once in play and once as a result.
- A match cut off by your spending limit or by `maxResults` is not marked as seen, so it comes through on the next run.
- A run that finds nothing new costs only the start fee.

### Use cases

- **Results feeds for apps, sites and newsletters.** A scheduled monitor run turns the tours into a clean stream of finished matches that you can push to a webhook, a sheet or a database.
- **Betting models and trading tools.** Consistent set scores, tie-breaks, seeds, rounds, retirements, best-of and (for Challenger and ITF, or with the Flashscore source) surface, across four tours. Pull years of ATP and WTA results by date range for back-testing, then keep the data current with a daily run.
- **Fantasy tennis and prediction games.** Fixtures with confirmed start times a day ahead, results to settle picks, and current rankings on each player.
- **Sports media widgets.** Order of play, scores in play and a tournament's results from one schema, with the round and court on every match.
- **Ranking trackers.** Run `rankings` every Monday and store the rows to build a ranking history with points and movement.
- **Alerts.** Filter by player or tournament and connect the run to Slack, e-mail or a webhook to hear when a player's match is scheduled or finished.
- **AI agents and assistants.** Small, predictable records and safe defaults make it a good tool for agents that answer "who won last night?" or "who does she play next?".

### Pricing

Pay per result. There is no monthly fee.

| What | Price |
|---|---|
| Match (a result, a fixture or a match in play) | **$0.001** |
| Ranking row | **$0.0003** |
| Tournament | **$0.0005** |
| Run start | **$0.0001** |

Worked examples:

- **Last night's results.** The default run returns the finished ATP and WTA singles matches of yesterday and today, typically 15 to 80 of them: **$0.02 to $0.08**.
- **A whole Grand Slam.** Wimbledon 2026 has 635 matches across men's and women's singles with qualifying, both doubles draws and the mixed: **about $0.64**. The two singles main draws alone are 254 matches, about $0.25.
- **1,000 matches** of any kind: **$1.00**.
- **The full ATP and WTA top 150** (300 rows): **$0.09**. The top 50 of each: $0.03.
- **A two-month calendar** of about 20 tournaments: **$0.01**.
- **A results feed every 30 minutes for a month.** 1,440 runs cost $0.14 in start fees, plus $0.001 for each new match, so a month of every ATP and WTA singles result is typically a few dollars.

Set **Max cost per run** in the run options to cap your spending. The Actor checks your limit before every request and stops cleanly when it is reached; `maxResults` does the same by count.

### Use it from the API, MCP and AI agents

Run it and get the records back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/localwire~tennis-data/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"mode": "results", "tours": ["atp", "wta"], "daysBack": 1}'
```

With the JavaScript client:

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("localwire/tennis-data").call({ mode: "rankings", tours: ["wta"], maxResults: 20 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

With Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("localwire/tennis-data").call(run_input={"mode": "fixtures", "daysAhead": 1})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

**MCP.** Add the hosted Apify MCP server at `https://mcp.apify.com` to Claude, Cursor, VS Code or any MCP client and enable the Actor `localwire/tennis-data`. Your assistant can then answer questions such as *"what were yesterday's ATP results?"*, *"who is ranked in the WTA top 10?"* or *"what is on in Stockholm tomorrow?"*. The defaults are deliberately small, so an agent that calls the tool with no arguments gets a short, cheap and useful answer.

It also works with Make, Zapier, n8n and webhooks through Apify's integrations, and any run can be scheduled.

### FAQ

#### Is there a free tennis results API?

This one is pay-per-result rather than free, but it is close: there is no subscription, and Apify's free plan includes a monthly usage credit (5 US dollars at the time of writing) that pays for about 5,000 matches at $0.001 each. You need an Apify account and nothing else.

#### Does it include ATP and WTA rankings?

Yes: the current singles rankings of both tours, top 150 each, with points, previous rank and movement. It does not have doubles rankings, the Race, or past ranking lists. To build a history, schedule a weekly run and keep the rows.

#### Does it have live scores?

Yes for ATP and WTA, with a clear limit. `mode: "live"` returns the matches in play at the moment of the run with the sets and games so far. It is one snapshot per run, not a stream, and it does not give the points inside the current game or point-by-point data. For a scoreboard, schedule a run every few minutes while play is on. Challenger and ITF matches have no live scores here: they appear as fixtures and then as results.

#### Does it have head-to-head records, match statistics or odds?

No. Aces, serve percentages, point-by-point data, match duration, head-to-head tables, draws as brackets and betting odds are not included. You can build a head-to-head yourself from results: filter by one player over a long date range and keep the matches against the other.

#### Which tournaments are covered?

- **ATP and WTA:** every tour-level tournament, the four Grand Slams (men's and women's singles and doubles with qualifying, and mixed doubles), the season-ending finals and the WTA 125 events, for any date range. Results were checked back to 2019.
- **ATP Challenger Tour and ITF World Tennis Tour:** the tournaments being played in the current week, men and women, singles and doubles.
- **Not covered:** junior events, exhibitions and team competitions.

#### How do I get the court surface?

Surface (`hard`, `clay`, `grass`, `carpet`, plus an `indoor` flag) is on every Challenger and ITF match. For ATP and WTA, set `dataSource` to `flashscore` to read the current week's tournaments with their surface, or paste a tournament page into `tournamentUrls`. The default ATP and WTA source does not publish the surface, so there it is null.

#### How far back do results go?

ATP and WTA results are available by date for past seasons; ask for at most 366 days per run. Challenger and ITF are limited to the current week's tournaments, so run the Actor regularly (monitor mode is made for this) to build your own archive.

#### Why do some names look different?

ATP and WTA records carry full names ("Tomas Martin Etcheverry") and three-letter country codes. Challenger and ITF records carry the short form the source uses ("Etcheverry T. M.") and the country name. When filtering by player, the surname works for both.

#### Can I get one tournament only?

Yes. For ATP and WTA use `tournaments` with a word from its name and a date range that covers it. For any tournament on Flashscore, paste its page into `tournamentUrls` and set `daysBack` to 21 so the range covers the whole event.

#### What does the ranking on a match mean?

It is the player's ranking on the latest list at the time of the run, not at the time of the match. To keep that honest, it is only added to matches from the two weeks before that list onwards; older matches have `ranking: null`. `seed` is always the seeding at that tournament.

### Coverage and limits, exactly

- **Sources.** ATP and WTA matches, rankings and calendar are read from ESPN's public tennis scoreboard and rankings. Challenger and ITF matches, and anything given in `tournamentUrls`, are read from public Flashscore tournament pages. Each record says which in `source` and links to it in `sourceUrl`.
- **ATP and WTA records** have no surface, no tournament level beyond the Grand Slam flag, and no match duration. WTA 125 events appear under `WTA`.
- **Challenger and ITF records** have no seeds, rankings or courts. Their tournaments have no published dates in the page: a tournament's `startDate` is the day of its first listed match and `endDate` is null.
- **Tournament URLs** read the edition the page currently shows (the latest one).
- **Rankings** are the current list only, singles only, top 150 per tour.
- **Live** is ATP and WTA only, one snapshot per run.
- **`bestOf`** is worked out from the score or the draw, as described above; it is not a field the sources publish reliably.
- **Volume.** At most 80 Challenger and ITF tournament pages are read in one run (a busy week has about 70 singles and doubles draws across both), one page every two seconds. Choose one tour or one event type to keep runs short.
- **Order.** Results come newest first, fixtures soonest first. ATP and WTA records are sorted together; Challenger and ITF records follow, tournament by tournament.
- **Off-season.** The tours pause from late November to the end of December. A short date range can come back empty then; widen `daysBack`.
- **Times** are UTC in ISO 8601. Date filters use the match start time.
- **Players.** Records hold the public sporting record only: name, country, seed, ranking and results. No dates of birth, ages, photos, biographies or contact details are collected.

### If a source blocks the Actor

The Actor makes plain, polite requests with one fixed browser user-agent, spaced one to two seconds apart. It uses no proxies and does nothing to get around bot protection. If a source refuses a request (an access-denied or challenge page, or rate limiting that persists after one pause), **the run stops**, keeps what it already delivered, and says so in the status message and in the `OUTPUT` record (`stopReason: "blocked"`). You are charged only for the records you received. An ordinary error on one page, such as a tournament page that no longer exists, is noted in `OUTPUT` and the run carries on.

### Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by the ATP, the WTA, the ITF, ESPN, Flashscore or any tournament. All names and trademarks belong to their owners. Match results, schedules and rankings are facts; check the terms of the sources for how you may reuse the data, especially commercially.

# Actor input Schema

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

results: finished matches (including retirements and walkovers). fixtures: scheduled matches / order of play. live: ATP and WTA matches in play right now, with the score so far (one snapshot per run). matches: everything in the date range, whatever its status. rankings: the ATP and WTA singles rankings (top 150 each). tournaments: the tournament calendar. results if left out.

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

atp and wta cover every tour-level tournament including the four Grand Slams (and WTA 125 events), for any date range. challenger and itf cover the tournaments being played this week (results and fixtures). Rankings and live scores exist for atp and wta only. atp and wta if left out.

## `eventType` (type: `string`):

singles, doubles (mixed doubles count as doubles), or all. singles if left out.

## `daysBack` (type: `integer`):

Start of the date range, counted back from today (UTC). 1 means yesterday and today. Used by results, matches and tournaments; ignored when 'From date' is set. Tennis has an off-season from late November through December, so raise this if a run comes back empty then.

## `daysAhead` (type: `integer`):

End of the date range, counted forward from today (UTC). Used by fixtures, matches and tournaments; ignored when 'To date' is set. Order of play is usually published a day ahead; for a calendar of coming tournaments use 60 or more.

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

First day of the range, e.g. 2026-06-22. ATP and WTA results go back years. A range may span at most 366 days.

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

Last day of the range (inclusive), e.g. 2026-07-12.

## `tournaments` (type: `array`):

Keep only tournaments whose name contains ANY of these, e.g. Wimbledon, US Open, Finals. Not case-sensitive. Set the dates to cover the tournament.

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

Keep only matches (or ranking rows) where a player's name contains ANY of these, e.g. Sinner, Gauff. Not case-sensitive. Challenger and ITF names are abbreviated ("Borg L."), so use the surname.

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

Untick to keep main-draw matches only.

## `addRankings` (type: `boolean`):

Adds each singles player's current ATP or WTA ranking (top 150) to ATP and WTA matches from the last two weeks onwards. Costs nothing extra: one more request per tour.

## `dataSource` (type: `string`):

auto: ATP and WTA from ESPN (any date range, full names, seeds, courts; no surface). flashscore: this week's ATP and WTA tournaments from Flashscore instead, with the court surface on every match but abbreviated names and no seeds. Challenger and ITF always come from Flashscore. Live scores and rankings always come from ESPN.

## `tournamentUrls` (type: `array`):

Read these tournament pages instead of the tours above, e.g. https://www.flashscore.com/tennis/atp-singles/wimbledon/ or https://www.flashscore.com/tennis/challenger-men-singles/knoxville/. Each page is the tournament's current edition and names its own draw, so 'Singles or doubles' is ignored. The date range still applies: set 'From N days ago' to 21 for a whole tournament.

## `monitorMode` (type: `boolean`):

Remember what was returned and return only matches not seen in earlier runs. Schedule the Actor (e.g. every 30 minutes with mode results) for a feed of new results with no duplicates. Works with results, fixtures, live and matches.

## `monitorStoreName` (type: `string`):

Name of the key-value store that remembers returned matches. Use a different name for each separate monitor. Letters, digits and hyphens.

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

Stop after this many records. For rankings it is shared between the tours: 100 gives the top 50 of each, 300 the full top 150 of both.

## Actor input object example

```json
{
  "mode": "results",
  "tours": [
    "atp",
    "wta"
  ],
  "eventType": "singles",
  "daysBack": 30,
  "daysAhead": 2,
  "includeQualifying": true,
  "addRankings": true,
  "dataSource": "auto",
  "tournamentUrls": [
    "https://www.flashscore.com/tennis/atp-singles/wimbledon/",
    "https://www.flashscore.com/tennis/wta-doubles/us-open/"
  ],
  "monitorMode": false,
  "monitorStoreName": "tennis-data-monitor",
  "maxResults": 50
}
```

# Actor output Schema

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

One row per match: tournament, round, players, score, winner and status.

## `rankings` (type: `string`):

One row per ranked player: rank, points and movement.

## `tournaments` (type: `string`):

One row per tournament: dates, location, level, surface and status.

## `allResults` (type: `string`):

Every record in the run's default dataset, all fields.

# 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": "results",
    "tours": [
        "atp",
        "wta"
    ],
    "daysBack": 30,
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("localwire/tennis-data").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": "results",
    "tours": [
        "atp",
        "wta",
    ],
    "daysBack": 30,
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("localwire/tennis-data").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": "results",
  "tours": [
    "atp",
    "wta"
  ],
  "daysBack": 30,
  "maxResults": 50
}' |
apify call localwire/tennis-data --silent --output-dataset

```

## MCP server setup

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

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/5ZHYAhG2G04ZO3oNx/builds/ELGViLChe3sJnaK4B/openapi.json
