# Smarkets Betting Exchange Scraper - Odds, Volume & Results (`artsiom_k/smarkets-scraper`) Actor

Back and lay odds with available stake, last traded prices and matched volume from the Smarkets betting exchange for football, tennis, US sports, horse racing, politics and more, plus settled results and traded-price history (candles, pre-play closing odds).

- **URL**: https://apify.com/artsiom_k/smarkets-scraper.md
- **Developed by:** [Artsiom Kunitsyn](https://apify.com/artsiom_k) (community)
- **Categories:** Other, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 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

## Smarkets Betting Exchange Scraper - Odds, Volume & Results

Exchange odds from [Smarkets](https://smarkets.com), the UK betting exchange, for football, tennis, US sports, horse
and greyhound racing, golf, cricket, darts, politics and more:

- **Back and lay odds** with the stake available at each price (an order-book ladder), the **last traded price** and
  the **matched volume** of every market.
- **Results**: finished events with the score and which selection won, lost or was voided, plus the last traded price.
- **Traded-price history**: price candles per selection from before the start to the final whistle, with the **last
  pre-play price** (the exchange's closing odds), first traded, highest and lowest odds and the stake traded.

Exchange prices are the sharpest public odds there are: no bookmaker margin, real money on both sides. Use them as
a benchmark against sportsbook lines, to measure closing-line value, or to track political and entertainment markets.

### What you get

One row per selection of each market. Every row carries the event (`event_name`, `competition`, `sport`,
`start_time`, `event_state`, `event_url`, `venue`), the live or final score where there is one (`home_score`,
`away_score`, `match_period`, `scores`) and the market (`market_name`, `market_type`, `market_volume_gbp`).

#### `entityType: "markets"` (prices, the default)

| Field | Example |
|---|---|
| `event_name`, `competition`, `market_name` | `RC Lens vs Sporting`, `UEFA Champions League`, `Full-time result` |
| `contract_name`, `contract_type` | `Lens`, `HOME` |
| `back_odds`, `back_probability`, `back_stake_available_gbp` | `5.6`, `17.86`, `112.79` |
| `lay_odds`, `lay_probability`, `lay_stake_available_gbp` | `5.8`, `17.24`, `71.81` |
| `back_depth`, `lay_depth` | `[{"odds": 5.6, "probability": 17.86, "stake_gbp": 112.79}, {"odds": 5.4, ...}]` |
| `last_traded_odds`, `last_traded_at` | `5.6`, `2026-10-13T17:51:07Z` |
| `market_volume_gbp` | `74927` |

Back odds are what you get backing a selection (the best price on offer); lay odds are what you pay laying it. Stake is
the backer's stake in GBP available at the best price. Standing orders at the price limits (odds 1.0001 and 10000),
which many markets carry, are left out.

#### `entityType: "results"`

Finished events with `outcome` per selection (`winner`, `loser`, `voided`), the final score and score breakdown
(halves, periods, sets, extra time), actual start and end times, the last traded price and the market volume.

#### `entityType: "priceHistory"`

| Field | Example |
|---|---|
| `event_name`, `contract_name`, `outcome` | `Liverpool vs Man City`, `Man City`, `winner` |
| `first_traded_odds`, `preplay_last_odds`, `last_traded_odds` | `2.36`, `2.1`, `1.0` |
| `highest_odds`, `lowest_odds` | `3.15`, `1.0` |
| `total_trades`, `traded_back_stake_gbp` | `1975`, `145004.49` |
| `history_from`, `history_to`, `bucket_seconds` | 48 hours before kick-off, the final whistle, `180` |
| `candles` | `[{"time": "2026-10-09T15:57:00Z", "open_odds": 3.05, "high_odds": 3.05, "low_odds": 3.05, "close_odds": 3.05, "close_probability": 32.79, "trades": 1, "back_stake_gbp": 0.74}, ...]` |

Candle length follows the window: Smarkets returns about 480 candles per request, so a 48-hour window plus the match
gives candles of a few minutes. Only candles with trades are included.

### How to use it

- **Current prices for the next events, every sport** (the default): just run it.
- **Premier League match odds and goal lines for the weekend**: sports `Football (soccer)`, `dateFrom: 2026-10-17`,
  `dateTo: 2026-10-19`, clear **Max results**. Main markets are kept by default.
- **Every market of one match**: `eventIds: ["https://smarkets.com/event/45317409/..."]`, `markets: all`.
- **Yesterday's football results with closing exchange prices**: `entityType: "results"`, sports `Football (soccer)`,
  `dateFrom` = yesterday, `dateTo` = yesterday.
- **Closing odds and price charts for settled races**: `entityType: "priceHistory"`, sports `Horse racing`,
  `historyHoursBefore: 24`.
- **Outrights** (tournament winners, elections): `eventScope: outrights` or `all`.
- **Monitoring**: schedule a `markets` run every few minutes and diff on `external_id` + `scraped_at`.

### Input

| Field | What it does |
|---|---|
| `entityType` | `markets`, `results` or `priceHistory`. |
| `sports` | Any of 26 sports and categories (football, tennis, basketball, American football, baseball, ice hockey, horse racing, greyhound racing, golf, cricket, rugby, darts, snooker, boxing, MMA, esports, politics, current affairs, TV & entertainment...). Empty = all. |
| `eventScope` | `matches` (matches and races), `outrights` or `all`. |
| `eventIds` | Specific events by id or URL; overrides sports, dates and states. |
| `dateFrom`, `dateTo` | Start-time window: a date (`2026-10-31`) or a UTC time (`2026-10-31T18:00:00Z`). |
| `eventStates` | Override the listed states (`upcoming`, `live`, `ended`). |
| `markets` | `main` (winner, over/under, handicaps, both teams to score, draw no bet, place, plus each event's headline market) or `all`. |
| `marketTypes` | Exact market types instead, e.g. `CORRECT_SCORE`, `PLAYER_PASSING_YARDS`. |
| `includeOrderBook`, `orderBookDepth` | Prices: back/lay ladder on or off, and how many levels (default 3). |
| `historyHoursBefore` | Price history: how long before the start the window opens (default 48). |
| `maxItems` | Row cap, 50 by default. Clear it for everything. |
| `proxyConfiguration`, `proxyLanes` | Optional Apify Proxy, spread over several sessions to go faster. |
| `impersonate` | Browser fingerprint (default `chrome`). Change only if requests start failing. |

### Good to know

- **Finished events are kept for about 10 days.** After that Smarkets no longer serves them, so `results` and
  `priceHistory` cover the last ~10 days. Schedule a daily run to build your own archive.
- **Speed.** Smarkets allows 60 requests per minute per IP, and one request covers up to 100 markets. Every upcoming
  football match on Smarkets (about 1,000 events, 30,000 rows of main markets) takes about 8 minutes without a
  proxy and about 4 minutes with Apify Proxy on 6 sessions; each proxy session gets its own budget.
- **Prices are in GBP**, the exchange's currency. Odds are decimal; probabilities are in percent.
- **Football has about 80 markets per match** and an NFL game more than 100 with player props, so `markets: all` gives
  many rows per event.
- No login needed, and no proxy needed except to go faster.

### FAQ

**What is the difference between back and lay odds?** Backing is betting that a selection wins, at the best odds
someone is offering. Laying is betting against it. The gap between the two is the exchange's spread.

**Why is `back_odds` empty for some selections?** No one is offering a price on that side right now. Thin markets
(lower leagues, far-off outrights) often have one side only.

**What is `preplay_last_odds`?** The last traded price before the scheduled start, i.e. the exchange's closing price.
Comparing it with the odds you bet at gives your closing-line value.

**Can I get older results?** Only what Smarkets still lists (about 10 days). Older events return nothing.

### Related sports data scrapers

- [Action Network Scraper](https://apify.com/artsiom_k/actionnetwork-scraper) — US sportsbook odds, public betting splits, line movement, props, injuries and futures.
- [Sports Odds History Scraper](https://apify.com/artsiom_k/sports-odds-history-scraper) — opening and closing lines per sportsbook since 2021 and ATS results since 2006.
- [TennisExplorer Scraper](https://apify.com/artsiom_k/tennisexplorer-scraper) — tennis results, bookmaker odds per match, match statistics and point-by-point.
- [Kalshi & Polymarket Scraper](https://apify.com/artsiom_k/prediction-markets-scraper) — prediction market odds, settled results and price history for sports, politics, economics and crypto.
- [SofaScore Scraper](https://apify.com/artsiom_k/sofascore-scraper) — results, team statistics, lineups with player ratings, incidents and odds for football, basketball, hockey, tennis and 17 more sports.
- [Flashscore Scraper](https://apify.com/artsiom_k/flashscore-scraper) — results, statistics, lineups, incidents and opening/closing odds from ~20 bookmakers for 17 sports.

# Actor input Schema

## `entityType` (type: `string`):

"markets": upcoming and live events with the current order book. "results": finished events (Smarkets keeps them about 10 days) with the score and each selection's outcome. "priceHistory": traded prices over time per selection, for live and recently finished events (or any event in eventIds).

## `sports` (type: `array`):

Sports and categories to include. Leave empty for everything Smarkets lists.

## `eventScope` (type: `string`):

Single matches/races, outright markets such as a tournament winner, or both.

## `eventIds` (type: `array`):

Specific events, as Smarkets event ids or event page URLs (https://smarkets.com/event/45317409/...). Overrides sports, dates and eventStates.

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

Only events starting on or after this date or UTC time (2026-10-31 or 2026-10-31T18:00:00Z).

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

Only events starting on or before this date (the whole day) or UTC time.

## `eventStates` (type: `array`):

Override which events are listed. Defaults: upcoming + live for markets, ended for results, live + ended for priceHistory.

## `markets` (type: `string`):

"main": match odds / winner, over/under, handicap, Asian handicap, both teams to score, draw no bet, place, plus each event's headline market. "all": every market (a football match has about 80, an NFL game 100+ with player props).

## `marketTypes` (type: `array`):

Exact Smarkets market types to keep instead, e.g. WINNER_3_WAY, OVER_UNDER, CORRECT_SCORE, PLAYER_PASSING_YARDS. Overrides markets.

## `includeOrderBook` (type: `boolean`):

markets only: fetch back/lay odds and available stake. Off = only last traded prices and volume (one request fewer per 100 markets).

## `orderBookDepth` (type: `integer`):

markets only: price levels in back_depth / lay_depth.

## `historyHoursBefore` (type: `integer`):

priceHistory only: the window starts this many hours before the scheduled start (or when the market opened) and runs to the end. Candle size follows the window (48 h + match = about 6-minute candles).

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

Stop after this many rows. Defaults to 50 for a quick preview; clear it (null) for everything that matches.

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

Optional. Smarkets allows 60 requests per minute per IP; with Apify Proxy each proxy session gets its own budget, which speeds up large runs.

## `proxyLanes` (type: `integer`):

With a proxy: how many proxy sessions (IPs) to spread requests over.

## `impersonate` (type: `string`):

curl_cffi browser fingerprint. Defaults to "chrome"; change only if requests start failing.

## Actor input object example

```json
{
  "entityType": "markets",
  "eventScope": "matches",
  "markets": "main",
  "includeOrderBook": true,
  "orderBookDepth": 3,
  "historyHoursBefore": 48,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "proxyLanes": 4
}
```

# Actor output Schema

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("artsiom_k/smarkets-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("artsiom_k/smarkets-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 '{}' |
apify call artsiom_k/smarkets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,artsiom_k/smarkets-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/kXth2H4zvaWr3esSs/builds/GgzUlTUorceIIa3zl/openapi.json
