# Tennis Scraper — Live Scores, Matches, Rankings & Odds (`innolabs/tennis-scraper`) Actor

Tennis scraper and API: live scores, ATP/WTA/Challenger/ITF matches by date, set scores, stats, point-by-point, H2H, bookmaker odds and rankings. JSON, CSV, Excel.

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

## Pricing

Pay per event

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 — Live Scores, Matches, Rankings & Odds

Get tennis live scores, results and schedules for ATP, WTA, Challenger and ITF events, with set
scores and tiebreaks, match statistics, point-by-point, head-to-head, bookmaker odds, ATP/WTA
rankings and player profiles. No login and no API key needed — export the data as JSON, CSV
or Excel, or pull it straight into your app through the Apify API.

### What does Tennis Scraper do?

Tennis Scraper collects public tennis data from Flashscore and returns one clean, flat-ish
record per match, ranking row or player. Pick a mode:

- **Matches by date** — every match of a day or a date range (up to 7 days back and 7 days
  ahead): tournament, surface, players with country and current ranking, status, start time
  (UTC), set-by-set score with tiebreaks, winner. Filter by tour (ATP, WTA, Challenger/WTA
  125, ITF, other), singles/doubles, status and tournament name.
- **Live matches now** — matches in progress with the current set score, game score
  (e.g. `40-A`) and who is serving.
- **Match details** — for match URLs or ids: round, set durations, full statistics (aces,
  double faults, serve %, break points, winners, unforced errors… per match and per set),
  point-by-point, previous head-to-head meetings and odds from up to 20 bookmakers.
- **Rankings** — ATP, WTA, Race and doubles rankings: rank, previous rank, movement,
  points, tournaments played.
- **Players** — profile (full name, country, age, birth date, current ranking, recent form)
  plus the player's upcoming match and latest results.

Statistics, point-by-point, head-to-head and odds can also be added to every match of the
date and live modes with one checkbox each. Data is read live at run time, so a scheduled
run always returns the current state.

### Use cases

- **Sports bettors and tipsters** — pull today's matches with bookmaker odds, opening
  prices and head-to-head into a spreadsheet or model before play starts.
- **Live score apps and widgets** — poll live matches every minute and show set and game
  scores with the server.
- **Sports data analysts** — build datasets of serve/return statistics and point-by-point
  sequences across ATP, WTA and Challenger events.
- **Fantasy and prediction games** — fetch schedules, results and rankings to settle
  contests automatically.
- **AI agents and chatbots** — answer "who plays Sinner next and what are the odds?" with a
  single actor call through MCP.
- **Media and newsletters** — daily results digests and ranking movers for your audience.

### How much does it cost?

You pay only for results (pay-per-event). Every dataset item — a match, a ranking row or a
player — is one `result`. Prices in USD per 1,000 events:

| Event | What you pay for | Free plan | Paid plans (from) |
| --- | --- | --- | --- |
| `result` | one match, ranking row or player in the dataset | $0.90 per 1,000 | $0.90 per 1,000 (Gold+) |

Bronze and Silver plans: $0.90 per 1,000 as well. Statistics, point-by-point,
head-to-head and odds are included in the same item at no extra charge.

Examples:

- Today's ATP and WTA matches (about 30–60 items on a tournament day) once a day for a month
  ≈ 1,500 results ≈ **$1.35** on the Free plan.
- The ATP and WTA top 1,000 rankings plus 8,000 matches = 10,000 results ≈ **$9.00** on any
  plan.

The Apify Free plan includes $5 monthly credit.

### How to use Tennis Scraper

In Apify Console:

1. Open Tennis Scraper and click **Try for free**.
2. Choose **What to scrape**. The form is prefilled with today's ATP and WTA matches.
3. Optional: change the date or date range, tours, singles/doubles or status; tick
   **Add match statistics**, **Add point-by-point**, **Add head-to-head** or **Add bookmaker
   odds**.
4. For match details paste match URLs or ids; for players paste player URLs or just names;
   for rankings pick the rankings and how many players.
5. Click **Start**. Most runs finish in a few seconds.
6. Open the **Output** tab and export the dataset as JSON, CSV, Excel or HTML.

Through the API:

1. Get your API token in Apify Console → Settings → Integrations.
2. Call the actor with your input JSON (see [Integrations and API](#integrations-and-api)).
3. Read the dataset items from the run.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `mode` | string | `matches` (by date, default), `live`, `details`, `rankings` or `players`. |
| `dateFrom` | string | First day (UTC): `YYYY-MM-DD`, `today`, `yesterday`, `tomorrow` or `-3`/`+2`. Up to 7 days back/ahead. Default `today`. |
| `dateTo` | string | Last day, inclusive. Empty = single day. |
| `tours` | array | `atp`, `wta`, `challenger`, `itf`, `other`. Empty = all tours. |
| `matchType` | string | `all` (default), `singles` or `doubles` (incl. mixed). |
| `status` | string | `any` (default), `scheduled`, `live` or `finished`. |
| `tournamentQuery` | string | Keep tournaments whose name or country contains this text. |
| `fallbackToRecent` | boolean | If nothing matches, return the latest finished matches of the previous 7 days (default `true`). |
| `matchUrls` | array | Match URLs or 8-character ids for `details` mode. |
| `includeStatistics` | boolean | Add match statistics to every match (always on in `details`). |
| `includePointByPoint` | boolean | Add point-by-point (always on in `details`). |
| `includeH2H` | boolean | Add previous head-to-head meetings (always on in `details`). |
| `includeOdds` | boolean | Add match-winner odds per bookmaker (always on in `details`). |
| `oddsCountry` | string | Bookmaker country: `GB` (default, most bookmakers), `US` (NJ), `CA` (ON), `DE`, `FR`, `IT`, `ES`, `AU` and more. |
| `allOddsMarkets` | boolean | Also return set winner, totals, handicaps, correct score and odd/even markets. |
| `rankingTypes` | array | `atp`, `wta`, `atp-race`, `wta-race`, `atp-doubles`, `wta-doubles`, `atp-doubles-race`, `wta-doubles-race`. Default ATP + WTA. |
| `topN` | integer | Players per ranking (default 100). |
| `players` | array | Player URLs (e.g. `https://www.flashscore.com/player/sinner-jannik/6HdC3z4H/`) or names (e.g. `Iga Swiatek`). |
| `maxMatchesPerPlayer` | integer | Upcoming + latest matches per player (default 20, 0 = profile only). |
| `addPlayerRanks` | boolean | Add current ATP/WTA rank and points to every player in a match (default `true`). |
| `maxItems` | integer | Hard cap on dataset items (default 1000). |

Example — today's ATP and WTA singles with odds and statistics:

```json
{
  "mode": "matches",
  "dateFrom": "today",
  "tours": ["atp", "wta"],
  "matchType": "singles",
  "includeOdds": true,
  "includeStatistics": true
}
```

Example — full details for two matches:

```json
{
  "mode": "details",
  "matchUrls": [
    "https://www.flashscore.com/match/tennis/hurkacz-hubert-zuHOBnY9/musetti-lorenzo-xtH2ODVI/?mid=25mNr3v3",
    "6BLY09sJ"
  ]
}
```

### Output

Each item has a `type`: `match`, `ranking` or `player`. A match from **Match details**
(lists shortened, real data from a run on 2026-11-02):

```json
{
  "type": "match",
  "id": "25mNr3v3",
  "url": "https://www.flashscore.com/match/25mNr3v3/",
  "startTime": "2026-11-02T10:10:00Z",
  "status": "finished",
  "statusDetail": "Finished",
  "tour": "ATP",
  "category": "ATP - Singles",
  "matchType": "singles",
  "gender": "men",
  "tournament": {
    "id": "CS6uPVyJ",
    "templateId": null,
    "stageId": "QcJ1dum9",
    "name": "Paris",
    "fullName": "ATP - SINGLES: Paris, hard",
    "country": "France",
    "surface": "hard",
    "phase": null,
    "url": "https://www.flashscore.com/tennis/atp-singles/paris/"
  },
  "round": "1/32-finals",
  "home": {
    "name": "Musetti L.",
    "shortCode": "MUS",
    "country": "Italy",
    "eventParticipantId": "U5QCol9r",
    "players": [
      {
        "id": "xtH2ODVI",
        "name": "Musetti L.",
        "fullName": "Lorenzo Musetti",
        "country": "Italy",
        "countryId": 98,
        "url": "https://www.flashscore.com/player/musetti-lorenzo/xtH2ODVI/",
        "rank": 26,
        "rankingPoints": 1920
      }
    ]
  },
  "away": {
    "name": "Hurkacz H.",
    "shortCode": "HUR",
    "country": "Poland",
    "eventParticipantId": "xWTKqSwe",
    "players": [
      {
        "id": "zuHOBnY9",
        "name": "Hurkacz H.",
        "fullName": "Hubert Hurkacz",
        "country": "Poland",
        "countryId": 154,
        "url": "https://www.flashscore.com/player/hurkacz-hubert/zuHOBnY9/",
        "rank": 28,
        "rankingPoints": 1585
      }
    ]
  },
  "setsHome": 2,
  "setsAway": 0,
  "sets": [
    { "set": 1, "home": 7, "away": 6, "tiebreakHome": 7, "tiebreakAway": 3, "duration": "0:44" },
    { "set": 2, "home": 7, "away": 6, "tiebreakHome": 12, "tiebreakAway": 10, "duration": "1:01" }
  ],
  "scoreText": "7-6(3) 7-6(10)",
  "winner": "home",
  "winnerName": "Musetti L.",
  "serving": null,
  "currentGame": null,
  "note": null,
  "lastUpdated": "2026-11-02T11:56:42Z",
  "duration": "1:45",
  "statistics": [
    { "period": "Match", "group": "Service", "name": "Aces", "home": "5", "away": "9" },
    { "period": "Match", "group": "Service", "name": "1st serve percentage", "home": "79%", "away": "72%" }
  ],
  "pointByPoint": [
    {
      "set": 1,
      "label": "Set 1",
      "games": [
        { "home": 0, "away": 1, "server": "away", "winner": "away", "lostServe": false, "breakPoint": false, "setPoint": false, "matchPoint": false, "points": ["0:15", "0:30", "0:40"] }
      ],
      "tiebreak": [
        { "home": 0, "away": 1, "server": "away", "winner": "away", "lostServe": false }
      ],
      "result": { "home": 7, "away": 6, "tiebreakHome": 7, "tiebreakAway": 3, "winner": "home" }
    }
  ],
  "h2h": {
    "homeWins": 3,
    "awayWins": 2,
    "matches": [
      { "id": "CUJ3Vbb4", "date": "2026-04-24T09:10:00Z", "tournament": "Madrid", "surface": "clay", "player1": "Hurkacz H.", "player2": "Musetti L.", "score": "0:2", "winner": "home", "status": "finished" }
    ]
  },
  "odds": {
    "country": "GB",
    "matchWinner": [
      { "bookmaker": "William Hill", "home": 1.85, "homeOpening": 1.91, "away": 1.95, "awayOpening": 1.91 },
      { "bookmaker": "Unibetuk", "home": 1.95, "homeOpening": 1.88, "away": 1.86, "awayOpening": 1.86 }
    ],
    "best": { "home": 1.95, "homeBookmaker": "Unibetuk", "homeAverage": 1.851, "away": 2.0, "awayBookmaker": "Betway", "awayAverage": 1.904 }
  },
  "scrapedAt": "2026-11-02T16:37:14.642173Z"
}
```

A ranking row:

```json
{
  "type": "ranking",
  "rankingType": "atp",
  "rankingName": "ATP Singles Rankings",
  "rankingDate": "2026-10-26",
  "rank": 1,
  "previousRank": 1,
  "rankChange": 0,
  "points": 10450,
  "tournamentsPlayed": 16,
  "player": { "id": "6HdC3z4H", "name": "Sinner Jannik", "country": "Italy", "countryId": 98, "url": "https://www.flashscore.com/player/sinner-jannik/6HdC3z4H/" },
  "url": "https://www.flashscore.com/tennis/rankings/atp/",
  "scrapedAt": "2026-11-02T16:43:01.089600Z"
}
```

A player:

```json
{
  "type": "player",
  "id": "xtH2ODVI",
  "name": "Lorenzo Musetti",
  "url": "https://www.flashscore.com/player/musetti-lorenzo/xtH2ODVI/",
  "country": "Italy",
  "rankings": [{ "ranking": "ATP", "rank": 26 }],
  "birthDate": "2002-03-03",
  "age": 24,
  "imageUrl": "https://static.flashscore.com/res/image/data/beye6ugl-dO8eBuOC.png",
  "recentForm": "WLWWWWWWLL",
  "recentWins": 7,
  "recentLosses": 3,
  "matchesReturned": 10,
  "scrapedAt": "2026-11-02T16:43:02.030768Z"
}
```

Field notes:

- `status`: `scheduled`, `live`, `finished`, `retired`, `walkover`, `awarded`,
  `interrupted`, `abandoned`, `postponed`, `delayed` or `cancelled`; `statusDetail` is the
  site label (`Set 2`, `Set 3 - Tiebreak`, `Finished / retired`…). `note` carries remarks
  such as "… - withdrawn.".
- `startTime`, `lastUpdated` and all dates are ISO 8601 in UTC.
- `sets[].tiebreakHome/Away` are tiebreak points; `scoreText` shows the loser's tiebreak
  points in brackets like the scoreboard. `setsHome/setsAway` are sets won.
- `winner`, `serving`, `odds.*` and `h2h.matches[].winner` use `home`/`away` of the current
  match. `currentGame` is the live game score (`15`, `30`, `40`, `A`).
- Doubles: `home.players` / `away.players` list both partners; `rank` is the doubles rank.
- `round` and set `duration` are filled in **Match details** mode (`null` in list modes).
- `statistics[].home/away` are the values as shown on the site (`5`, `79%`,
  `80% (51/64)`).
- `odds.matchWinner` lists every bookmaker's current and opening price; `odds.best` has the
  highest and average prices. With **All odds markets**, `odds.markets` adds every market
  per bookmaker with lines (`line`, `lineType` games/sets), correct scores and settled
  results (`won`/`lost`).

### Integrations and API

Run the actor and get the items back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/innolabs~tennis-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "live", "tours": ["atp", "wta"], "includeOdds": true}'
```

Python with [apify-client](https://docs.apify.com/api/client/python):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("innolabs/tennis-scraper").call(
    run_input={"mode": "matches", "dateFrom": "tomorrow", "tours": ["atp", "wta"], "includeOdds": True}
)
for match in client.dataset(run["defaultDatasetId"]).iterate_items():
    best = (match.get("odds") or {}).get("best") or {}
    print(match["startTime"], match["home"]["name"], "vs", match["away"]["name"], best.get("home"), best.get("away"))
```

- **Make, Zapier, n8n** — use the Apify app/node to start the actor and push results to
  Google Sheets, Airtable, Slack, Telegram or your database.
- **Scheduling** — create a schedule in Apify Console: e.g. every minute for live scores,
  every morning for the day's schedule and odds, every Monday for the new rankings.
- **Webhooks** — trigger your pipeline when a run finishes.
- **AI agents (MCP)** — connect Claude, Cursor or other MCP clients through the Apify MCP
  server at https://mcp.apify.com and let your agent look up live scores, odds, rankings
  or a player's form on demand.

### FAQ

#### Is it legal to scrape tennis scores?

The actor reads only publicly available sports data (scores, schedules, statistics,
rankings and odds shown to every visitor) and needs no login. Match results are facts, but
check how you redistribute them and respect the source's terms for your use case.

#### Do I need proxies?

No. The actor works without a proxy and that is the default, which keeps runs cheap. If
requests ever start failing in your region, switch on Apify Proxy in **Proxy configuration**.

#### How far back and ahead can I go?

Matches by date cover 7 days back and 7 days ahead (the schedule is usually published 1–2
days in advance). For older results use **Players** mode (a player's results go back years,
page by page) or **Match details** with match ids.

#### How do I get only new or live data on a schedule?

Use **Live matches now** for in-play scores, or set **Match status** to `finished` and
**Date** to `yesterday` in a daily schedule to receive each completed match once. Every
match has a stable `id` you can use to de-duplicate in your database.

#### What happens if a match URL or player is wrong, or a day has no matches?

A bad URL or unknown player is skipped and listed in the run's `SUMMARY` record; the other
targets are still delivered. If none of the targets works, the run fails with a clear
message instead of finishing empty. If the chosen day and tours have no matches (for
example in the off-season), the actor returns the latest finished matches instead — switch
off **If nothing matches, return the latest finished matches** to get an empty result.

#### Why is the odds list different from my bookmaker?

Bookmakers are licensed per country. Choose **Odds country** to see the bookmakers of that
market (United Kingdom has the most). Odds are returned for scheduled, live and finished
matches; finished markets include the settled result.

#### Are seeds included?

No, seeds are not published in the data source. Use the players' `rank` instead.

### Limits

- Matches by date: 7 days back to 7 days ahead (UTC days); older matches via Players or
  Match details mode.
- `round` is available in Match details mode only.
- Statistics and point-by-point exist only for matches the source covers in detail: ATP,
  WTA and Challenger matches usually have both, ITF matches usually statistics only.
- Odds depend on bookmaker coverage for the chosen country; small ITF matches may have none.
- Player matches: up to 500 per player per run.
- `maxItems` caps the dataset; you are never charged above it.

# Changelog

This Actor's version history is a separate document: https://apify.com/innolabs/tennis-scraper/changelog.md

# Actor input Schema

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

Matches by date (results, live scores and schedule for up to 15 days), live matches only, full details for specific matches, ATP/WTA rankings, or player profiles with their recent and upcoming matches.

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

First day to scrape (UTC): YYYY-MM-DD, 'today', 'yesterday', 'tomorrow' or a relative day such as -3 or +2. Up to 7 days back and up to 7 days ahead.

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

Last day to scrape (inclusive), same formats as 'Date (from)'. Leave empty for a single day.

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

Keep only these tours. Empty = every tour (ATP, WTA, Challenger incl. WTA 125, ITF, plus Davis Cup, Billie Jean King Cup, juniors, exhibitions and others).

## `matchType` (type: `string`):

Singles only, doubles only (incl. mixed doubles) or both. Also applies to player matches.

## `status` (type: `string`):

Keep only scheduled, live or finished matches (finished includes retirements, walkovers and awarded matches).

## `tournamentQuery` (type: `string`):

Optional case-insensitive filter on the tournament name or country, e.g. 'Paris' or 'Australian Open'.

## `fallbackToRecent` (type: `boolean`):

When the selected day and filters have no matches (e.g. tour off-season), return the most recent finished matches from the previous 7 days instead of an empty dataset; if the selected tours have none, other tours are used.

## `matchUrls` (type: `array`):

Flashscore match URLs (e.g. https://www.flashscore.com/match/tennis/hurkacz-hubert-zuHOBnY9/musetti-lorenzo-xtH2ODVI/?mid=25mNr3v3) or 8-character match ids (e.g. 25mNr3v3). Every match item in this dataset has its id and url.

## `includeStatistics` (type: `boolean`):

Aces, double faults, serve and return points won, break points, winners, unforced errors… per match and per set. Match details mode always includes them.

## `includePointByPoint` (type: `boolean`):

Every game with server, winner, breaks and the point sequence, plus tiebreak points. Match details mode always includes it.

## `includeH2H` (type: `boolean`):

Previous meetings of the two players/teams with date, tournament, surface, score and winner. Match details mode always includes it.

## `includeOdds` (type: `boolean`):

Match-winner odds (current and opening) for every bookmaker listed for the chosen country, plus the best and average price. Match details mode always includes them.

## `oddsCountry` (type: `string`):

Bookmakers are country-specific. United Kingdom lists the most bookmakers; US odds are those offered in New Jersey, Canada's those in Ontario.

## `allOddsMarkets` (type: `boolean`):

Besides match winner, also return set winner, total games over/under, game/set handicaps, correct score and odd/even markets per bookmaker (much larger items).

## `rankingTypes` (type: `array`):

Which rankings to download.

## `topN` (type: `integer`):

How many ranked players to return per ranking (the full ATP list has about 2,300 players).

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

Flashscore player URLs (e.g. https://www.flashscore.com/player/sinner-jannik/6HdC3z4H/) or player names (e.g. Iga Swiatek); a name is matched to the best tennis player hit.

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

Latest results and upcoming matches to return per player, newest first. 0 = profile only.

## `addPlayerRanks` (type: `boolean`):

Add each player's current ATP/WTA rank and ranking points (singles ranking for singles, doubles ranking for doubles).

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

Hard cap on dataset items (matches, rankings rows and players together). The run stops cleanly when reached.

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

Not needed for normal use. Switch on Apify Proxy only if requests start failing.

## `debug` (type: `boolean`):

Verbose logs for development.

## Actor input object example

```json
{
  "mode": "matches",
  "dateFrom": "today",
  "tours": [
    "atp",
    "wta"
  ],
  "matchType": "all",
  "status": "any",
  "fallbackToRecent": true,
  "includeStatistics": false,
  "includePointByPoint": false,
  "includeH2H": false,
  "includeOdds": false,
  "oddsCountry": "GB",
  "allOddsMarkets": false,
  "rankingTypes": [
    "atp",
    "wta"
  ],
  "topN": 100,
  "maxMatchesPerPlayer": 20,
  "addPlayerRanks": true,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debug": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All items produced by the run, one JSON object per 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 = {
    "dateFrom": "today",
    "tours": [
        "atp",
        "wta"
    ]
};

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

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

```

## MCP server setup

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