# Tennis Match Scraper - Scores, Odds, H2H & Form (`teamkamkod/tennis-match-intel`) Actor

Tennis match intel with betting context: scores, rankings, form, H2H, odds & point-by-point. ATP/WTA/Challenger/ITF.

- **URL**: https://apify.com/teamkamkod/tennis-match-intel.md
- **Developed by:** [Team Kamkod](https://apify.com/teamkamkod) (community)
- **Categories:** Sports, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $5.60 / 1,000 match-intels

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?

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

## 🎾 Tennis Match Scraper — Scores, Odds, H2H & Form

Extract **complete tennis match context** from Flashscore in one call: live/finished scores,
set-by-set results, **head-to-head history, per-player form (last 20 matches), surface splits
(clay/grass/hard) and betting odds** — covering ATP, WTA, Challenger & ITF, singles & doubles.

Built for **betting analysts, prediction models and pre-match research**. Where other tennis
scrapers stop at raw scores, this actor adds the *decision layer*: who is in form, on which
surface, and what the odds say — all from a single `matchId`.

### Why this actor?

Full betting context in one call — no stitching of separate feeds:

| Feature | Included |
|---|---|
| Scores, sets & fixtures (live/finished/scheduled) | ✅ |
| **Head-to-head (H2H)** | ✅ |
| **Player form (last 20 matches)** | ✅ |
| **Form by surface (clay/grass/hard)** | ✅ optional |
| **Betting odds snapshot** | ✅ when available |
| Match statistics (winners, aces, breaks) | ✅ |
| Rankings at match time | ✅ |
| Point-by-point log | ✅ live & finished |
| No proxy needed | ✅ |

### Two entry points — Match Intel

Every intel block below (H2H, form, odds, stats, rankings, point-by-point) is available two ways:

#### 1. `list` — find matches, then enrich (filterable)

Returns every match for a date with ids, tournament, players, status and scores.
Set **`enrich: true`** to turn each returned match into the full intel report below
(billed as `match-intel` per match) — one run, no second call needed.

**Input example — yesterday's & today's finished ATP matches:**

```json
{
  "mode": "list",
  "dayOffsets": ["-1", "0"],
  "tours": ["atp"],
  "matchStatuses": ["finished"]
}
```

**One result per match:**

```json
{
  "match_id": "nTLFUd87",
  "match_date": "2026-09-05",
  "event": "US Open (USA), hard",
  "category": "ATP - SINGLES",
  "is_doubles": false,
  "home_players": ["Shelton B."],
  "away_players": ["Shapovalov D."],
  "status": "finished",
  "time": null,
  "score_home": "3",
  "score_away": "1",
  "match_url": "https://www.flashscore.com/match/tennis/...",
  "player_slugs": [
    {"slug": "shapovalov-denis", "player_id": "zXddgn9o"},
    {"slug": "shelton-ben", "player_id": "QNuG0Gzb"}
  ]
}
```

**Filters** (all optional, combinable):

- `dayOffsets` — days relative to `date`/today, from `-3` to `3`. Default `["0"]`.
- `matchStatuses` — `finished`, `live`, `scheduled`. Empty = all.
- `tours` — `atp`, `wta`, `challenger`, `itf`. Empty = all active tours.
- `tournaments` — case-insensitive name match, e.g. `["Wimbledon"]`.
- `date` — anchor date (YYYY-MM-DD). Empty = today.
- `maxMatches` — cap on results.

#### 2. `match` — full intel by id (no list step)

Takes a `matchId` (from a `list` run) and returns the same complete intel package as `list` + `enrich: true` — in one call.

**Input:**

```json
{ "mode": "match", "matchId": "nTLFUd87" }
```

**Output fields:**

- `home_players` / `away_players` — names + rankings at match time
- `status`, `score`, `sets` — score detail
- `stats` — winners, aces, double faults, break points, serve %
- `venue` — stadium, round
- `h2h.home_form` / `h2h.away_form` — **last ~20 matches** per player
  (date, tournament, opponent, score, W/L)
- `h2h.head_to_head` — previous meetings between the two
- `h2h.by_surface` — optional (`"surfaces": true`): form filtered by CLAY / GRASS / HARD
- `odds` — pre-match & live odds rows (home/away; bookmaker named when the site shows it)

**Form entry example:**

```json
{
  "date": "05.09.26",
  "tournament": "USO",
  "home": "Shelton B.",
  "away": "Shapovalov D.",
  "score_home": "3",
  "score_away": "1",
  "result": "W"
}
```

### Use cases

- **Betting models** — pre-match features: form, surface affinity, H2H, odds in one API call
- **Pre-match research** — "how has the underdog performed on clay vs hard?"
- **Daily result digests** — schedule `list` runs and filter by tour/status
- **Prediction bots / MCP agents** — machine-readable intel, no HTML parsing

### Pricing

Pay-per-event — you pay only for what you use:

- `match-listed` — **$0.001** per listed match (mode `list`, scores/sets/tournament context)
- `match-intel` — **$0.007** per full match report (mode `list` + `enrich:true`, or mode `match`):
  form (last 20), H2H, odds, rankings, stats, venue, point-by-point

Failed runs are not charged. No proxy cost, no subscription.

### Notes & limitations

- Data source: [Flashscore](https://www.flashscore.com) public pages. Unofficial actor,
  not affiliated with Flashscore.
- Live odds appear when Flashscore publishes them (pre-match and in-play snapshots).
- Per-surface form and in-depth H2H exist for matches where Flashscore provides the tab.
- Historical depth: matches reachable within the Flashscore day navigation window (±3 days
  for lists; match pages keep full detail once you have the `matchId`).

# Actor input Schema

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

List every match of a day (lightweight, filterable, $0.001/match) or fetch one complete match report ($0.007).

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

Which day to list. Leave empty for today. Offsets below are relative to this date.

## `dayOffsets` (type: `array`):

Also fetch the days before/after the anchor date. Default: today only.

## `matchStatuses` (type: `array`):

Only return matches in these states. Leave empty for all.

## `tours` (type: `array`):

Restrict to specific circuits. Empty = all tours active that day.

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

Free-text filter on the tournament/event name (case-insensitive). Example: US Open, Wimbledon.

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

Upper limit on the number of matches returned. The list itself is always parsed fully; this caps the output.

## `enrich` (type: `boolean`):

Visit each match page and merge rankings, stats, venue, round, each player's last 20 matches, head-to-head, odds and point-by-point (~10 s/match extra). Billed as match-intel per enriched match.

## `matchId` (type: `string`):

8-character match id from a mode=list run (field match\_id). Billed once as match-intel ($0.007).

## `matchUrl` (type: `string`):

Full Flashscore match URL as an alternative to the match id (https://www.flashscore.com/match/tennis/<id>/).

## `surfaces` (type: `boolean`):

mode=match only: also capture each player's last matches filtered by CLAY, GRASS and HARD (adds ~30 s on the match page).

## `pageUrl` (type: `string`):

mode=list only: override the section to scrape (default: https://www.flashscore.com/tennis/). Rarely needed.

## Actor input object example

```json
{
  "mode": "list",
  "dayOffsets": [
    "0"
  ],
  "matchStatuses": [],
  "tours": [],
  "tournaments": [],
  "maxMatches": 500,
  "enrich": false,
  "surfaces": false
}
```

# Actor output Schema

## `match_records` (type: `string`):

Dataset of match records. Use the 'overview' view for the daily list, 'intel' for enriched reports.

## `enriched_intel` (type: `string`):

Same dataset, 'intel' view: rankings, round, venue, H2H form, odds and point-by-point for enriched matches.

# 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 = {
    "dayOffsets": [
        "0"
    ],
    "matchStatuses": [],
    "tours": [],
    "tournaments": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("teamkamkod/tennis-match-intel").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 = {
    "dayOffsets": ["0"],
    "matchStatuses": [],
    "tours": [],
    "tournaments": [],
}

# Run the Actor and wait for it to finish
run = client.actor("teamkamkod/tennis-match-intel").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 '{
  "dayOffsets": [
    "0"
  ],
  "matchStatuses": [],
  "tours": [],
  "tournaments": []
}' |
apify call teamkamkod/tennis-match-intel --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,teamkamkod/tennis-match-intel"
        }
    }
}

```

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/tNlqKyhgwtZJ3g3QZ/builds/cFjgEi4KGqdq3zXxb/openapi.json
