# Sports Odds Delta Feed - Line Movement API (`khavel/sports-odds-delta-feed`) Actor

Multi-book sports odds with line movement. Returns only the lines that moved since your last run, so an agent can poll cheaply instead of re-reading the whole board. Decimal and American prices, implied probability, previous price and change percentage per row.

- **URL**: https://apify.com/khavel/sports-odds-delta-feed.md
- **Developed by:** [Alejandro Oceja](https://apify.com/khavel) (community)
- **Categories:** E-commerce, Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 odds rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Sports Odds Delta Feed — line movement, not line dumps

Every odds actor on this store hands you the whole board every run. You pay for the same
1,200 rows a hundred times a day and diff them yourself.

This one returns **only the lines that moved**. Poll it every minute, pay for the movement,
and get `previous → current` already computed.

### What you get per row

```json
{
  "event_key": "basketball:nba:401909907",
  "event": "OKC @ CLE",
  "market": "moneyline",
  "selection": "home",
  "point": null,
  "book": "draftkings",
  "decimal_price": 1.578,
  "american_price": -173,
  "implied_prob": 0.633714,
  "previous_decimal_price": 1.62,
  "price_change": -0.042,
  "price_change_pct": -2.59,
  "kickoff_utc": "2026-11-03T00:00Z",
  "captured_at": "2026-11-03T13:40:50+00:00"
}
```

Markets: `moneyline`, `spread`, `total`. Both decimal and American prices, plus implied
probability, so you do not re-derive them.

### Two modes

| Mode | Use it for | Cost |
|---|---|---|
| `latest` | First call, or a full resync | Every row returned |
| `deltas` | Polling — the normal case | Only rows that moved |

`deltas` needs a `sinceRun`. Run once in `latest`, read the `run_id` from the run summary,
then poll `deltas` with that id.

### Input

```json
{
  "mode": "deltas",
  "sport": "basketball",
  "league": "nba",
  "maxEvents": 12,
  "sinceRun": 1
}
```

- `sport` / `league` are ESPN paths: `basketball`/`nba`, `americanfootball`/`nfl`,
  `baseball`/`mlb`, `icehockey`/`nhl`, `soccer`/`esp.1` for LaLiga.
- `maxEvents` caps upstream work (default 12).
- `limit` caps returned rows — it caps your bill, so set it while testing.
- `market` filters `latest` to `moneyline`, `spread` or `total`.

### Pricing

Charged per returned row (`odds_row` event). A 12-event NBA board is roughly 200–300 rows;
a delta poll on a quiet board is usually **zero to a few dozen**, and a run that returns
nothing is free.

### Who this is for

- **Line-movement trackers** that need history without storing the world.
- **Agents and LLM tools** that poll on a schedule and only want the diff.
- **Closing-line-value work** — capture the last price before kickoff by polling `deltas`.

### Honest limitations

- **US books only via the live source** (ESPN's public feed, which surfaces DraftKings).
  European books — Winamax, William Hill ES, Bet365 ES — come through the `ingest` source,
  where you supply a normalised JSON file from your own scraper. That path is documented
  and tested; it is not zero-config.
- **Pre-match prices**, not live in-play. `is_live` is on the row and always `false` from
  the current public source.
- **Upstream is best-effort.** A book that fails to answer is skipped, never invented; the
  run summary tells you what was fetched.

### Keywords

sports odds, betting odds, line movement, closing line value, NBA odds, NFL odds, odds API,
odds scraper, implied probability, sportsbook, arbitrage detection, delta feed

# Actor input Schema

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

latest = the full current board. deltas = only lines that moved since sinceRun. Use deltas for polling.

## `sport` (type: `string`):

ESPN sport path, e.g. basketball, americanfootball, soccer, icehockey, baseball.

## `league` (type: `string`):

ESPN league path, e.g. nba, nfl, mlb, nhl, esp.1 (LaLiga).

## `maxEvents` (type: `integer`):

How many events to price per run. Each event is one upstream request.

## `sinceRun` (type: `integer`):

Deltas mode only. Return movement after this run id. Leave empty to return everything known to have moved.

## `market` (type: `string`):

Optional. Restrict latest mode to one market.

## `limit` (type: `integer`):

Optional cap on returned rows. You are charged per returned row, so this caps your cost.

## `source` (type: `string`):

espn = live public odds. ingest = read a JSON file you supply. fixture = deterministic sample for testing.

## `file` (type: `string`):

Required when source = ingest: path to a JSON array of quote objects.

## Actor input object example

```json
{
  "mode": "latest",
  "sport": "basketball",
  "league": "nba",
  "maxEvents": 12,
  "market": "",
  "source": "espn"
}
```

# 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("khavel/sports-odds-delta-feed").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("khavel/sports-odds-delta-feed").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 khavel/sports-odds-delta-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khavel/sports-odds-delta-feed"
        }
    }
}
```

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/TPfVtImp7hoh3Z1s4/builds/dFUG4umtZucuiYjxh/openapi.json
