# SofaScore Tennis Rankings Scraper (ATP & WTA, Official & Live) (`confidential_gnat/tennis-rankings-scraper-sofascore`) Actor

Scrape ATP and WTA tennis rankings (top 500): official and live rankings with points, rank and points movement since the last update, best ranking, tournaments played and, for live rankings, the points the next win brings. Export JSON, CSV or Excel.

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

## Pricing

from $0.30 / 1,000 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

## SofaScore Tennis Rankings Scraper (ATP & WTA, Official & Live)

![SofaScore Tennis Rankings Scraper cover: official and live ATP and WTA rankings with points and rank movement since the last update](https://i.postimg.cc/tgvgpckX/Gemini-Generated-Image-hoppq4hoppq4hopp.jpg)

**Scrape the ATP and WTA tennis rankings** (the top 500 of each): the **official rankings** and the **live rankings** that count the points of matches in play, with every player's rank, points, **movement since the last update**, best ranking and tournaments played. Export as **JSON, CSV or Excel** or call it as an **API**: pick the ranking lists and press Start.

**Target website:** [sofascore.com](https://www.sofascore.com/tennis/rankings)

### ✨ Features of this tennis rankings scraper

- **Four ranking lists** — ATP official, WTA official, ATP live and WTA live, up to 500 players each.
- **Movement** — the previous rank and points, and the change in rank and in points (positive means the player moved up).
- **Player details** — name, short name, country with its code, gender and a player page link.
- **Career context** — best ranking and tournaments played on the official lists.
- **Live ranking points** — on the live lists, the points the player's next win would bring and the most the player can reach.
- **Proxy support** — residential proxies by default, with failed connections retried on a new one.
- **No browser required** — plain requests keep runs fast and cheap.

### 🚀 How to scrape tennis rankings in 5 steps

1. [Sign up](https://apify.com/sign-up) for a free Apify account — includes **$5 monthly credit**.
2. Open the actor page and click **Try for free**.
3. Fill in the **Input** fields (choose the ranking lists and how many players).
4. Click **Start** and wait for the run to complete.
5. Download results from the **Output** tab in JSON, CSV, or Excel format.

You can also run this actor via the [Apify API](https://docs.apify.com/api/v2) or integrate it directly into your workflows using [Zapier](https://zapier.com/apps/apify), [Make](https://www.make.com/), or [n8n](https://n8n.io/).

### 💰 Pricing for the tennis rankings scraper

This actor uses **pay-per-result** billing based on the compute units a run consumes.

- New Apify accounts include **$5 of free monthly credit**.
- The actor uses plain HTTP requests instead of a browser, so it costs significantly less to run than browser-based scrapers.
- A run is one request per ranking list, so it finishes in seconds.

### 🔧 Tennis rankings scraper input configuration

There are no start URLs: the ranking lists you choose decide what is read.

![SofaScore Tennis Rankings Scraper input form in Apify Console with the 2 fields numbered 1 and 2: rankings and max players per ranking](https://i.postimg.cc/43xdCGzS/Gemini-Generated-Image-whvupkwhvupkwhvu.jpg)

1. **Rankings** - which lists to scrape: official ATP and WTA, or the live rankings that count matches in play (here ATP and WTA official)
2. **Max players per ranking** - how many players to save for each list, from rank 1 down (each list has up to 500)

The proxy configuration comes last in the form.

| Field | Type | Required | Default | Description |
| ----- | ---- | -------- | ------- | ----------- |
| Rankings (`rankings`) | array | — | ATP and WTA | `atp`, `wta`, `atp_live` or `wta_live`. |
| Max players per ranking (`maxItems`) | integer | — | 5 | Maximum players saved for each list, from rank 1 down (up to 500). |
| Proxy configuration (`proxyConfiguration`) | object | — | Apify residential | The site refuses many datacenter connections. |

### 📦 Tennis rankings scraper output data

The output is a flat list with one record per player and ranking: `rankingType`, `tour`, `rank`, `previousRank`, `rankChange`, `bestRank`, `points`, `previousPoints`, `pointsChange`, `nextWinPoints`, `maxPoints`, `tournamentsPlayed`, `playerId`, `playerName`, `playerShortName`, `playerSlug`, `gender`, `country`, `countryCode` and `url`, then `source` and `scrapedAt`. Every record has every field; what a list does not carry is `null`.

The dataset has 1 view, **Rankings**, a compact table with the ranking, rank, player, country, points, the changes, best rank, tournaments played and the player page link.

- `rankChange` and `pointsChange` are positive when the player improved: moved up in rank, or gained points.
- `nextWinPoints` and `maxPoints` are filled on the live lists only; `bestRank`, `tournamentsPlayed` and `previousPoints` on the lists that carry them.

**Output at a glance:**

| Ranking | Rank | Player | Country | Points | Rank change | Best rank | Tournaments |
| ------- | ---- | ------ | ------- | ------ | ----------- | --------- | ----------- |
| atp | 1 | [Jannik Sinner](https://www.sofascore.com/tennis/player/sinner-jannik/206570) | Italy | 10450 | 0 | 1 | 19 |
| atp | 2 | [Alexander Zverev](https://www.sofascore.com/tennis/player/zverev-alexander/57163) | Germany | 9750 | 0 | 2 | 25 |
| atp | 3 | [Carlos Alcaraz](https://www.sofascore.com/tennis/player/alcaraz-carlos/275923) | Spain | 5610 | 0 | 1 | 17 |
| atp | 4 | [Ben Shelton](https://www.sofascore.com/tennis/player/shelton-ben/385485) | USA | 4680 | 0 | 4 | 24 |
| atp | 5 | [Daniil Medvedev](https://www.sofascore.com/tennis/player/medvedev-daniil/163504) | Russia | 3860 | 0 | 1 | 19 |

**Sample output (raw JSON):**

```json
[
  {
    "rankingType": "atp",
    "tour": "ATP",
    "rank": 3,
    "previousRank": 3,
    "rankChange": 0,
    "bestRank": 1,
    "points": 5610,
    "previousPoints": 5610,
    "pointsChange": 0,
    "nextWinPoints": null,
    "maxPoints": null,
    "tournamentsPlayed": 17,
    "playerId": 275923,
    "playerName": "Carlos Alcaraz",
    "playerShortName": "C. Alcaraz",
    "playerSlug": "alcaraz-carlos",
    "gender": "M",
    "country": "Spain",
    "countryCode": "ES",
    "url": "https://www.sofascore.com/tennis/player/alcaraz-carlos/275923",
    "source": "https://www.sofascore.com/tennis/rankings",
    "scrapedAt": "2026-10-30T10:44:07.209Z"
  },
  {
    "rankingType": "atp_live",
    "tour": "ATP",
    "rank": 3,
    "previousRank": 3,
    "rankChange": 0,
    "bestRank": null,
    "points": 5700,
    "previousPoints": null,
    "pointsChange": null,
    "nextWinPoints": 5800,
    "maxPoints": 6100,
    "tournamentsPlayed": null,
    "playerId": 275923,
    "playerName": "Carlos Alcaraz",
    "playerShortName": "C. Alcaraz",
    "playerSlug": "alcaraz-carlos",
    "gender": "M",
    "country": "Spain",
    "countryCode": "ES",
    "url": "https://www.sofascore.com/tennis/player/alcaraz-carlos/275923",
    "source": "https://www.sofascore.com/tennis/rankings",
    "scrapedAt": "2026-10-30T10:44:07.455Z"
  }
]
```

### 🐍 How to scrape tennis rankings with Python, JavaScript or the API

Run the actor programmatically with the official Apify clients. Replace `<YOUR_API_TOKEN>` with the token from your [Apify Console](https://console.apify.com/account/integrations).

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

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("confidential_gnat/sofascore-tennis-rankings-scraper").call(run_input={
    "rankings": ["atp", "wta"],
    "maxItems": 100,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**JavaScript** (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('confidential_gnat/sofascore-tennis-rankings-scraper').call({
    rankings: ['atp', 'wta'],
    maxItems: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**cURL** — start a run and wait for the dataset:

```bash
curl -X POST "https://api.apify.com/v2/acts/confidential_gnat~sofascore-tennis-rankings-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"rankings": ["atp", "wta"], "maxItems": 100}'
```

### 💡 What you can use tennis rankings data for

- Tennis models and player ratings that start from official rank and points.
- Tracking who is rising or falling by running on a schedule and comparing rank and points changes.
- Live ranking race coverage for tournaments and finals.
- Seeding, draw and prize analysis for events and fantasy tennis.
- Tennis stats sites, apps and newsletters that need a weekly rankings table.

Typically used by sports analysts, tennis media, bettors and fantasy players.

### ⚠️ Limitations of the tennis rankings scraper

- **Top 500 singles** — each list holds up to 500 players; doubles rankings are not included.
- **Current rankings only** — the lists are the latest published ones, not past weeks.
- **Proxy** — the site refuses many datacenter connections, so residential proxies are on by default; a run without a proxy may be blocked.
- **Not the federation sites** — the numbers come from SofaScore, which follows the official ATP and WTA lists.

### ❓ Tennis rankings scraper FAQ

#### Can I scrape tennis rankings legally?

The actor only collects data that is already publicly visible on sofascore.com, with no login, paywall or private content. Scraping publicly available data is generally considered lawful (see *hiQ Labs v. LinkedIn*), and you remain responsible for following the site's Terms of Service and any laws that apply to your use of the data.

#### What data does the tennis rankings scraper return?

For each player in each list: rank, points, previous rank and points with the changes, best ranking, tournaments played, name, country and a player page link. Live lists add the points of the next win and the maximum reachable.

#### How many players can I scrape?

`maxItems` limits the players saved for each ranking list, from rank 1 down, and each list has up to 500 players.

#### Do I need a proxy to scrape these rankings?

In practice yes. The site refuses many datacenter connections, so the input defaults to Apify residential proxies and retries a failed connection on a new one.

#### How do I scrape tennis rankings with Python?

Use the Python example above: start the actor with the Apify client and iterate over the dataset items.

#### Can I run this tennis rankings scraper on a schedule?

Yes. Use Apify Schedules to run it every Monday for the official rankings, or daily for the live lists, and compare the changes between runs.

#### What output formats are supported?

JSON, CSV, Excel, XML and RSS, either from the **Output** tab or through the Apify API.

#### What is the difference between official and live rankings?

The official rankings are the published weekly lists; the live rankings add the points players earn in tournaments in progress, so they change during matches.

### 🔗 Relevant actors for tennis and sports data

| Scraper | Description |
| ------- | ----------- |
| [🏀 StatMuse Sports Stats Scraper (NBA, NFL, MLB, NHL & More)](https://apify.com/confidential_gnat/statmuse-sports-scraper) | StatMuse answers to natural-language sports questions plus player stats. |
| [📈 Action Network Odds & Public Betting Scraper](https://apify.com/confidential_gnat/action-network-odds-scraper) | Sportsbook odds, public betting splits, opening lines and line movement. |
| [📊 Covers.com Odds, Line History & Betting Trends Scraper](https://apify.com/confidential_gnat/covers-odds-trends-scraper) | Covers.com odds, line history and betting trends for the major US leagues. |
| [🏈 FantasyPros Player News & Expert Rankings Scraper](https://apify.com/confidential_gnat/fantasypros-news-projections-scraper) | FantasyPros player news with fantasy analysis and expert rankings. |
| [🔮 Kalshi Markets Scraper](https://apify.com/confidential_gnat/kalshi-markets-scraper) | Kalshi prediction market prices, implied probability, spread and volume. |

### 🔗 Other actors you may find useful

| Scraper | Description |
| ------- | ----------- |
| [🧭 Craigslist Listings Scraper](https://apify.com/confidential_gnat/craigslist-listings-scraper) | Craigslist housing, for-sale, jobs and cars listings in any city. |
| [🎧 Spotify Monthly Listeners Scraper](https://apify.com/confidential_gnat/spotify-monthly-listeners-scraper) | An artist's monthly listeners, followers, top cities and discography. |
| [📄 Google Patents Scraper](https://apify.com/confidential_gnat/google-patents-scraper) | Patent data from Google Patents by keyword or URL. |
| [🍷 Vivino Wine Scraper](https://apify.com/confidential_gnat/vivino-wine-scraper) | Wine data from Vivino: name, winery, vintage, ratings and prices. |
| [🥾 AllTrails Scraper](https://apify.com/confidential_gnat/alltrails-scraper) | Hiking, biking and running trails from AllTrails by park, city or state. |

### 💬 Support & contact

If you encounter any issues or have questions, please [open an issue](https://apify.com/confidential_gnat/sofascore-tennis-rankings-scraper/issues/open).

You can also find more of our actors on the [Actor Flow](https://apify.com/confidential_gnat) page.

# Actor input Schema

## `rankings` (type: `array`):

Which ranking lists to scrape: the official ATP and WTA rankings, and the live rankings that count the points of matches in play. Empty means the official ATP and WTA rankings.

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

Maximum players saved for each ranking list, from rank 1 down. Each list has up to 500 players.

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

The site refuses many datacenter connections. Residential proxies work best; failed connections are retried on a new one.

## Actor input object example

```json
{
  "rankings": [
    "atp",
    "wta"
  ],
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "rankings": [
        "atp",
        "wta"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("confidential_gnat/tennis-rankings-scraper-sofascore").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 = { "rankings": [
        "atp",
        "wta",
    ] }

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

```

## MCP server setup

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

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/sAoGh2TBmlYhstWm7/builds/d58z5V2iOZYhuohCQ/openapi.json
