# Kalshi Scraper — Prediction Markets, Odds & Events (`foxlabs/kalshi-prediction-markets`) Actor

Kalshi data as clean rows: prediction markets with implied probability, Yes/No bid-ask, last price, price change, volume and open interest; and grouped events with their child markets. Regulated US prediction markets. No API key, no login.

- **URL**: https://apify.com/foxlabs/kalshi-prediction-markets.md
- **Developed by:** [Berkan Kaplan](https://apify.com/foxlabs) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 prediction markets

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 Scraper — Prediction Markets, Odds & Events 📈

**foXLabs market data:** Kalshi prediction markets · implied probability · Yes/No order book · volume & open interest

🎉 Turn Kalshi into clean, structured data: every prediction market with its **implied probability**, **Yes/No bid-ask**, **last price**, **price change**, **volume** and **open interest** — plus grouped **events** with their child markets. Kalshi is a US-regulated (CFTC) exchange, and this reads its public data with no API key, no login, no wallet. Built for traders and quants, researchers and journalists, and AI agents.

### 🔍 What is the Kalshi Scraper — and when should you use it?

Pick a mode and get rows you can filter, export or feed to a model, a spreadsheet or an AI agent:

- **Events** (default) — grouped events (e.g. "Will Elon Musk visit Mars in his lifetime?") each with its child markets nested in the row, their prices, volume and open interest. The cleanest way to browse Kalshi.
- **Markets** — one row per individual market: implied probability, Yes/No bid-ask, last price, price change, volume and open interest.

**Use it when you need:** a live probability feed for a dashboard or bot; event contracts grouped by topic; or every market under one Kalshi series.

**Use something else when** you need to place trades (that needs Kalshi's authenticated trading API) or tick-by-tick order-book depth — this delivers the public market snapshot (prices, volume, open interest).

### 🤖 Use with AI agents

**Already on the Apify MCP server?** Ask for it by name: `foxlabs/kalshi-prediction-markets`.

**Your agent can pay for its own runs** — pay-per-event with agentic payments over **x402 (USDC on Base)** or **Skyfire**, with no Apify account of its own. Billing is per delivered record, never for errors or empty results.

Paste into Claude, ChatGPT, Cursor or any MCP assistant:

```
Use the Apify Actor `foxlabs/kalshi-prediction-markets`.
Input: `mode` = events | markets; `status` = open | closed | settled;
`seriesTicker` filters to one series; `minVolume` drops illiquid markets (markets mode);
`maxResults` caps rows.
Start with: { "mode": "events", "status": "open", "maxResults": 50 }
```

**Things you can ask your agent:**

- "What are Kalshi's open events and the implied probability of each outcome?"
- "List open markets with volume over 1000, with their Yes/No prices."
- "Pull every market in the KXELONMARS series."

**Machine-readable output:** every run writes a JSON dataset you can pull from the Apify API or the `.json` dataset endpoint.

### 📋 Overview

The Kalshi Scraper reads Kalshi's public trade API live on every run and returns clean, camelCase rows. There is nothing to configure: no API key, no login, no wallet, no proxies to buy.

**Why teams pick this actor:**

- 🧱 **Two jobs, one actor** — grouped events and individual markets in a single tool.
- 🎯 **Prices as probability** — Kalshi prices are 0–1 and equal the implied probability; we expose it directly, with Yes/No bid-ask and the price change.
- 🔑 **Zero setup** — no API key, no login, no wallet.
- ♻️ **Fresh every run** — reads the source live, so prices, volume and open interest stay current.
- 🤝 **Agent-ready** — MCP + x402, billed per delivered record.

### ✨ Features

- 💹 **Live prices & probability** — implied probability, Yes/No bid and ask, last price, and the change from the previous price.
- 📊 **Volume & open interest** — traded volume, 24-hour volume and current open interest per market.
- 🗂️ **Grouped events** — category, series, settlement sources and every child market nested in the event row.
- 🔎 **Filter** — by status (open/closed/settled/unopened), by `seriesTicker`, and by `minVolume` (markets mode).
- 📦 **Clean export** — camelCase rows, ready for CSV/Excel/JSON.

### 🎬 Quick Start

```bash
curl -X POST "https://api.apify.com/v2/acts/foxlabs~kalshi-prediction-markets/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "events", "status": "open", "maxResults": 50}'
```

### 🚀 Getting Started (3 steps)

1. **Pick a mode** — `events` for grouped events (cleanest), `markets` for individual markets.
2. **Set the scope** — `status`, `seriesTicker` to focus on one series, `minVolume` to drop illiquid markets, `maxResults` to cap rows.
3. **Run and export** — download the dataset as JSON, CSV or Excel, or pull it from the API.

### 📥 Input

```json
{
  "mode": "events",
  "status": "open",
  "seriesTicker": "",
  "minVolume": 0,
  "maxResults": 100
}
```

| Field | Type | Description |
|---|---|---|
| `mode` | string | `events` (default), or `markets`. |
| `status` | string | `open` (tradable), `closed`, `settled` (resolved), `unopened`. |
| `seriesTicker` | string | Filter to one Kalshi series (e.g. `KXELONMARS`). Empty = all. |
| `minVolume` | integer | Markets mode: skip markets below this traded volume (0 = keep all). |
| `maxResults` | integer | Cap on delivered rows (0 = 100). |
| `proxyConfiguration` | object | Apify datacenter by default — no setup needed. |

### 📤 Output

**Market** (markets mode):

```json
{
  "type": "market",
  "ticker": "KXELONMARS-99",
  "eventTicker": "KXELONMARS-99",
  "title": "Will Elon Musk visit Mars before Aug 1, 2099?",
  "yesSubTitle": "Mars",
  "status": "active",
  "impliedProbability": 0.08,
  "lastPrice": 0.08, "previousPrice": 0.08, "priceChange": 0,
  "yesBid": 0.08, "yesAsk": 0.10, "noBid": 0.90, "noAsk": 0.92,
  "volume": 123771.17, "volume24h": 420.0, "openInterest": 39984.78,
  "notionalValue": 1, "result": "",
  "openTime": "2021-06-10T00:00:00Z", "closeTime": "2099-08-01T04:00:00Z",
  "source": "Kalshi", "scrapedAt": "2026-11-02T10:00:00.000Z"
}
```

| Field | Type | Description |
|---|---|---|
| `ticker` / `eventTicker` | string | Canonical market and event identifiers. |
| `title` / `yesSubTitle` | string | Market question and the Yes side's label. |
| `impliedProbability` | number | 0–1: the last trade price, or the Yes mid-price if there is no last trade. |
| `lastPrice` / `previousPrice` / `priceChange` | number | Last price, prior price, and their difference. |
| `yesBid` / `yesAsk` / `noBid` / `noAsk` | number | Top of the Yes and No order books (0–1). |
| `volume` / `volume24h` / `openInterest` | number | Traded volume (total and 24h) and current open interest. |
| `status` | string | Market status (e.g. `active`, `finalized`). |
| `openTime` / `closeTime` | string | Trading window (ISO). |

**Event** (events mode): `type: "event"`, `eventTicker`, `seriesTicker`, `title`, `subTitle`, `category`, `mutuallyExclusive`, `settlementSources[]`, `marketCount`, and `markets[]` — each child market with `ticker`, `title`, `impliedProbability`, `lastPrice`, `yesBid`, `yesAsk`, `volume` and `openInterest`. Every row also carries `source` and `scrapedAt`.

### 💼 Use cases

- **Probability dashboard**
  - *Input:* `{ "mode": "events", "status": "open", "maxResults": 200 }`
  - *Output:* open events with each child market's implied probability and volume.
  - *Use:* power a "what Kalshi thinks" widget or a bot.
- **Liquidity screen**
  - *Input:* `{ "mode": "markets", "status": "open", "minVolume": 1000 }`
  - *Output:* only markets with real traded volume.
  - *Use:* focus a model on markets with meaningful activity.
- **Series tracker**
  - *Input:* `{ "mode": "markets", "seriesTicker": "KXELONMARS" }`
  - *Output:* every market in one series.
  - *Use:* monitor one topic over time.

### 🔗 Integration

**JavaScript (Apify client):**

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('foxlabs/kalshi-prediction-markets').call({ mode: 'events', status: 'open', maxResults: 50 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python (Apify client):**

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("foxlabs/kalshi-prediction-markets").call(run_input={"mode": "events", "status": "open", "maxResults": 50})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**n8n / Zapier / Make:** use the Apify connector, pick this actor, map `mode`, `status` and `maxResults`, then route the dataset into your sheet, database or webhook.

### 📊 Pricing

**Pay per result (PPE).** You are billed only for delivered records, never for errors or empty runs.

| Event | Price |
|---|---|
| `market` (one market row) | $0.002 |
| `event` (a grouped event with its child markets) | $0.004 |

A 100-market pull costs about $0.20. An event row carries its child markets, so a handful of events delivers many price points for a few cents. There is no monthly rental and no minimum.

### ❓ FAQ

#### Do I need an API key, a login or a wallet to scrape Kalshi?

No. Reading Kalshi's public market data — markets and events with their prices, volume and open interest — needs nothing from you. Only placing trades requires an authenticated Kalshi account, which this actor never does. It reads the public trade API directly through Apify's free datacenter proxy.

#### Is the price the same as the probability?

Yes. A Kalshi contract settles at $1 if the event happens and $0 if it doesn't, so its price sits between 0 and 1 and equals the market's implied probability. A Yes price of 0.08 means the market implies an 8% chance. We expose this as `impliedProbability` — the last trade price, or the Yes mid-price when there is no last trade.

#### What is the difference between events and markets mode?

`events` (the default) returns grouped events — a question family such as "Will Elon Musk visit Mars in his lifetime?" — each with its child markets nested in the row; it is the cleanest way to browse Kalshi. `markets` returns individual markets one per row with the full price and order-book detail. Note that Kalshi's raw market list also contains multi-leg "parlay" markets with long, concatenated titles; events mode keeps the headline questions easy to read, and `minVolume` in markets mode drops illiquid ones.

#### How do I focus on one topic or series?

Set `seriesTicker` to a Kalshi series (for example `KXELONMARS`). Each row carries its `seriesTicker` and `eventTicker`, so you can discover series from a broad run and then drill in.

#### Can I drop illiquid markets?

Yes. In markets mode, set `minVolume` (for example 1000) to skip markets below that traded volume. The run reports how many markets it scanned to reach your result count, so nothing is hidden.

#### Can I get closed or settled markets?

Yes. Set `status` to `closed` (closed but not yet settled), `settled` (resolved, with the `result`) or `unopened`. This is useful for backtesting: pull settled markets to see how final prices tracked outcomes.

#### How current is the data?

Every run reads the trade API live, so prices, volume and open interest reflect the market at run time. Prices move while a market is open, so a run is a snapshot — schedule the actor (hourly, daily) to build a time series.

#### How do I read the price change?

`previousPrice` is the market's prior price and `priceChange` is `lastPrice − previousPrice`, so a positive value means the Yes price rose since the previous observation — a quick read on momentum without you having to store history.

#### Can I export to CSV, Excel or JSON?

Yes. Download the dataset as JSON, CSV or Excel from the Apify console, or pull it straight from the Apify API or the dataset's `.json` endpoint for a pipeline or an AI agent.

#### How is this different from a generic odds scraper?

A generic odds scraper hands you sportsbook lines. Kalshi is a regulated event-contract exchange, so this gives you true market-implied probabilities across politics, economics, science, culture and more — with the Yes/No order book, volume and open interest — not just sports odds.

#### How does this compare to the Polymarket scraper?

They are siblings: both deliver prediction-market prices as implied probabilities with volume and liquidity. Kalshi is a US-regulated (CFTC) exchange quoted in USD; Polymarket is an on-chain market quoted in USDC. Many teams pull both to compare where the two markets price the same event differently.

### 🐛 Troubleshooting

- **Markets mode is dominated by long concatenated titles** — those are Kalshi multi-leg parlay markets; use events mode, a `seriesTicker`, or `minVolume` to focus on headline markets.
- **An event shows markets without prices** — a market with no trades yet has empty bid/ask; its `impliedProbability` falls back to the mid-price or is omitted.
- **Fewer rows than `maxResults`** — `maxResults` is a cap, not a target; a filter returns what the source currently has.
- **Empty result** — check `status` and, if set, that the `seriesTicker` exists; lower `minVolume`.

### ⚠️ Trademark

Independent, third-party tool. Not affiliated with, endorsed by or connected to Kalshi or any related entity. All marks belong to their owners and are used for identification only.

### ⚖️ Is it legal to scrape this data?

This actor reads publicly available, non-personal market data (questions, prices, volume and open interest) that Kalshi already publishes for public viewing. It collects no private or personal data and requires no login. You are responsible for using the output in line with applicable laws and the terms of the sites you rely on. When in doubt, consult a lawyer.

### 🤝 Support & contact

- 🌐 **Website:** [data.foxlabs.com.tr](https://data.foxlabs.com.tr)
- 📧 **Email:** info@foxlabs.com.tr
- 🧰 **More clean data actors:** [Fox Labs on Apify](https://apify.com/foxlabs)

### Changelog

#### 0.1 — 2026-11-02

- Initial release: events and markets modes from Kalshi's keyless public trade API, with implied probability, Yes/No order book, price change, volume and open interest.

# Changelog

This Actor's version history is a separate document: https://apify.com/foxlabs/kalshi-prediction-markets/changelog.md

# Actor input Schema

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

markets = one row per market (implied probability, Yes/No bid-ask, volume, open interest); events = grouped events with their child markets.

## `status` (type: `string`):

open = currently tradable; closed = closed but not yet settled; settled = resolved; unopened = announced but not open yet.

## `seriesTicker` (type: `string`):

Filter to one Kalshi series, e.g. KXELONMARS. Leave empty for all. Series tickers appear as seriesTicker/eventTicker in the output.

## `minVolume` (type: `integer`):

Skip markets below this traded volume (markets mode only). Default 0 = keep all. Raise it (e.g. 100) to drop illiquid/no-volume markets.

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

Cap on delivered rows (0 = 100).

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

Leave it on. The Actor reaches Kalshi through Apify's free datacenter proxy; no setup is needed. You may switch to residential or your own proxy if you prefer.

## Actor input object example

```json
{
  "mode": "events",
  "status": "open",
  "minVolume": 0,
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `report` (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": "events",
    "status": "open",
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("foxlabs/kalshi-prediction-markets").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": "events",
    "status": "open",
    "maxResults": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("foxlabs/kalshi-prediction-markets").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": "events",
  "status": "open",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call foxlabs/kalshi-prediction-markets --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,foxlabs/kalshi-prediction-markets"
        }
    }
}
```

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/sYwWSgaqvw9c2UcCp/builds/dCmEkzVP6O0Alw4td/openapi.json
