# Tennis Data Scraper (SofaScore + Tennis Abstract) (`neuro-scraper/tennis-data-scraper`) Actor

Tennis Data Scraper (SofaScore + Tennis Abstract) SD - Tennis Data Scraper (SofaScore + Tennis Abstract) is a sports data tool that extracts live scores, schedules, point-by-point, match stats, odds, ATP/WTA rankings, Elo ratings and full player match histories.

- **URL**: https://apify.com/neuro-scraper/tennis-data-scraper.md
- **Developed by:** [Neuro Scraper](https://apify.com/neuro-scraper) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

./README.md

# Actor input Schema

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

What to get. schedule = every match on the chosen days (upcoming, live and played); liveMatches = matches on court now; playerMatches = a player's matches, newest first (SofaScore); playerMatchHistory = an ATP player's whole career with serve and return stats per match (Tennis Abstract; its women's match lists sit in files its robots.txt disallows, so use playerMatches for WTA players); playerDetails = profile, ranking, Elo, seasons, titles, head-to-heads (SofaScore + Tennis Abstract); pointByPoint = one row per match with every point, statistics and sets; tournaments = tournaments on a day; tournamentSeasons / tournamentMatches / tournamentDetails = a tournament's seasons, matches or champions and draw; rankings = official ATP / WTA ranking; eloRatings = Tennis Abstract Elo table; search = find player and tournament ids by name.

## `dates` (type: `array`):

Days as YYYY-MM-DD in UTC, e.g. 2026-10-08. Empty = today (UTC). Days back / Days ahead widen every day listed here.

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

Also include this many days before each day (0-14). 1 = yesterday's results as well.

## `days` (type: `integer`):

Also include this many days after each day (0-14). 6 = a whole tournament week.

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

Filter match rows by state. Played includes retirements and walkovers; Not played = cancelled, postponed, interrupted.

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

Keep only these formats. Empty = all.

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

Keep only men's, women's or mixed matches. Empty = all.

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

Keep only these levels (read from each tournament's tour and ranking points). Empty = all.

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

Keep only matches whose tournament or tour name contains one of these (not case-sensitive), e.g. Shanghai, Wimbledon, Challenger.

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

Keep only matches where a player's name contains one of these (not case-sensitive), e.g. Sinner. A surname is enough.

## `playerIds` (type: `array`):

SofaScore player ids or links, e.g. 206570 or https://www.sofascore.com/tennis/player/sinner-jannik/206570. Used by playerMatches, playerDetails and playerMatchHistory. Find ids with the search mode.

## `playerNames` (type: `array`):

Names (Jannik Sinner), Tennis Abstract slugs (JannikSinner) or Tennis Abstract player links. Used by playerMatchHistory, playerDetails and playerMatches (names are looked up on SofaScore).

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

SofaScore match ids or links with #id:, e.g. 16385361 or https://www.sofascore.com/tennis/match/jannik-sinner-alexander-zverev/xyz#id:16385361. The matchId column of every match mode holds them.

## `tournamentIds` (type: `array`):

SofaScore unique-tournament ids or links, e.g. 2361 (Wimbledon men) or https://www.sofascore.com/tournament/tennis/atp/wimbledon/2361. Used by tournamentSeasons, tournamentMatches and tournamentDetails.

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

Optional SofaScore season id (from tournamentSeasons). Empty = the newest season of each tournament.

## `query` (type: `string`):

Player or tournament name, e.g. Alcaraz or Roland Garros. Returns the ids to paste into the fields above.

## `rankingTour` (type: `string`):

Which list to read.

## `rankingTop` (type: `integer`):

How many players from the top of each list (SofaScore publishes 500, Tennis Abstract Elo about 550).

## `newestFirst` (type: `boolean`):

Start the Tennis Abstract career list from the latest match (on) or from the first match of the career (off).

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

Aces, double faults, first and second serve, break points, points and games won - whole match and per set. One extra request per started match.

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

Every game of every set with server, game winner and point sequence. One extra request per started match. Always on in pointByPoint mode.

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

Match-winner odds (fractional and decimal, opening and current) from the bookmaker SofaScore shows for the odds country. One extra request per match.

## `includeHeadToHead` (type: `boolean`):

SofaScore's head-to-head record of the two players (wins each). It covers recent meetings only: Sinner v Zverev showed 10-0 where the full career is 11-4 (measured 2026-10-09); full-career head-to-heads are in playerDetails. One extra request per match.

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

Two-letter country code whose bookmaker SofaScore uses for odds, e.g. US, GB, DE.

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

Cap on all rows of the run in every mode (matches, players, rankings ...). The main control over what a run costs.

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

playerMatches: matches per player, followed page by page (30 per SofaScore page). playerMatchHistory: career rows per player. playerDetails: length of recentResults.

## `maxMatchesPerTournament` (type: `integer`):

tournamentMatches and tournamentDetails: matches per tournament season, followed page by page (played matches first, then upcoming).

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

Residential proxy is the default; SofaScore's edge rejects non-browser clients and has blocked datacenter IPs in public reports.

## Actor input object example

```json
{
  "mode": "schedule",
  "dates": [],
  "daysBack": 0,
  "days": 0,
  "status": "any",
  "matchType": [],
  "gender": [],
  "tournamentLevel": [],
  "tournaments": [],
  "players": [],
  "playerIds": [
    "206570"
  ],
  "playerNames": [],
  "matchIds": [],
  "tournamentIds": [],
  "query": "",
  "rankingTour": "both",
  "rankingTop": 100,
  "newestFirst": true,
  "includeStatistics": false,
  "includePointByPoint": false,
  "includeOdds": false,
  "includeHeadToHead": false,
  "oddsCountry": "US",
  "maxMatches": 50,
  "maxMatchesPerPlayer": 30,
  "maxMatchesPerTournament": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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": "schedule",
    "dates": [],
    "playerIds": [
        "206570"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("neuro-scraper/tennis-data-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": "schedule",
    "dates": [],
    "playerIds": ["206570"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("neuro-scraper/tennis-data-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": "schedule",
  "dates": [],
  "playerIds": [
    "206570"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call neuro-scraper/tennis-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neuro-scraper/tennis-data-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/iQCoQIeZXPxYnBYWf/builds/tTl6S1a5uhSMgEU1x/openapi.json
