# Kalshi Odds Win Probability Prediction Market Scraper (`cellphonebeast/kalshi-odds-win-probability-prediction-market-scraper`) Actor

Scrapes live Kalshi prediction market odds and converts contract prices into win probability, implied probability, and fair odds for sports and event-based markets. Outputs structured data for research, analysis, dashboards, and automated workflows.

- **URL**: https://apify.com/cellphonebeast/kalshi-odds-win-probability-prediction-market-scraper.md
- **Developed by:** [Carlos G.](https://apify.com/cellphonebeast) (community)
- **Categories:** Other, AI, Agents
- **Features:** Limited permissions
- **Stats:** 14 total users, 1 monthly users, 0.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 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.

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

## Kalshi Sports Prediction Market Scraper 🏈🏀⚾🏒

#### Most bettors lose money chasing hunches. You don't have to be one of them.

***

This Actor taps directly into **Kalshi's prediction markets** — the only CFTC-regulated exchange where real money moves on real sports outcomes — and surfaces the **highest-probability plays** so you can bet with conviction, not hope.

> **The edge is simple:** When the market says a team has a 78% chance to win, you see it first.

***

### 🎯 Why This Scraper Wins

| Feature | What It Means For You |
|---------|----------------------|
| **High-Probability Filter** | Only see picks above your threshold. Default 70%. No garbage, no noise. |
| **American Odds Built-In** | Instant conversion to -110/+150 format. Speak the language of sportsbooks. |
| **ESPN Consensus Sync** | Totals picks align with sharp money. Never fade the market by accident. |
| **6 Major Sports** | NFL • NBA • NHL • MLB • NCAAF • NCAAB — all leagues, one Actor. |
| **Bank-Grade Security** | RSA-PSS signed requests. Your keys encrypted. Nothing logged. Ever. |

***

### 🚀 Get Started in 3 Steps

#### Step 1: Get Your Kalshi API Key

Log into [kalshi.com](https://kalshi.com) → **Account Settings** → **API Keys** → Generate & download your private key.

#### Step 2: Configure the Actor

Paste your **API Key ID** and **Private Key** (PEM format). Pick your sports. Set your probability threshold.

#### Step 3: Run & Export

Hit **Start**. Get picks in JSON, CSV, or Excel. Each pick includes probability, odds, and game details.

***

### 📊 Sample Output

**Moneyline Pick:**

```json
{
  "sport": "NFL",
  "market_type": "moneyline",
  "game": "Kansas City Chiefs at Las Vegas Raiders",
  "game_date": "2025-01-25",
  "pick": "Kansas City Chiefs",
  "win_probability": 78,
  "american_odds": "-354"
}
```

**Totals Pick:**

```json
{
  "sport": "NBA",
  "market_type": "totals",
  "game": "Lakers at Celtics",
  "game_date": "2025-01-25",
  "pick": "Over 215.5 points",
  "win_probability": 82,
  "american_odds": "-455",
  "consensus_line": 218.5
}
```

***

### 📈 What You Get

| Data Point | Description |
|------------|-------------|
| **Sport** | NFL, NBA, NHL, MLB, NCAAF, or NCAAB |
| **Game** | The matchup — who's playing who |
| **Pick** | The recommended bet |
| **Win Probability** | Market-implied win % from Kalshi |
| **American Odds** | Standard betting format (-300, +150) |
| **Market Type** | Moneyline or Totals |
| **Consensus Line** | ESPN's number (totals only) |
| **Game Date** | When it tips off |

***

### ⚙️ Configuration Options

| Input | Required | Default | What It Does |
|-------|:--------:|:-------:|--------------|
| `api_key_id` | ✅ | — | Your Kalshi API key ID |
| `private_key` | ✅ | — | RSA private key (PEM format) |
| `sports` | | `["NFL"]` | Which leagues to scan |
| `min_probability` | | `70` | Minimum win % to surface (50-95) |
| `include_totals` | | `true` | Include over/under markets |
| `use_espn_consensus` | | `false` | Smart-filter totals with ESPN lines |

***

### 🧠 ESPN Consensus: The Smart Filter

When enabled, the Actor pulls live lines from ESPN and applies **directional logic**:

- ✅ **Over plays** → Only lines *below* consensus (easier to clear)
- ✅ **Under plays** → Only lines *above* consensus (easier to stay under)

**Translation:** You never accidentally bet against where the sharp money already moved the line.

***

### 🔒 Security & Compliance

| Concern | Answer |
|---------|--------|
| **Is my API key safe?** | Yes. Marked as secret, encrypted at rest, masked in UI, used only in-memory. |
| **Is this legal?** | Yes. Uses Kalshi's official API with proper auth. No scraping. No private data. |
| **Do I need funds in Kalshi?** | No. This Actor only *reads* markets. It never places bets. |

***

### ❓ FAQ

<details>
<summary><strong>What if I get zero picks?</strong></summary>

No markets currently meet your threshold. Try lowering `min_probability` or running closer to game time when markets are most active.

</details>

<details>
<summary><strong>How often should I run this?</strong></summary>

Lines move all day. For sharpest data, run **2-4 hours before first pitch/tip-off** when liquidity peaks.

</details>

<details>
<summary><strong>Why RSA-PSS authentication?</strong></summary>

Kalshi requires cryptographic request signing — more secure than basic API keys. Your requests are tamper-proof.

</details>

<details>
<summary><strong>Can I automate this?</strong></summary>

Absolutely. Schedule runs in Apify, trigger via API, or pipe output to Google Sheets, Slack, Discord — whatever fits your workflow.

</details>

***

### ⚡ Performance

| Metric | Value |
|--------|-------|
| **Typical Runtime** | 3-5 seconds |
| **Rate Limiting** | 100ms between requests |
| **Retry Logic** | Exponential backoff on errors |
| **Max Markets** | 200 per sport |

***

### 📜 Version History

| Version | What Changed |
|:-------:|--------------|
| **1.0.5** | Improved documentation |
| **1.0.4** | Stable release |
| **1.0.3** | Fixed schema, renamed `title` → `game` |
| **1.0.2** | Schema format fix |
| **1.0.1** | Added table view |
| **1.0.0** | Initial release |

***

<p align="center">
  <strong>Stop guessing. Start knowing.</strong><br>
  <em>Built for bettors who want data, not drama.</em>
</p>

# Actor input Schema

## `api_key_id` (type: `string`):

Your Kalshi API key ID. Get it from your Kalshi account settings.

## `private_key` (type: `string`):

Your RSA private key in PEM format. Used for API authentication. Include the full key with BEGIN/END markers.

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

Select which sports to fetch odds for.

## `min_probability` (type: `integer`):

Only include picks with at least this win probability percentage (50-95).

## `include_totals` (type: `boolean`):

Include over/under totals markets in addition to moneylines.

## `use_espn_consensus` (type: `boolean`):

Enable ESPN consensus line filtering for totals. When enabled, totals picks are filtered to ensure directional alignment with market consensus. May slow execution.

## Actor input object example

```json
{
  "sports": [
    "NFL"
  ],
  "min_probability": 70,
  "include_totals": true,
  "use_espn_consensus": false
}
```

# 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 = {
    "sports": [
        "NFL"
    ],
    "min_probability": 70,
    "include_totals": true,
    "use_espn_consensus": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("cellphonebeast/kalshi-odds-win-probability-prediction-market-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 = {
    "sports": ["NFL"],
    "min_probability": 70,
    "include_totals": True,
    "use_espn_consensus": False,
}

# Run the Actor and wait for it to finish
run = client.actor("cellphonebeast/kalshi-odds-win-probability-prediction-market-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 '{
  "sports": [
    "NFL"
  ],
  "min_probability": 70,
  "include_totals": true,
  "use_espn_consensus": false
}' |
apify call cellphonebeast/kalshi-odds-win-probability-prediction-market-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cellphonebeast/kalshi-odds-win-probability-prediction-market-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/95FY3HpuzzTFZD3tz/builds/Ksf046tXW67bJec9R/openapi.json
