# Tennis Scraper: Live Scores, Results, Stats & Odds (`volochiy/tennis-scraper`) Actor

Tennis data from SofaScore at every level (ATP, WTA, Challenger, ITF): live scores, schedules and results by date, point-by-point, statistics, betting odds and rankings.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-usage

## 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, Results, Stats & Odds

Tennis data from SofaScore at every level: ATP, WTA, WTA 125, Challenger, ITF and UTR. Get live scores down to the current game, schedules and results for any date, point-by-point, match statistics, betting odds, and the ATP and WTA rankings, as clean JSON.

### What can this tennis scraper do?

| Mode | What you get |
|---|---|
| **Live matches** | Every match in play right now: set, tiebreak and game scores, who serves first, round, surface, player rankings |
| **Matches by date** | The schedule or the results for any date (UTC), past or upcoming |
| **Match details** | Point-by-point, match statistics (aces, double faults, serve and return, break points and more) and betting odds for the matches you choose |
| **Rankings** | ATP or WTA singles rankings (top 500) with points, previous rank and best rank |

Filter live and dated matches by level (ATP, WTA, WTA 125, Challenger, ITF Men, ITF Women, UTR) and by singles or doubles.

### Why use this actor?

- **Every level.** Most tennis matches are played at Challenger and ITF events, which many data sources skip.
- **Built to keep working.** SofaScore blocks many cloud IPs. The actor rotates IPs until one gets through, and falls back to Apify's stronger Unblocker proxy when your Apify plan includes it. If SofaScore still can't be reached from your account, it returns a recent copy from its hourly refresh, clearly marked (see below).
- **Free.** The actor costs nothing; you pay only Apify's platform usage for your runs.
- **Clean, consistent data.** Stable field names, decimal odds, ISO timestamps in UTC, and a SofaScore link for every match.
- **Fast.** A typical run takes a few seconds.

### How to use it

1. Pick a **Mode**.
2. Set the filters you need: levels, singles or doubles, a date, or match IDs.
3. Click **Start**. Download the results as JSON, CSV or Excel, or read them through the API.

To follow live scores, run the actor on a schedule or call it from your code every minute or two.

#### Input examples

Live Challenger and ITF singles:

```json
{ "mode": "liveMatches", "levels": ["challenger", "itfMen", "itfWomen"], "matchType": "singles" }
```

ATP results for a past date:

```json
{ "mode": "matchesByDate", "date": "2026-11-09", "levels": ["atp"] }
```

Point-by-point, statistics and odds for two matches:

```json
{ "mode": "matchDetails", "matchIds": ["17528375", "17511575"] }
```

The WTA top 100:

```json
{ "mode": "rankings", "ranking": "wta", "maxResults": 100 }
```

Match IDs come from the `matchId` field of the live and by-date results.

### Output

A live match:

```json
{
  "matchId": 17528375,
  "url": "https://www.sofascore.com/tennis/match/shintaro-mochizuki-calvin-hemery/wAHsVAuc#id:17528375",
  "tournament": { "id": 3524, "name": "Orleans, France", "category": "Challenger", "level": "challenger", "groundType": "Hardcourt indoor" },
  "round": "Round of 32",
  "status": "3rd set",
  "statusType": "inprogress",
  "matchType": "singles",
  "home": { "id": 298795, "name": "Shintaro Mochizuki", "shortName": "S. Mochizuki", "country": "JP", "ranking": 125 },
  "away": { "id": 81271, "name": "Calvin Hemery", "shortName": "C. Hemery", "country": "FR", "ranking": 274 },
  "score": {
    "setsHome": 1, "setsAway": 1,
    "sets": [
      { "home": 6, "away": 4 },
      { "home": 6, "away": 7, "tiebreakHome": 5, "tiebreakAway": 7 },
      { "home": 0, "away": 2 }
    ],
    "gameHome": "15", "gameAway": "30"
  },
  "winner": null,
  "firstToServe": "home",
  "startTime": "2026-11-10T17:30:00+00:00",
  "lastChange": "2026-11-10T19:33:47+00:00",
  "source": "sofascore",
  "scrapedAt": "2026-11-10T19:34:01+00:00",
  "fromCache": false
}
```

Match details add three parts to each match:

```json
{
  "statistics": { "ALL": { "aces": { "name": "Aces", "home": "14", "away": "6", "homeValue": 14, "awayValue": 6 } } },
  "odds": [
    { "name": "Full time", "group": "Home/Away", "period": "Match", "isLive": false,
      "choices": [ { "name": "1", "decimal": 1.5, "fractional": "1/2", "initialDecimal": 1.4 },
                   { "name": "2", "decimal": 2.63, "fractional": "163/100", "initialDecimal": 3 } ] }
  ],
  "pointByPoint": [
    { "set": 1, "games": [ { "game": 1, "homeScore": 0, "awayScore": 1, "server": "away", "winner": "away",
      "points": [ { "home": "0", "away": "15" }, { "home": "0", "away": "30" }, { "home": "0", "away": "40" } ] } ] }
  ]
}
```

Statistics come per period (`ALL`, `1ST`, `2ND`, ...). The keys include `aces`, `doubleFaults`, `firstServeAccuracy`, `secondServeAccuracy`, `breakPointsSaved`, `pointsTotal`, `gamesWon` and more.

A ranking row:

```json
{ "ranking": "atp", "rank": 1, "previousRank": 2, "bestRank": 1, "points": 9550, "previousPoints": 9750,
  "tournamentsPlayed": 25, "player": { "id": 57163, "name": "Alexander Zverev", "country": "DE" },
  "updatedAt": "2026-11-03T13:01:57+00:00", "scrapedAt": "2026-11-10T19:40:12+00:00", "fromCache": false }
```

### If SofaScore can't be reached

SofaScore blocks many cloud IPs, and Apify's free plan has no Unblocker. When the actor can't get through from your account, or SofaScore doesn't answer within 2 minutes, the run doesn't fail. It returns the copy saved by the actor's own refresh, which runs on the developer's account, if that copy is recent enough:

| Data | Refreshed | Returned if at most |
|---|---|---|
| Live matches | Every hour | 2 hours old |
| Matches by date: today (UTC) | Every hour | 2 hours old |
| Matches by date: yesterday and tomorrow (UTC) | Every 6 hours | 7 hours old |
| Rankings, ATP and WTA | Every 6 hours | 7 hours old |
| Matches by date: any other day | Not cached | - |
| Match details | Never cached | - |

Why these limits:

- **Live scores and today's results** change all day, so they are refreshed every hour and held to the tightest limit.
- **Yesterday's results, tomorrow's schedule and the rankings** change little within a day, so refreshing them every 6 hours keeps them accurate at a fraction of the cost.
- **Match details** are requested by match ID, so they can't be prepared in advance.

How to tell:

- Every row has `fromCache`: `false` for data fetched in your run, `true` for the cached copy.
- `scrapedAt` always shows when the data was fetched from SofaScore.
- The run's status message says when the cache was used and how old the copy is.

Filters and the result cap apply to cached data as usual. To get a failed run instead, turn off **Use the cache when SofaScore can't be reached**.

### Cost

The actor is free. Your runs use Apify platform usage (compute and proxy), which Apify bills to your account as for any actor. Live, by-date and ranking runs use very little; match details for many matches use more.

### Use with AI agents

AI assistants and agents can use the actor as a tool through the [Apify MCP server](https://mcp.apify.com). Connect your assistant to this address, which loads the actor by name:

```text
https://mcp.apify.com/?tools=fetch-actor-details,volochiy/tennis-scraper
```

Then ask, for example: "Which Challenger matches are live right now, and what are the scores?"

### FAQ

**How fresh is the data?** Live scores reflect SofaScore at the moment of the run. Rows with `fromCache: true` come from the actor's refresh. They are at most 2 hours old for live and today's matches, and at most 7 hours old for the rest; `scrapedAt` gives the exact time.

**Which dates can I query?** Past and upcoming dates. Results for past dates and schedules for upcoming ones both work.

**What is the proxy setting for?** Keep the default. The actor needs a proxy to reach SofaScore and manages it for you.

**What if a run fails?** It stops with a clear message, unless a recent cached copy can be returned instead. Please open an issue; I usually answer within a day.

**Is it legal to scrape SofaScore?** The actor collects publicly available sports results and statistics, and no personal contact data. Make sure your use complies with the laws and terms that apply to you. This actor is not affiliated with SofaScore.

### Feedback

Feature requests are welcome in the Issues tab.

# Actor input Schema

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

What to collect.

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

Matches by date: the day in YYYY-MM-DD (UTC). Empty means today.

## `matchIds` (type: `array`):

Match details: SofaScore match IDs, one per line. Get them from the matchId field of live matches or matches by date.

## `include` (type: `array`):

Match details: which parts to fetch for each match.

## `ranking` (type: `string`):

Rankings: which singles ranking.

## `levels` (type: `array`):

Live matches and matches by date: keep only these levels. Empty means all levels.

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

Live matches and matches by date.

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

Cap on returned rows after filtering. 0 returns all.

## `cacheFallback` (type: `boolean`):

If SofaScore can't be reached from your account, or doesn't answer within 2 minutes, return the copy saved by the actor's refresh. Live and today's matches are returned if at most 2 hours old; yesterday's and tomorrow's matches and the rankings if at most 7 hours old. Match details are never cached. Cached rows have fromCache: true and keep their original scrapedAt. Turn this off to always wait for SofaScore and get a failed run if it can't be reached.

## `refreshCache` (type: `boolean`):

Internal: the actor owner's hourly run that refreshes the shared cache.

## `debugUrls` (type: `array`):

Internal diagnostics: fetch up to 5 URLs through the proxy, log the answers, and stop.

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

Keep the default. The actor rotates Apify datacenter IPs and, if your Apify plan includes it, falls back to Apify's Unblocker when SofaScore blocks them.

## Actor input object example

```json
{
  "mode": "liveMatches",
  "include": [
    "pointByPoint",
    "statistics",
    "odds"
  ],
  "ranking": "atp",
  "matchType": "all",
  "maxResults": 0,
  "cacheFallback": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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