# Tennis Scraper - Live Scores, Odds, Draws & Player Stats (`hgservices/tennis-scraper`) Actor

Scrape tennis data: live scores with odds and match stats, ATP, WTA, Challenger and ITF tournaments by date, draws and results, point-by-point logs, and player rankings, Elo and career splits from SofaScore and Tennis Abstract. Export JSON, CSV or Excel.

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

## Pricing

from $1.50 / 1,000 saved results

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

Get **tennis data on demand**: **live scores with betting odds and match statistics**, the **ATP, WTA, Challenger and ITF calendar**, **tournament draws and results**, **point-by-point match logs**, and **player profiles with rankings, Elo ratings and career splits**. The data comes from [SofaScore](https://www.sofascore.com/) and [Tennis Abstract](https://www.tennisabstract.com/).

Pick a mode, click **Start**, and get clean JSON in a few seconds. Download it as JSON, CSV, Excel or HTML, or read it from the API.

No API key. No login. No coding needed.

### What does Tennis Scraper do?

Tennis Scraper has six modes. Each mode answers one question:

| Mode | What you get |
|------|--------------|
| **Live matches** (`liveMatches`) | Every match in progress: set and game score, tiebreaks, match statistics (aces, double faults, break points, first serve %) and live betting odds |
| **Tournaments on a date** (`tournaments`) | Every tournament with matches on a date: level, surface, country, number of matches, first and last start time, and the match IDs |
| **Tournament seasons** (`tournamentSeasons`) | One record per tournament with every edition, newest first, and the season IDs |
| **Tournament details** (`tournamentDetails`) | One edition of a tournament: prize money, host city, number of players, the title holder, past champions and every match with its result |
| **Point by point** (`pointByPoint`) | Every point of one match, set by set and game by game, with the server and the winner of each game, plus the match statistics |
| **Player details** (`playerDetails`) | A player's profile, ATP or WTA ranking, live ranking, UTR rating, recent matches, and from Tennis Abstract: Elo rating, peak rank, date of birth, height, plays and backhand, and up to 18 tables of career and last-52-week statistics |

The IDs in one mode's results are the input of the next mode. For example, a match ID from **Live matches** gets you the **Point by point** log of that match, and a player ID gets you the **Player details**.

It covers **Grand Slams, ATP and WTA tour events, Challengers, ITF events and the Davis Cup**, for singles, doubles and mixed doubles.

### Why use Tennis Scraper?

- **Sports betting and trading** — Compare live odds with the score and the match statistics, and see how the odds moved from the opening price.
- **Live score widgets and apps** — Feed scores, set results and match status into a website, a bot or a dashboard.
- **Match and player analytics** — Study momentum, breaks of serve and clutch points with point-by-point data, or compare players by Elo, surface splits and serve statistics.
- **Fantasy tennis and tipping** — Check form, recent results and rankings before you pick.
- **Sports media** — Build daily schedules, tournament results and "who is playing today" lists.
- **Research and data science** — Build a match database from tournament draws and results for models in Python, R or Excel.

### How to scrape tennis data

1. Click **Try for free** and sign in to Apify. A free account is enough.
2. Select a **Mode**. **Live matches** is selected for you.
3. Fill in the field that the mode needs, such as a date, a tournament ID, a match ID or a player ID. Each field says which mode uses it.
4. Click **Start**. Most runs finish in a few seconds.
5. Open the **Output** tab. Each mode has its own table view. Download the data as JSON, CSV, Excel or HTML.

**Tip:** You do not need to know any IDs to start. Run **Live matches** or **Tournaments on a date** first, and take the IDs from the results.

### Input

Only the fields of the mode you select are used. A run with no mode returns live matches.

| Field | Mode | Description |
|-------|------|-------------|
| `mode` | all | `liveMatches` (default), `tournaments`, `tournamentSeasons`, `tournamentDetails`, `pointByPoint` or `playerDetails` |
| `matchType` | `liveMatches` | Optional. Any of `singles`, `doubles`, `mixedDoubles`. Empty means all |
| `gender` | `liveMatches` | Optional. Any of `male`, `female`, `mixed`. Empty means all |
| `tournamentLevel` | `liveMatches` | Optional. Any of `grandSlam`, `atp1000`, `atp500`, `atp250`, `wta1000`, `wta500`, `wta250`, `wta125`, `challenger`, `itf`, `davisCup`, `others`. Empty means all |
| `maxMatches` | `liveMatches` | Optional. The most matches to return. `0` or empty means all |
| `date` | `tournaments` | Required. A date in `YYYY-MM-DD` format, in UTC. Past and future dates work |
| `tournamentId` | `tournamentSeasons`, `tournamentDetails` | Required. From `tournament.id` in the results of the other modes |
| `seasonId` | `tournamentDetails` | Optional. From `tournamentSeasons`. Empty means the newest edition |
| `matchId` | `pointByPoint` | Required. From `match.id` in **Live matches**, or `matchIds` and `matches` in the tournament modes |
| `playerId` | `playerDetails` | Required. From `homePlayer.id` or `awayPlayer.id` of any match |

#### Input examples

**All live matches**

```json
{ "mode": "liveMatches" }
```

**Live women's singles at WTA 1000 events and Grand Slams, at most 10 matches**

```json
{
  "mode": "liveMatches",
  "matchType": ["singles"],
  "gender": ["female"],
  "tournamentLevel": ["wta1000", "grandSlam"],
  "maxMatches": 10
}
```

**Every tournament with matches on 6 July 2026**

```json
{ "mode": "tournaments", "date": "2026-07-06" }
```

**The newest edition of a tournament, with all its matches**

```json
{ "mode": "tournamentDetails", "tournamentId": 2361 }
```

**Every point of a match**

```json
{ "mode": "pointByPoint", "matchId": 17189897 }
```

**A player profile with Elo and career statistics**

```json
{ "mode": "playerDetails", "playerId": 14882 }
```

### Output

Every record has the same six summary fields — `mode`, `title`, `subtitle`, `status`, `scrapedAt` and `sourceUrl` — plus the data of its mode. The **Output** tab has an **Overview** table that covers all modes, and one table for each mode. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

A **Live matches** record, shortened:

```json
{
  "mode": "liveMatches",
  "title": "Alexander Zverev vs Novak Djokovic",
  "subtitle": "Beijing",
  "status": "3rd set",
  "scrapedAt": "2026-10-04T13:37:20+00:00",
  "sourceUrl": "https://www.sofascore.com/tennis/match/alexander-zverev-novak-djokovic/HXfsnTx#id:17189897",
  "match": {
    "id": 17189897,
    "startTime": "2026-10-04T11:00:00+00:00",
    "status": "inprogress",
    "matchType": "singles",
    "gender": "male",
    "tournamentLevel": "atp500",
    "groundType": "Hardcourt outdoor",
    "round": "Quarterfinals",
    "tournament": { "id": 2436, "name": "Beijing", "category": "ATP", "tennisPoints": 500 },
    "homePlayer": { "id": 57163, "name": "Alexander Zverev", "country": "Germany", "ranking": 2, "seed": "1" },
    "awayPlayer": { "id": 14882, "name": "Novak Djokovic", "country": "Serbia", "ranking": 12, "seed": "6" },
    "score": {
      "summary": "6-4 4-6 4-5",
      "homeSetsWon": 1,
      "awaySetsWon": 1,
      "sets": [
        { "set": 1, "home": 6, "away": 4 },
        { "set": 2, "home": 4, "away": 6 },
        { "set": 3, "home": 4, "away": 5 }
      ],
      "currentGame": { "home": "30", "away": "15" },
      "firstToServe": "home"
    }
  },
  "statistics": [
    {
      "period": "ALL",
      "groups": [
        {
          "groupName": "Service",
          "items": [
            { "key": "aces", "name": "Aces", "home": "18", "away": "4", "homeValue": 18, "awayValue": 4 },
            { "key": "firstServeAccuracy", "name": "First serve", "home": "67/81 (83%)", "away": "65/90 (72%)", "homeValue": 67, "awayValue": 65, "homeTotal": 81, "awayTotal": 90 }
          ]
        }
      ]
    }
  ],
  "odds": [
    {
      "marketName": "Full time",
      "isLive": true,
      "line": null,
      "choices": [
        { "name": "1", "fractionalValue": "11/10", "decimalValue": 2.1, "initialDecimalValue": 1.364, "change": 1 },
        { "name": "2", "fractionalValue": "8/11", "decimalValue": 1.727, "initialDecimalValue": 3.2, "change": -1 }
      ]
    },
    {
      "marketName": "Total games won",
      "isLive": true,
      "line": "22.5",
      "choices": [
        { "name": "Over", "fractionalValue": "5/6", "decimalValue": 1.833 },
        { "name": "Under", "fractionalValue": "5/6", "decimalValue": 1.833 }
      ]
    }
  ]
}
```

A **Player details** record, shortened:

```json
{
  "mode": "playerDetails",
  "title": "Novak Djokovic",
  "subtitle": "Serbia",
  "status": "Elo 2047",
  "player": { "id": 14882, "name": "Novak Djokovic", "country": "Serbia", "countryCode": "SRB", "gender": "M" },
  "rankings": [
    { "name": "ATP", "ranking": 12, "points": 2980 },
    { "name": "ATP live", "ranking": 11, "points": 3080 },
    { "name": "UTR", "ranking": 12, "points": 16.06 }
  ],
  "tennisAbstract": {
    "fullName": "Novak Djokovic",
    "dateOfBirth": "1987-05-22",
    "heightCm": 188,
    "handedness": "R",
    "backhand": "2",
    "currentRank": 11,
    "peakRank": 1,
    "eloRating": 2047,
    "eloRank": 4
  },
  "statistics": {
    "careerSplits": [{ "Split": "Hard", "M": "...", "Win%": "..." }],
    "last52WeekSplits": ["..."],
    "keyPoints": ["..."]
  },
  "recentMatches": ["..."]
}
```

#### Output fields

| Field | Mode | Description |
|-------|------|-------------|
| `mode`, `title`, `subtitle`, `status` | all | The mode and a short summary: the match, tournament, season or player, its tournament or country, and its status |
| `scrapedAt` | all | When the data was collected, in UTC |
| `sourceUrl` | all | The public page of the match, tournament or player |
| `match` | `liveMatches`, `pointByPoint` | Match ID, start time, status, type, gender, level, surface, round, tournament, both players with ranking and seed, and the score |
| `match.score.summary` | `liveMatches`, `pointByPoint` | The score as text, home player first, such as `6-4 3-6 7-6(5)` |
| `statistics` | `liveMatches`, `pointByPoint` | Match statistics for the whole match and for each set |
| `odds` | `liveMatches` | Betting markets. Choice `1` is the home player and `2` is the away player. Each price is in fractional and decimal form, with the opening price and the direction of change. `line` is the line of a totals market |
| `tournament`, `tournamentLevel` | `tournaments`, `tournamentSeasons`, `tournamentDetails` | Tournament ID, name, category, surface, ranking points and country, and its level |
| `eventCount`, `matchIds`, `firstMatchStart`, `lastMatchStart` | `tournaments` | The matches of the tournament on the date |
| `matchTypeCounts`, `genderCounts`, `statusCounts` | `tournaments` | Matches by type, gender and status |
| `seasons`, `seasonCount`, `currentSeason` | `tournamentSeasons` | Every season of the tournament, newest first, with ID, name and year |
| `season` | `tournamentDetails` | Season ID, name and year, host city, number of players and prize money |
| `champions` | `tournamentDetails` | Past champions by year |
| `matches`, `matchCount` | `tournamentDetails` | Every match of the edition with its result, oldest first |
| `sets`, `setCount`, `gameCount`, `pointCount` | `pointByPoint` | Every set, game and point, with the server and the winner of each game |
| `player` | `playerDetails` | Player ID, name, gender and country |
| `rankings` | `playerDetails` | ATP or WTA ranking, live ranking and UTR rating, with points |
| `tennisAbstract` | `playerDetails` | Elo rating and Elo rank, current and peak rank, date of birth, height, plays, backhand, and ATP, ITF and Wikipedia IDs. `null` when Tennis Abstract has no profile for the player |
| `statistics` | `playerDetails` | Tennis Abstract tables: recent results, season records, recent titles and finals, year-end rankings, career and last-52-week splits, serve speed, key points and games, and Match Charting Project serve, return, rally and tactics data |
| `recentMatches` | `playerDetails` | The player's most recent matches with results |

### Use Tennis Scraper with the Apify API

You can run the scraper and read the results from any programming language with the [Apify API](https://docs.apify.com/api/v2). Get your API token in Apify Console under **Settings → API & Integrations**, and replace `<YOUR_API_TOKEN>` below.

**HTTP (cURL)** — run the scraper and get the results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/hgservices~tennis-scraper/run-sync-get-dataset-items?format=json" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{ "mode": "liveMatches", "tournamentLevel": ["grandSlam", "atp1000", "wta1000"] }'
```

Change `format=json` to `format=csv` or `format=xlsx` to get a spreadsheet.

**JavaScript / Node.js** (`npm install apify-client`)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('hgservices/tennis-scraper').call({
    mode: 'liveMatches',
    matchType: ['singles'],
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
    console.log(item.title, item.match.score.summary, item.status);
}
```

**Python** (`pip install apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("hgservices/tennis-scraper").call(run_input={
    "mode": "tournaments",
    "date": "2026-07-06",
})
if run is None:
    raise RuntimeError("The run was not found.")

for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item["title"], item["tournamentLevel"], item["eventCount"], "matches")
```

### Use tennis data in Claude, ChatGPT and other AI assistants

Tennis Scraper works as a tool for AI assistants through the [Apify MCP server](https://mcp.apify.com/). Your assistant can find the scraper, read its input options, run it, and use the results in its answer.

**Claude (claude.ai or Claude Desktop)** — Go to **Settings → Connectors**, add a custom connector, and enter `https://mcp.apify.com`. Sign in to Apify when Claude asks.

**Claude Code**

```bash
claude mcp add --transport http apify https://mcp.apify.com
```

**ChatGPT** — Turn on **Developer mode** in **Settings → Apps & Connectors → Advanced settings**. Then create a connector with the MCP server URL `https://mcp.apify.com`.

**Cursor, VS Code and other MCP clients** — Add `https://mcp.apify.com` as a remote MCP server. To give the assistant only this scraper, use `https://mcp.apify.com?tools=hgservices/tennis-scraper`.

Then ask in plain language:

> Use Tennis Scraper to show me the live scores of all Grand Slam and ATP 1000 matches right now, with the odds.

> Which tournaments have matches tomorrow? List the WTA events and their surfaces.

> Get the point-by-point log of match 17189897 and tell me how many break points each player saved.

> Compare the Elo ratings and hard-court records of Novak Djokovic and Alexander Zverev.

The assistant can chain the modes for you: it finds the IDs with one mode and uses them in the next.

### Integrations and scheduling

Connect the scraper to the tools you already use with [Apify integrations](https://apify.com/integrations): **Google Sheets, Slack, Discord, Zapier, Make, n8n, Airbyte, Keboola, GitHub** and more. You can also use **webhooks** to call your own endpoint when a run finishes.

Use **Schedules** in Apify Console to run the scraper automatically:

| Use case | Cron | Input |
|----------|------|-------|
| Live score feed, every 5 minutes | `*/5 * * * *` | `mode: liveMatches` |
| Tournament results, every night during an event | `0 23 * * *` | `mode: tournamentDetails`, `tournamentId` |

### Run summary

Every run saves a `RUN_SUMMARY` record in the key-value store, with the mode, the input, the number of results and a message. When a run returns no results, the message says why — for example, no live match matched the filters, or the ID is not a tennis match.

### Tips

- **Filter first, then cap.** `matchType`, `gender` and `tournamentLevel` are applied first. `maxMatches` then keeps the first matches that are left.
- **Use a schedule for live data.** Scores change every few seconds. Run **Live matches** at the interval you need, instead of one long run.
- **Leave `seasonId` empty** in **Tournament details** to always get the newest edition. This is useful for a schedule that runs during a tournament.
- **Men's and women's events have their own IDs.** For example, Wimbledon men's singles and Wimbledon women's singles are two tournaments. Run **Tournaments on a date** to find both.
- **Dates are in UTC.** **Tournaments on a date** returns the matches that start on that day in UTC.
- **Keep the default memory.** 256 MB is enough for every mode, including Grand Slam draws. More memory does not make a run faster.

### FAQ

**Do I need a SofaScore or Tennis Abstract account, or an API key?**
No. You need only an Apify account.

**How fresh are live scores?**
They are the scores at the moment of the run. Run **Live matches** again, or on a schedule, to update them.

**Why did my run return no results?**
There may be no live match that matches your filters, no tournament on the date, or no record for the ID. The status message and the `RUN_SUMMARY` record say which. An ID from another sport, such as a football match, also returns no results.

**Why is `tennisAbstract` empty for some players?**
Tennis Abstract covers ATP and WTA tour players. For many ITF and junior players, and for doubles pairs, it has no profile. You still get the profile, rankings and recent matches.

**Is point-by-point data available for every match?**
For most tour-level matches and many Challenger and ITF matches. When a match has no point-by-point data, the run says so and returns no result.

**What does the tournament level `others` mean?**
SofaScore does not give the event an ATP, WTA, Challenger, ITF or Davis Cup level. Exhibitions and team events are examples. Add `others` to the filter if you must not miss any match.

**Is it legal to scrape tennis data?**
This scraper collects only public sports data and never signs in. You are responsible for how you use the data, and for the terms of use of the data sources.

### Support

Did you find a bug, or do you need a field or a mode that is not here? Open an issue on the **Issues** tab. Custom solutions are available on request.

*This scraper uses public data from SofaScore and Tennis Abstract. It is not affiliated with, endorsed by, or sponsored by SofaScore or Tennis Abstract.*

# Actor input Schema

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

Select the data to collect. Each field below says which mode uses it. Fields of other modes are ignored.

## `maxMatches` (type: `integer`):

Live matches only. The most matches to return, after the filters. Leave empty or 0 to return all live matches.

## `matchType` (type: `array`):

Live matches only. Keep only these match types. Leave empty for all.

## `gender` (type: `array`):

Live matches only. Keep only men's, women's or mixed events. Leave empty for all. Matches without a gender on SofaScore do not match a selection.

## `tournamentLevel` (type: `array`):

Live matches only. Keep only these tournament levels. Leave empty for all. "Others" covers events without an ATP, WTA, Challenger, ITF or Davis Cup level, such as exhibitions.

## `date` (type: `string`):

Tournaments on a date only. Required. The date in YYYY-MM-DD format, in UTC. Past and future dates work.

## `matchId` (type: `integer`):

Point by point only. Required. The match ID, from match.id in Live matches, or from matchIds or matches in the tournament modes.

## `tournamentId` (type: `integer`):

Tournament seasons and Tournament details only. Required. The tournament ID, from tournament.id in Tournaments on a date or Live matches.

## `seasonId` (type: `integer`):

Tournament details only. Optional. The season ID, from Tournament seasons. Leave empty for the newest edition.

## `playerId` (type: `integer`):

Player details only. Required. The player ID, from homePlayer.id or awayPlayer.id of any match.

## Actor input object example

```json
{
  "mode": "liveMatches",
  "maxMatches": 0
}
```

# Actor output Schema

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

Dataset records. Every record has mode, title, subtitle, status, scrapedAt and sourceUrl, plus the payload of its mode. Views: overview, liveMatches, tournaments, tournamentSeasons, tournamentDetails, pointByPoint, playerDetails.

## `runSummary` (type: `string`):

JSON record with the mode, the input, the result count and a message that explains an empty result.

# 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": "liveMatches"
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/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": "liveMatches" }

# Run the Actor and wait for it to finish
run = client.actor("hgservices/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": "liveMatches"
}' |
apify call hgservices/tennis-scraper --silent --output-dataset

```

## MCP server setup

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