# WTA Tennis Rankings Scraper (`automation-lab/wta-rankings`) Actor

Export current or historical official WTA singles and doubles rankings with player identity, points, movement, country, ranking date, and profile context.

- **URL**: https://apify.com/automation-lab/wta-rankings.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Sports, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.76 / 1,000 ranking extracteds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## WTA Tennis Rankings Scraper

Export current and historical **WTA tennis rankings** from the official Women's Tennis Association data feed.
Each dataset row contains a singles or doubles rank, ranking points, movement, tournaments played, player identity, country, ranking date, and public WTA profile URL.

Use the Actor for weekly ranking snapshots, points-change monitoring, sports analytics, scouting, editorial data, and reproducible spreadsheet or warehouse exports.
It returns official published rankings, not a projected live race or match score feed.

### What does the WTA Tennis Rankings Scraper do?

The Actor reads the public structured feed used by WTA's official ranking pages and converts it into a flat Apify dataset.
You can:

- export current singles rankings;
- export current doubles rankings;
- collect both ranking lists in one run;
- request a historical ranking date;
- restrict output to a rank range;
- filter players by three-letter WTA country code;
- cap the total result count with `maxItems`;
- schedule recurring snapshots for change analysis;
- download results as JSON, CSV, Excel, XML, or RSS.

When a requested date is not an official ranking publication date, WTA may return the latest available snapshot on or before that date.
The output preserves both the requested date and the actual official `rankingDate` so downstream comparisons remain auditable.

### Who is it for?

- **Sports data analysts** track rank, points, and movement from one ranking week to the next.
- **Tennis journalists** refresh ranking tables and add source-linked player context to articles.
- **Scouts and coaches** identify upward movement or compare country cohorts.
- **Fantasy sports teams** seed contests with official standings.
- **Tournament operations teams** create bounded ranking snapshots for planning.
- **Data engineers** schedule weekly exports to a database, spreadsheet, or BI dashboard.
- **Researchers** assemble dated, reproducible public sports datasets.

This Actor provides ranking facts. It does not predict outcomes or provide betting advice.

### Why use this WTA rankings extractor?

- **Official source:** rows come from WTA's own public ranking service.
- **Singles and doubles:** select either list or collect both in one run.
- **Historical dates:** request a dated snapshot instead of only today's table.
- **Explicit movement:** receive numeric movement, previous rank, and direction.
- **Player context:** stable player ID, date of birth, age at ranking date, country, and profile URL are included.
- **Efficient HTTP route:** no browser or proxy is needed for normal runs.
- **Typed rows:** integrations receive a stable schema rather than raw page HTML.
- **Bounded cost:** rank range and `maxItems` stop unnecessary output.

### What data can you export?

| Field | Meaning |
| --- | --- |
| `rankingType` | `singles` or `doubles` |
| `rankingDate` | Actual official WTA snapshot date |
| `requestedRankingDate` | User-requested historical date, or `null` for latest |
| `rank` | Current position in the selected ranking list |
| `previousRank` | Previous position derived from WTA's movement value |
| `movement` | Positions gained or lost; positive means upward movement |
| `movementDirection` | `up`, `down`, or `unchanged` |
| `points` | Official WTA ranking points |
| `tournamentsPlayed` | Tournament count supplied in the ranking row |
| `playerId` | Stable WTA player identifier |
| `playerName` | Full player name |
| `firstName` | Player first name |
| `lastName` | Player last name |
| `countryCode` | Three-letter country code shown by WTA |
| `dateOfBirth` | Published birth date, when available |
| `age` | Age on the actual official ranking date |
| `profileUrl` | Public WTA player profile URL |
| `sourceUrl` | Official API request that produced the row |
| `fetchedAt` | UTC extraction timestamp |

### How to export WTA tennis rankings

1. Open the Actor in Apify Console.
2. Select **Singles**, **Doubles**, or both under **Ranking types**.
3. Leave **Ranking date** empty for the latest official list.
4. Optionally enter a historical date in `YYYY-MM-DD` format.
5. Optionally add country codes such as `USA`, `POL`, or `CZE`.
6. Set the minimum and maximum rank eligible for output.
7. Set **Maximum rows** to control the global dataset limit.
8. Click **Start**.
9. Open the **Results** dataset and export it in your preferred format.

A 25-row run is a useful first test before connecting a production workflow.

### Input parameters

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `rankingTypes` | string array | `["singles"]` | One or both of `singles` and `doubles` |
| `rankingDate` | string | latest | Historical date in `YYYY-MM-DD`; WTA can return the nearest prior official list |
| `countries` | string array | all | Optional three-letter WTA country codes |
| `minRank` | integer | `1` | First rank eligible for output |
| `maxRank` | integer | `5000` | Last rank eligible for output |
| `maxItems` | integer | `100` | Maximum rows across all selected ranking lists, from 1 to 10,000 |

The global `maxItems` limit applies after country and rank filters.
If both ranking types are selected, singles is processed first and doubles uses the remaining limit.

#### Current singles top 25

```json
{
  "rankingTypes": ["singles"],
  "minRank": 1,
  "maxRank": 25,
  "maxItems": 25
}
```

#### Historical singles and doubles for selected countries

```json
{
  "rankingTypes": ["singles", "doubles"],
  "rankingDate": "2026-08-10",
  "countries": ["USA", "POL"],
  "minRank": 1,
  "maxRank": 250,
  "maxItems": 100
}
```

### Output example

A current ranking row looks like this:

```json
{
  "rankingType": "singles",
  "rankingDate": "2026-08-24",
  "requestedRankingDate": null,
  "rank": 1,
  "previousRank": 1,
  "movement": 0,
  "movementDirection": "unchanged",
  "points": 8575,
  "tournamentsPlayed": 18,
  "playerId": 320760,
  "playerName": "Aryna Sabalenka",
  "firstName": "Aryna",
  "lastName": "Sabalenka",
  "countryCode": "BLR",
  "dateOfBirth": "1998-05-05",
  "age": 28,
  "profileUrl": "https://www.wtatennis.com/players/320760/aryna-sabalenka",
  "sourceUrl": "https://api.wtatennis.com/tennis/players/ranked?page=0&pageSize=100&type=rankSingles&sort=asc&metric=SINGLES",
  "fetchedAt": "2026-08-29T06:30:00.000Z"
}
```

Values reflect the source at run time.
The source can update after this example was recorded.

### How much does it cost to export WTA ranking rows?

The Actor uses pay per event pricing:

- **Start:** $0.005 once per run.
- **Ranking row:** $0.016264 per saved row at the BRONZE tier.
- Higher usage tiers reduce the per-row price automatically.
- Rows rejected by your filters are not charged as ranking events.

To estimate a BRONZE run, multiply the number of saved rows by the active BRONZE row price and add one start event. For example, a 10-row export uses 10 ranking events plus one start event, while a 100-row export uses 100 ranking events plus one start event.

The displayed Apify estimate applies the exact active tier automatically.
Your active Apify tier is the authority for the exact charge shown before a run.

### Monitor player ranking and points changes

Schedule the Actor after WTA's normal ranking publication cycle and store each run's dataset in your warehouse.
Use `playerId` plus `rankingType` as the stable comparison key.
Compare `rankingDate`, `rank`, `points`, and `movement` between snapshots.

A practical pipeline is:

1. run latest singles every week;
2. export the dataset to your database;
3. join it to the prior snapshot on `playerId` and `rankingType`;
4. calculate points and rank deltas;
5. send internal alerts for movement thresholds relevant to your team.

The Actor itself exports snapshots; alert delivery and cross-run diff storage belong in your downstream automation.

### Spreadsheet, database, and BI workflows

- Export CSV or Excel for editorial ranking tables.
- Send JSON rows to Google Sheets through an Apify integration.
- Load weekly snapshots into BigQuery, Snowflake, PostgreSQL, or another warehouse.
- Build country dashboards using `countryCode`.
- Track player trajectories using `playerId` rather than names.
- Use `rankingDate` instead of `fetchedAt` as the official sports-data time dimension.

### Run the Actor through the Apify API

Replace `APIFY_TOKEN` with your token.

#### cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~wta-rankings/runs?token=APIFY_TOKEN&waitForFinish=120" \
  -H "Content-Type: application/json" \
  -d '{"rankingTypes":["singles"],"maxRank":25,"maxItems":25}'
```

#### JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/wta-rankings').call({
  rankingTypes: ['singles', 'doubles'],
  rankingDate: '2026-08-10',
  countries: ['USA', 'POL'],
  maxRank: 250,
  maxItems: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("APIFY_TOKEN")
run = client.actor("automation-lab/wta-rankings").call(run_input={
    "rankingTypes": ["doubles"],
    "maxRank": 50,
    "maxItems": 50,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

### Use WTA rankings with MCP

Add the Actor to Claude Code through Apify's MCP server:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/wta-rankings"
```

#### Claude Desktop, Cursor, and VS Code setup

Claude Desktop, Cursor, and VS Code can use this equivalent MCP configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/wta-rankings"
    }
  }
}
```

Example prompts:

- "Run the WTA rankings Actor for the current singles top 50 and summarize the largest movers."
- "Export the official doubles top 100 as JSON."
- "Get the 2026-08-10 singles and doubles rankings for USA and POL players."

MCP can start and inspect runs; the Actor's dataset remains the source of complete rows.

### Reliability and failure behavior

The Actor validates inputs before contacting WTA.
Malformed dates, unsupported ranking types, invalid country codes, inverted rank ranges, and out-of-range limits fail clearly.

Transient network failures, HTTP 429 responses, and temporary server errors receive up to three bounded attempts with backoff.
Stable HTTP errors and unexpected response shapes fail the run rather than returning a misleading empty success.
No proxy or browser is used in the normal route.

### Limits and freshness

- WTA controls ranking publication frequency, corrections, and historical availability.
- Rankings are official periodic snapshots, not point-by-point live race projections.
- A requested non-publication date can resolve to the nearest earlier official `rankingDate`.
- `tournamentsPlayed` can be zero or differ in older source snapshots.
- Date of birth can be absent for some players; `dateOfBirth` and `age` can then be `null`.
- Country codes are source labels and can reflect WTA's representation rather than citizenship law.
- Selecting both lists with a small global `maxItems` can fill the limit from singles before doubles begins.
- The public WTA feed is undocumented and can change; strict validation is used to surface such changes.

### Responsible use and legality

The Actor accesses public ranking facts without login or private player data.
Use the data in accordance with WTA's applicable terms, Apify's terms, database rights, and the laws relevant to your use case.
Do not imply endorsement by WTA or redistribute protected branding and media without permission.
For high-volume republication, commercial licensing, or regulated decisions, obtain appropriate legal advice and source permissions.

### Troubleshooting

#### Why is the dataset empty?

Check whether your country and rank filters overlap.
For example, a narrow top-10 range plus a country with no top-10 player naturally returns no rows.
Remove `countries`, widen `maxRank`, and run a small test.

#### Why does `rankingDate` differ from `requestedRankingDate`?

WTA publishes rankings on specific dates.
When you request another day, the source can return the latest available official snapshot on or before it.
Use `rankingDate` for analysis and retain `requestedRankingDate` for audit context.

#### Why did a run fail after retries?

Open the run log and inspect the reported HTTP status or response-shape message.
A temporary upstream error may succeed later.
A repeated shape-validation error can indicate that WTA changed its public service and the Actor needs maintenance.

#### Why are there no doubles rows when I selected both types?

`maxItems` is global and singles runs first.
Increase `maxItems`, narrow the singles rank range, or run doubles separately.

### Related Automation Lab Actors

- [Tennis Abstract Player Match History Scraper](https://apify.com/automation-lab/tennis-abstract-player-match-history-scraper) exports public player match histories, opponents, scores, surfaces, rounds, and match statistics. Use it when you need match-level history rather than official WTA ranking snapshots.

### FAQ

#### Does this Actor scrape ATP men's rankings?

No. It is intentionally scoped to official WTA women's singles and doubles rankings.

#### Can I get both singles and doubles in one run?

Yes. Set `rankingTypes` to `["singles", "doubles"]` and choose a large enough global `maxItems` limit.

#### Can I request older rankings?

Yes. Supply `rankingDate` in `YYYY-MM-DD` format.
Historical availability is controlled by WTA, and the actual returned date is always recorded.

#### Does it provide live tennis scores?

No. "Live ranking" search language often refers to the latest standings, but this Actor exports published official ranking snapshots, not match scores or unofficial projected rankings.

#### Does it require an account, API key, proxy, or browser?

No WTA account or proxy is required for the normal public feed.
You still need an Apify account and token when calling the Actor through the Apify API.

#### How should I identify players across runs?

Use `playerId` as the stable key.
Names and rank positions can change.

#### Can I filter after the run?

Yes. The default dataset supports Apify exports and API filtering, and every row uses the same flat schema.
Applying country and rank filters in the Actor reduces saved rows and ranking-event charges.

# Actor input Schema

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

Export singles, doubles, or both ranking lists.

## `rankingDate` (type: `string`):

Optional historical date in YYYY-MM-DD format. WTA returns the latest official ranking available on or before this date.

## `countries` (type: `array`):

Optional three-letter WTA country codes, such as USA, POL, or CZE. Leave empty for every country.

## `minRank` (type: `integer`):

First ranking position eligible for output.

## `maxRank` (type: `integer`):

Last ranking position eligible for output.

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

Maximum total ranking rows saved across all selected lists.

## Actor input object example

```json
{
  "rankingTypes": [
    "singles"
  ],
  "minRank": 1,
  "maxRank": 5000,
  "maxItems": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

Default dataset view with ranking positions, points, movement, and player context.

# 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 = {
    "rankingTypes": [
        "singles"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/wta-rankings").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 = {
    "rankingTypes": ["singles"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/wta-rankings").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 '{
  "rankingTypes": [
    "singles"
  ],
  "maxItems": 20
}' |
apify call automation-lab/wta-rankings --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/wta-rankings"
        }
    }
}

```

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/HsG5NQtNrMezxjc7R/builds/GeaNB9cSwXiAw2iad/openapi.json
