# Tennis Scraper & Odds API — ATP, WTA, ITF Results, Live Scores (`griffie/tennis-results-odds-scraper`) Actor

Tennis scraper and odds API: results, live scores and fixtures for ATP, WTA, Challenger and ITF, with opening and current betting odds from many bookmakers, match stats, H2H and Grand Slam archives. Tennis data from $1 per 1,000 matches.

- **URL**: https://apify.com/griffie/tennis-results-odds-scraper.md
- **Developed by:** [Dustin Griffie](https://apify.com/griffie) (community)
- **Categories:** Automation, Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 matches

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

## Tennis Scraper & Odds API — ATP, WTA, ITF Results and Live Scores

**Tennis Results & Odds Scraper** turns Flashscore's public tennis pages into clean, analysis-ready rows. **One run** can return **match results, fixtures, live scores, opening and current betting odds from many bookmakers, serve and return statistics, and head-to-head history** for the **ATP, WTA, ATP Challenger, WTA 125 and ITF** tours. It can also export **complete tournament archives** (Wimbledon, Roland Garros, the US Open, the Australian Open and every other event) for any season.

No browser, no login and no API key. You get JSON, CSV, Excel or an API endpoint, starting at **$1 per 1,000 matches**.

### What can this tennis scraper do?

- 🎾 **Tennis results for every tour:** finished matches with set-by-set games, tiebreak points, sets won, winner, retirements and walkovers
- 📅 **Fixtures and order of play:** scheduled matches up to **7 days ahead**, with UTC start times
- 🔴 **Live tennis scores:** current set, games, point score (15/30/40/AD) and who is serving
- 💰 **Tennis odds:** **opening vs current** match-winner and set-winner prices from **every bookmaker listed for your region** (GB, US, DE, AU, IT, CA…). Optional over/under games, games handicap and correct score.
- 📈 **Odds consensus per match:** average opening and current price, best available price, margin-free implied win probability, price drift % and whether the favourite won
- 📊 **Match statistics:** aces, double faults, 1st serve %, 1st/2nd serve points won, break points saved and converted, return points, winners, unforced errors, net points, service and return games won, and match and set durations. Per-set breakdown is optional.
- 🤝 **Head-to-head:** previous meetings with an H2H tally plus each player's latest results (recent form)
- 🏆 **Grand Slam and tournament archives:** every match of an edition, qualifying included, from a single Flashscore results URL. All "show more" pages are followed automatically.
- 🔎 **Filters:** tour, singles or doubles, match status, tournament name, player names and qualifying on/off
- ⏱️ **Scheduling and integrations:** run hourly for live odds, nightly for results, or call it from Make, Zapier, n8n, Python, Node.js or Google Sheets

### Why use this tennis data API?

| You need | What you get |
|---|---|
| A **tennis betting data** feed for models or backtests | Opening and current odds per bookmaker on the same row as the final score and the winner |
| **ATP / WTA results** for a dashboard or newsletter | Clean set scores, rounds, surfaces, indoor flag and player countries |
| **Challenger and ITF results**, which most sources skip | Hundreds of lower-tier matches per day in the same schema |
| **Historical tennis data** for research | Full tournament draws for past seasons, including Grand Slams |
| **Tennis stats** for player analysis | Serve and return stats, with an optional per-set breakdown |

It uses lightweight HTTP requests to public JSON and text feeds, so runs are **fast and cheap**. A day's results usually finish in **under 10 seconds**.

### How to scrape tennis results and odds

1. Click **Try for free** and open the **Input** tab.
2. Choose **By date** and type the days (e.g. `-1` for yesterday, `0` today, `1` tomorrow), **or** choose **Tournament archive** and paste a Flashscore results URL such as `https://www.flashscore.com/tennis/atp-singles/wimbledon-2024/results/`.
3. Optional: pick tours (ATP, WTA, Challenger, ITF…), statuses, players or tournaments.
4. Turn on **odds**, **statistics** or **head-to-head** if you need them.
5. Click **Start** and download your data as **JSON, CSV, Excel, XML or HTML**, or fetch it with the API.

#### Input example: yesterday's ATP results with odds

```json
{
  "mode": "byDate",
  "dayOffsets": ["-1"],
  "tours": ["ATP"],
  "status": ["finished"],
  "includeOdds": true,
  "geoIpCode": "GB",
  "maxMatches": 100
}
```

#### Input example: Wimbledon 2024 full results archive

```json
{
  "mode": "tournamentArchive",
  "tournamentUrls": ["https://www.flashscore.com/tennis/atp-singles/wimbledon-2024/results/"],
  "includeQualifying": false,
  "maxMatches": 0
}
```

#### Input example: tomorrow's US-sportsbook tennis odds

```json
{
  "dayOffsets": ["1"],
  "tours": ["ATP", "WTA"],
  "status": ["scheduled"],
  "includeOdds": true,
  "oddsMarkets": ["HOME_AWAY", "OVER_UNDER"],
  "geoIpCode": "US",
  "geoIpSubdivisionCode": "USNJ"
}
```

### Output example

Each match is **one row**. The example is shortened to two of the 50 odds entries returned for this match:

```json
{
  "matchId": "U1dnso9O",
  "matchUrl": "https://www.flashscore.com/match/U1dnso9O/#/match-summary",
  "status": "finished",
  "startTime": "2026-11-11T17:10:00.000Z",
  "endTime": "2026-11-11T19:26:36.000Z",
  "tour": "ATP",
  "matchType": "singles",
  "tournament": "Stockholm (Sweden)",
  "surface": "hard",
  "indoor": true,
  "homeName": "Shevchenko A.",
  "awayName": "Ruud C.",
  "home": { "name": "Shevchenko A.", "slug": "shevchenko-alexander", "participantId": "jTIB3FIA", "country": "Kazakhstan" },
  "away": { "name": "Ruud C.", "slug": "ruud-casper", "participantId": "zN9UpRqp", "country": "Norway" },
  "setsWon": { "home": 2, "away": 1 },
  "sets": [
    { "set": 1, "home": 6, "away": 7, "homeTiebreak": 5, "awayTiebreak": 7 },
    { "set": 2, "home": 6, "away": 4 },
    { "set": 3, "home": 6, "away": 3 }
  ],
  "scoreText": "6-7(5) 6-4 6-3",
  "winner": "home",
  "winnerName": "Shevchenko A.",
  "resultType": "completed",
  "odds": [
    { "bookmakerName": "Parimatch.uk", "market": "HOME_AWAY", "scope": "FULL_TIME",
      "home": { "current": 4.33, "opening": 4.0, "result": "WON" },
      "away": { "current": 1.18, "opening": 1.2, "result": "LOST" } }
  ],
  "oddsSummary": {
    "bookmakers": 20,
    "homeOpeningAvg": 3.956, "homeCurrentAvg": 4.462, "homeBest": 5,
    "awayOpeningAvg": 1.226, "awayCurrentAvg": 1.186, "awayBest": 1.22,
    "homeImpliedProb": 0.21, "awayImpliedProb": 0.79,
    "favorite": "away", "favoriteName": "Ruud C.", "favoriteWon": false,
    "homeDriftPct": 12.8, "awayDriftPct": -3.3
  },
  "homeOddsOpening": 3.956, "homeOddsCurrent": 4.462,
  "awayOddsOpening": 1.226, "awayOddsCurrent": 1.186,
  "scrapedAt": "2026-11-12T10:06:18.053Z"
}
```

With **statistics** turned on, a row also has `stats` (for example `stats.aces.home`, `stats.firstServePointsWon.homeWon/homeTotal`, `stats.breakPointsConverted.away`) and `duration` (`totalMinutes`, plus set durations). With **head-to-head** turned on it gets `h2h.summary` (`meetings`, `homeWins`, `awayWins`), `h2h.meetings[]`, `h2h.homeLastMatches[]` and `h2h.awayLastMatches[]`. Live matches carry `live.server`, `live.pointScore` and `live.currentSet`.

The **Output** tab has three table views: **Matches**, **Odds** (flat opening and current columns, ready for a spreadsheet) and **Live / fixtures**. A `RUN_SUMMARY` record in the key-value store reports feeds read, matches found vs. kept, enrichment counts and any fallback that was used.

#### Data fields

| Field | Description |
|---|---|
| `matchId`, `matchUrl` | Flashscore match ID and link |
| `status`, `statusDetail` | finished / live / scheduled / interrupted / cancelled / postponed, plus the detailed state (e.g. "Set 2", "Walkover") |
| `startTime`, `endTime` | ISO 8601 UTC |
| `tour`, `category`, `matchType` | ATP, WTA, CHALLENGER, WTA125, ITF_MEN, ITF_WOMEN, TEAMS, OTHER; singles / doubles / mixed / team |
| `tournament`, `round`, `surface`, `indoor`, `qualification` | Event details (round is filled for archive pages) |
| `home`, `away` | Name, slug, Flashscore IDs, country, profile URL, and both partners for doubles |
| `sets[]`, `setsWon`, `scoreText`, `winner`, `resultType` | Games per set with tiebreak points; completed / retired / walkover / awarded |
| `odds[]` | Per bookmaker: market, period, home/away **current** and **opening** price and settled result |
| `oddsSummary` + flat odds columns | Consensus prices, best price, implied probability, drift and whether the favourite won |
| `stats`, `setStats`, `duration` | Match (and optional per-set) statistics and durations |
| `h2h` | Head-to-head tally, meetings and recent form |

### How much does it cost to scrape tennis data?

Pricing is pay-per-event, so you only pay for what you get:

| Event | Price | Charged when |
|---|---|---|
| Match | **$0.001** ($1 per 1,000 matches) | Each match row saved |
| Odds enrichment | +$0.001 | A match row includes at least one bookmaker price |
| Statistics enrichment | +$0.0005 | A match row includes statistics |
| Head-to-head enrichment | +$0.001 | A match row includes H2H/form data |
| Actor start | $0.00005 | Once per run |

Examples: a full day of ATP + Challenger results with odds (about 100 matches) costs about **$0.20**. The whole Wimbledon men's draw without enrichments (239 matches) costs about **$0.24**. Set a **maximum cost per run** in the run options, and the Actor stops cleanly when that limit is reached. Higher Apify plans get volume discounts (match rows are $0.0008 on Scale and higher). Proxy and compute are included.

**Try it free:** Apify's Free plan includes $5 of usage credit every month with no card required. That covers about 5,000 plain match rows, or about 2,500 matches with odds.

### Tips

- **Older seasons:** day mode covers the 7 days back and 7 days ahead that Flashscore serves. For older data, use **Tournament archive** with a season URL (`…/wimbledon-2023/results/`). Replace the year in any Flashscore tournament URL.
- **Off-season:** in late November and December the ATP/WTA calendars are thin. With *Fall back to all tours* switched on, an empty tour selection returns other tours instead of nothing, and `RUN_SUMMARY.tourFallbackUsed` tells you it happened.
- **Bookmaker region:** the `geoIpCode` controls which bookmakers appear. `US` with a state such as `USNJ` returns US sportsbooks, `GB` UK books, and so on.
- **Closing lines:** for finished matches, `current` is the last price Flashscore listed before settlement. Compare it with `opening` to measure line movement.
- **Live monitoring:** schedule the *Live tennis scores* example every 5–10 minutes and connect a webhook or integration.
- **Day boundaries:** `timezoneOffset` decides what "a day" means (UTC by default). All timestamps are returned in UTC.

### Ready-to-run tennis examples

1. **Yesterday's ATP Tennis Results with Betting Odds**: `dayOffsets ["-1"]`, ATP, finished, odds on
2. **Today's WTA Fixtures and Pre-Match Odds**: today, WTA, scheduled, odds on
3. **Live Tennis Scores Now — All Tours**: today, status live
4. **Tennis Opening vs Current Odds for Tomorrow's Matches**: tomorrow, ATP/WTA/Challenger, odds on
5. **Tennis Head-to-Head for Today's ATP Matches**: today, ATP, H2H on
6. **Tennis Serve and Return Stats for Yesterday's Matches**: yesterday, singles, stats on

Duplicate any example, change the days, tours or URLs, and schedule it.

### Use it with Make, n8n, Zapier, Google Sheets or an AI agent

- **On a schedule:** in Apify Console open *Schedules → Create new*, add this Actor (or one of the example tasks) and choose hourly, daily, weekly or a cron expression.
- **Make, Zapier and n8n:** all three have an official Apify app or node. Use *Run Actor* (or *Run task*) with the same JSON input, then *Get dataset items* to send the matches to Google Sheets, Airtable, Slack, email or a database.
- **Google Sheets, Slack and webhooks:** the Actor's *Integrations* tab can push results when a run finishes, with no code.
- **AI agents (MCP):** Apify's MCP server at `https://mcp.apify.com` exposes Store Actors as tools, so an MCP-compatible assistant or agent framework can call `griffie/tennis-results-odds-scraper` and read the matches it returns.
- **From code:** use the official `apify-client` package for Python or JavaScript:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("griffie/tennis-results-odds-scraper").call(run_input={"mode": "byDate", "dayOffsets": ["-1"], "tours": ["ATP"], "status": ["finished"], "includeOdds": True, "maxMatches": 10, "proxyConfiguration": {"useApifyProxy": True}})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### FAQ

**Which tennis tours are covered?** ATP Tour, WTA Tour, ATP Challenger, WTA 125, ITF men's and women's World Tennis Tour, team competitions (Davis Cup, Billie Jean King Cup, United Cup) and other events Flashscore lists, in singles and doubles.

**Can I get historical tennis odds?** Yes, for matches Flashscore still lists odds on. Days within the past week return odds reliably. Older tournament-archive matches often still include them, but coverage varies by event and bookmaker.

**How fresh are live scores?** Each run reads the current live feed. For near-real-time tracking, schedule frequent short runs filtered to `live`.

**Is there a tennis API I can call directly?** Yes. Every Apify Actor is an API: start a run and read the dataset over HTTP, or use the Apify Python/JavaScript clients, Make, Zapier or n8n.

**Why are some stats missing?** Flashscore only tracks detailed stats for some matches (mostly tour-level and many Challenger events). ITF matches often have none. Those rows keep `stats: null` and are not charged for statistics.

### Limitations

- Day mode is limited to the −7…+7 day window that Flashscore publishes. Use tournament archives for older seasons.
- Odds availability and bookmakers depend on region, match level and time. Lower-tier ITF matches can have few or no odds.
- `round` is provided for tournament-archive rows. Day feeds do not include it.
- Player rankings are not included. Use the player URL or IDs to join other data.
- Results reflect what Flashscore shows at run time. Live data changes quickly.

### Is it legal to scrape tennis results and odds?

This Actor collects publicly available sports data (scores, schedules, published odds and statistics) without logging in and without bypassing access controls. It does not collect personal data beyond athletes' publicly reported names and nationalities. Make sure your use complies with Flashscore's terms and with the laws and gambling regulations that apply to you, especially if you republish the data or use it commercially. Odds are informational. This tool does not place bets.

### Feedback

Missing a field, a market or a tour? Open an issue on the **Issues** tab. Requests are reviewed and the Actor is actively maintained.

### More Actors from the same developer

- **[Coles, Woolworths & ALDI Scraper](https://apify.com/griffie/coles-woolworths-aldi-scraper)**: Australian supermarket prices, half-price specials and a price-change tracker.
- **[UK Supermarket Prices Scraper](https://apify.com/griffie/uk-supermarket-prices)**: Tesco, Sainsbury's, ASDA, Aldi, Morrisons, Waitrose and Iceland prices in one table.
- **[Google Trends Scraper & API](https://apify.com/griffie/google-trends-reliable-scraper)**: bulk interest over time, interest by region and related queries.
- **[Google Ads Transparency Scraper](https://apify.com/griffie/google-ads-transparency-scraper)**: every Google ad a competitor or website runs, including YouTube and political ads.
- **[Google Hotels Scraper](https://apify.com/griffie/google-hotels-prices-scraper)**: hotel prices for any city and dates, compared across booking sites.
- **[Google Flights Scraper](https://apify.com/griffie/google-flights-scraper)**: live fares for many routes and dates, plus cheapest-day calendars.
- **[Redfin Scraper](https://apify.com/griffie/redfin-scraper)**: homes for sale, 90-day sold comps and rentals by city or ZIP.
- **[Hiring Signals & New Jobs Tracker](https://apify.com/griffie/company-jobs-ats-api)**: job openings from 13 applicant tracking systems, with new-job alerts.

Found a bug or need a field that's missing? Open an issue on the Actor's *Issues* tab and it will be looked at quickly.

# Actor input Schema

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

<b>By date</b>: results, live scores and fixtures for any day from 7 days ago to 7 days ahead, across every tour. <b>Tournament archive</b>: every match of a past or current tournament edition from its Flashscore results page (e.g. Wimbledon 2024).

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

Day offsets from today: <code>-1</code> = yesterday, <code>0</code> = today, <code>1</code> = tomorrow. Range −7 to +7. Combine several, e.g. <code>-2, -1, 0</code>. Used in 'By date' mode. Empty = today.

## `dateFrom` (type: `string`):

Alternative to day offsets: first calendar day (YYYY-MM-DD). Clipped to the −7…+7 day window. Use 'Tournament archive' for older seasons.

## `dateTo` (type: `string`):

Last calendar day (YYYY-MM-DD), inclusive.

## `timezoneOffset` (type: `integer`):

Which time zone defines 'a day'. 0 = UTC days, -5 = US Eastern (winter), 1 = Central Europe, 10 = Sydney. Match times are always returned in ISO UTC.

## `tournamentUrls` (type: `array`):

Flashscore tennis tournament pages, for example <code>https://www.flashscore.com/tennis/atp-singles/wimbledon-2024/results/</code> or <code>https://www.flashscore.com/tennis/wta-singles/australian-open/results/</code>. '/results/' is added automatically. Used in 'Tournament archive' mode; all 'Show more' pages are followed.

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

Keep only these tours. Empty = all tours. TEAMS covers Davis Cup / Billie Jean King Cup / United Cup ties; OTHER covers exhibitions, juniors, wheelchair and similar events.

## `matchTypes` (type: `string`):

Keep singles only, doubles only (incl. mixed) or both.

## `status` (type: `array`):

Keep only matches in these states. Empty = all. 'finished' includes retirements and walkovers (see resultType).

## `includeQualifying` (type: `boolean`):

Turn off to keep main-draw matches only.

## `tournamentNameContains` (type: `array`):

Keep tournaments whose name contains any of these words (case and accent insensitive), e.g. 'Davis Cup', 'Paris', 'M25'.

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

Keep matches involving any of these players. Full names or surnames work, e.g. 'Jannik Sinner', 'Swiatek'. Doubles partners are searched too.

## `fallbackToAllTours` (type: `boolean`):

In the off-season ATP/WTA days can be empty. When on, an empty tour selection falls back to every tour (logged and flagged in RUN_SUMMARY) instead of returning nothing.

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

Adds pre-match opening and current prices from every bookmaker Flashscore lists for the chosen region, plus a consensus summary (average, best price, implied probability, drift, favourite won). Charged per match that returns odds.

## `oddsMarkets` (type: `array`):

HOME_AWAY = match winner (and set winner). Also available: total games over/under, games handicap and correct score.

## `oddsScopes` (type: `array`):

Full match and/or individual sets. Empty = all periods offered.

## `geoIpCode` (type: `string`):

Two-letter country code that decides which bookmakers are returned, e.g. GB (bet365, William Hill, Betfred…), US (DraftKings, FanDuel, BetMGM…), DE, AU, IT, CA.

## `geoIpSubdivisionCode` (type: `string`):

Optional state/region code, e.g. USNJ or USNY for US state books, GBENG for England.

## `includeStats` (type: `boolean`):

Aces, double faults, 1st/2nd serve %, break points saved/converted, return points, winners, unforced errors, net points, total points and games, plus set and match duration. Finished and live matches only.

## `includeSetStats` (type: `boolean`):

Adds the same statistics broken down by set (setStats). Requires 'Add match statistics'.

## `includeH2H` (type: `boolean`):

Previous meetings between the two players with an H2H tally, plus each player's most recent matches (all surfaces).

## `h2hLimit` (type: `integer`):

How many recent matches to keep per player in the H2H block (meetings keep at least 10).

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

Stop after this many matches (after filters). 0 = no limit. A full day across all tours is roughly 100–600 matches.

## `maxConcurrency` (type: `integer`):

Matches enriched in parallel (odds/stats/H2H). Keep it modest to stay polite.

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

Apify datacenter proxy is enough. If the proxy fails the Actor automatically continues on a direct connection.

## `debugLog` (type: `boolean`):

Print per-request diagnostics.

## Actor input object example

```json
{
  "mode": "byDate",
  "dayOffsets": [
    "-1"
  ],
  "timezoneOffset": 0,
  "tournamentUrls": [],
  "tours": [
    "ATP"
  ],
  "matchTypes": "all",
  "status": [
    "finished"
  ],
  "includeQualifying": true,
  "tournamentNameContains": [],
  "playerNames": [],
  "fallbackToAllTours": true,
  "includeOdds": true,
  "oddsMarkets": [
    "HOME_AWAY"
  ],
  "oddsScopes": [],
  "geoIpCode": "GB",
  "includeStats": false,
  "includeSetStats": false,
  "includeH2H": false,
  "h2hLimit": 5,
  "maxMatches": 10,
  "maxConcurrency": 6,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debugLog": false
}
```

# Actor output Schema

## `matches` (type: `string`):

No description

## `odds` (type: `string`):

No description

## `allFields` (type: `string`):

No description

## `runSummary` (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 = {
    "mode": "byDate",
    "dayOffsets": [
        "-1"
    ],
    "tours": [
        "ATP"
    ],
    "status": [
        "finished"
    ],
    "includeOdds": true,
    "maxMatches": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("griffie/tennis-results-odds-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": "byDate",
    "dayOffsets": ["-1"],
    "tours": ["ATP"],
    "status": ["finished"],
    "includeOdds": True,
    "maxMatches": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("griffie/tennis-results-odds-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": "byDate",
  "dayOffsets": [
    "-1"
  ],
  "tours": [
    "ATP"
  ],
  "status": [
    "finished"
  ],
  "includeOdds": true,
  "maxMatches": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call griffie/tennis-results-odds-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,griffie/tennis-results-odds-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/3MPi7biBHWLe1mAqd/builds/FvTCAicjCTpP66xkJ/openapi.json
