# Sportsbook vs Prediction Market Edge Finder (`fkdg_digital/sportsbook-vs-prediction-markets-edge-finder`) Actor

Compares vig-free sportsbook consensus odds with Kalshi and Polymarket prices for the same games and flags +EV mispricings with transparent matching.

- **URL**: https://apify.com/fkdg\_digital/sportsbook-vs-prediction-markets-edge-finder.md
- **Developed by:** [Franclim Diogo](https://apify.com/fkdg_digital) (community)
- **Categories:** Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / scan run

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/platform/actors/running/actors-in-store#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

## Sportsbook vs Prediction Market Edge Finder — Kalshi & Polymarket

The only tool that cross-references **sharp sportsbook consensus odds** with **prediction market prices** for the same games — and flags where Kalshi or Polymarket is mispriced relative to the books.

Sportsbooks price sports better than anyone; prediction markets often lag, especially on lower-volume games. This Actor turns that gap into a ranked, quantified signal: it fetches moneylines for upcoming NFL, NBA, MLB, NHL and Premier League games, strips the vig to get fair probabilities, finds the matching winner-markets on Kalshi and Polymarket, and reports every discrepancy above your threshold — Kalshi taker fees included.

### How it works

1. **Book odds (keyless)** — moneylines for upcoming games from a public feed (DraftKings lines via ESPN). Optionally plug in a free [the-odds-api.com](https://the-odds-api.com) key to upgrade to a multi-book consensus average.
2. **De-vig** — implied probabilities are normalized to sum to 1 (multiplicative devig), producing the books' *fair* probability for each side (3-way with draw for soccer).
3. **Prediction markets** — live two-sided quotes from Kalshi (parlays excluded) and binary markets from Polymarket.
4. **Matching** — a game matches a market when **both team names appear** in the market title (city/nickname/abbreviation aliases handled) **and** the market closes within ±1 day of kickoff. Every row carries `match_confidence`, `matched_terms` and a warning so you can verify.
5. **Edge math** — `edge_pct = (book fair prob − market YES cost) × 100`, with Kalshi taker fees baked into the cost. Positive edge = the prediction market underprices that side.

### Output fields

| Field | Description |
|---|---|
| `sport`, `game`, `kickoff` | Which game (e.g. `Celtics @ Lakers`) |
| `book_provider`, `book_ml_home`, `book_ml_away` | Where the lines came from |
| `book_fair_prob_pct` | Vig-free book probability for the flagged side |
| `pm_platform`, `pm_market`, `pm_url` | The matched prediction market |
| `pm_side_team`, `pm_prob_pct` | Which team YES backs, and its all-in cost (fees included) |
| `edge_pct`, `direction` | Signed edge and a plain-English signal |
| `pm_volume_24h`, `pm_liquidity` | Judge executability before acting |
| `match_confidence`, `matched_terms`, `warning` | Transparent matching — verify before trading |

A full report (games scanned, market counts, errors) is saved to the key-value store as `REPORT`.

### Use cases

- **+EV hunting** on Kalshi and Polymarket against sharper prices
- **Research** — how efficient are prediction markets vs Vegas, by sport and volume?
- **Agent pipelines** — MCP-ready output schema; feed edges into alerting or execution bots
- Pair with my other Actors: [Polymarket × Kalshi Arbitrage Scanner](https://apify.com/fkdg_digital/polymarket-kalshi-arbitrage-scanner) for risk-free cross-platform arbs and [Kalshi Markets & Odds API](https://apify.com/fkdg_digital/kalshi-markets-odds-api) for the raw normalized data.

### Honest limitations

- **This is +EV signal, not arbitrage.** An edge vs the books is probabilistic — books and prediction markets can both be wrong. Expect variance.
- **Matching is heuristic.** Team-name matching with alias tables is robust but not perfect — always open both links and verify the market resolves on exactly this game before trading. That's why every row shows its matching evidence.
- **Odds availability follows the calendar.** Off-season leagues return nothing; lines appear as games approach. Schedule runs close to game days.
- Book lines move; prediction-market asks are order-book snapshots. Freshness matters — run on a schedule.

**Not financial advice.** Sports trading involves risk.

### Pricing

Pay-per-event: a flat fee per scan plus a small fee per edge found. No edges, almost nothing charged.

# Actor input Schema

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

Leagues to scan. Off-season leagues simply return no games.

## `platforms` (type: `array`):

Which prediction markets to compare against the books.

## `minEdgePct` (type: `integer`):

Only report opportunities where |book fair prob − market price| is at least this many percentage points.

## `minPmVolume24h` (type: `integer`):

Skip prediction markets with 24h volume below this value.

## `maxResults` (type: `integer`):

Cap on output rows (sorted by |edge| descending).

## `oddsApiKey` (type: `string`):

Optional. With a key (free tier: 500 credits/mo), book odds come from a multi-book consensus average instead of the single-book keyless feed. The Actor works fine without it.

## Actor input object example

```json
{
  "sports": [
    "nfl",
    "nba",
    "mlb",
    "nhl",
    "epl"
  ],
  "platforms": [
    "kalshi",
    "polymarket"
  ],
  "minEdgePct": 3,
  "minPmVolume24h": 0,
  "maxResults": 100
}
```

# Actor output Schema

## `edges` (type: `string`):

Ranked +EV opportunities on Kalshi/Polymarket vs vig-free book consensus.

## `report` (type: `string`):

Games scanned, PM market counts, matched pairs, parameters and errors.

# 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("fkdg_digital/sportsbook-vs-prediction-markets-edge-finder").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("fkdg_digital/sportsbook-vs-prediction-markets-edge-finder").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 fkdg_digital/sportsbook-vs-prediction-markets-edge-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fkdg_digital/sportsbook-vs-prediction-markets-edge-finder"
        }
    }
}

```

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/xs87MqSxfL25ax570/builds/28px9BjRpLjhtRr02/openapi.json
