# Kalshi Scraper — Prediction Market Odds & Probabilities (`haketa/kalshi-scraper`) Actor

Scrape event contracts from Kalshi, the US-regulated prediction market: market title, yes/no prices, implied probability, last price, volume, open interest, liquidity, status and close time. Pull markets or events by series, status or ticker. No login or API key. Export JSON, CSV, Excel.

- **URL**: https://apify.com/haketa/kalshi-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 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?

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

## Kalshi Scraper 📊🇺🇸

Extract **event contracts from Kalshi — the US-regulated prediction market** — at scale, without an account or API key. Scrape **events** (a question with its priced yes/no markets) or raw **markets**, and export clean JSON, CSV or Excel: **market title, yes/no prices, implied probability, last price, volume, open interest, liquidity, status and close time.**

Perfect for **prediction-market research, sentiment & forecasting signals, trading analysis and alternative-data products.**

***

### 🔑 What this scraper does

- ❓ **Events** — each question (e.g. "Will Elon Musk visit Mars in his lifetime?") with its nested yes/no markets.
- 📈 **Prices & probability** — yes/no bid/ask, last price and the **implied probability (%)** for every market.
- 🗂️ **Categories** — politics, economics, world, tech, sports and more.
- 💧 **Depth (where exposed)** — volume, open interest and liquidity when Kalshi includes them.
- 🎛️ **Filter** — by status (open/closed/settled), series ticker or a single event.
- ⏰ **Timing** — open, close and expiration times, plus status.

No login, no cookies, no API key. Choose your filters, press start, export.

***

### 📋 Example output

**Event with nested markets:**

```json
{
  "eventTicker": "KXELONMARS-99",
  "seriesTicker": "KXELONMARS",
  "title": "Will Elon Musk visit Mars in his lifetime?",
  "category": "World",
  "mutuallyExclusive": false,
  "marketCount": 1,
  "markets": [
    {
      "ticker": "KXELONMARS-99-VISIT",
      "title": "Will Elon Musk visit Mars before Aug 1, 2099?",
      "status": "active",
      "yesBid": 0.09,
      "yesAsk": 0.11,
      "noBid": 0.88,
      "noAsk": 0.90,
      "lastPrice": 0.10,
      "impliedProbabilityPct": 10,
      "volume": 12000,
      "openInterest": 8400,
      "liquidity": 25000,
      "closeTime": "2099-08-01T04:59:00Z"
    }
  ]
}
```

***

### 🗂️ Fields you get

#### Event

| Field | Description |
|---|---|
| `eventTicker`, `seriesTicker` | Event & series tickers |
| `title`, `subtitle` | The question |
| `category` | Politics, Economics, World, etc. |
| `mutuallyExclusive` | Whether the markets are mutually exclusive |
| `marketCount` | Number of nested markets |
| `markets` | Nested markets (see below) |

#### Market

| Field | Description |
|---|---|
| `ticker`, `eventTicker` | Market & parent event tickers |
| `title`, `subtitle` | Market question |
| `status` | active, closed, settled… |
| `yesBid`, `yesAsk`, `noBid`, `noAsk` | Best bid/ask (in dollars, 0–1) |
| `lastPrice` | Last traded price (dollars, 0–1) |
| `impliedProbabilityPct` | Implied probability of "yes" (0–100%) |
| `volume`, `volume24h` | Contracts traded |
| `openInterest` | Open contracts |
| `liquidity` | Resting liquidity |
| `openTime`, `closeTime`, `expirationTime` | Timing |
| `result` | Settlement result, when settled |

> Prices are in dollars from 0 to 1 (0.55 = 55¢), and `impliedProbabilityPct` converts that to a 0–100% probability. Choose **Events** for questions + priced markets (recommended) or **Markets** for raw contracts.

***

### 🚀 How to use

1. Click **Try for free**.
2. Choose **Data Type** (Events recommended) and a **Status** (Open = tradeable now).
3. (Optional) Narrow to a **Series Ticker** or **Event Ticker**.
4. Set **Max Items**, then click **Start**.
5. Export as **JSON, CSV, Excel, HTML, RSS**, or via the **Apify API**.

***

### 📝 Example inputs

#### 1. All open events (questions + priced markets)

```json
{ "dataType": "events", "status": "open", "maxItems": 500 }
```

#### 2. A single series

```json
{ "dataType": "events", "seriesTicker": "KXELONMARS", "status": "open" }
```

#### 3. Raw markets

```json
{ "dataType": "markets", "status": "open", "maxItems": 1000 }
```

#### 4. Settled events (for backtesting)

```json
{ "dataType": "events", "status": "settled", "maxItems": 1000 }
```

***

### 💡 Popular use cases

#### 📈 Prediction-market research

Pull live implied probabilities across politics, economics and world events to track what the market expects — and how it moves.

#### 🧠 Sentiment & forecasting signals

Feed implied probabilities into your models as a real-time, money-backed sentiment signal for elections, rates, weather and more.

#### 💹 Trading & arbitrage analysis

Compare prices, volume and liquidity across markets to spot mispricings, build watchlists and monitor depth.

#### 🔬 Backtesting & data science

Collect settled events and their outcomes to backtest strategies and study calibration of market-implied probabilities.

#### 🤖 AI, LLM & data products

Feed clean, structured prediction-market data into your own models, dashboards or products.

***

### 👥 Who uses this

- **Traders & quants** researching prediction-market prices and depth.
- **Analysts & forecasters** using implied probabilities as signals.
- **Data scientists** backtesting on settled markets.
- **Developers & AI builders** who need prediction-market data via API.

***

### 🎛️ Options

- **Data Type** — Events (question + priced markets) or Markets (raw contracts).
- **Status** — open, closed, settled, unopened, or all.
- **Series / Event Ticker** — narrow to a series or a single event.
- **Max Items** — cap total items (`0` = unlimited).
- **Proxy** — off by default (a direct connection works best); enable only if needed.

***

### ❓ FAQ

**Do I need an account or API key?**
No. Choose your filters and run — no login, no key.

**How do I read the prices?**
Prices are in dollars from 0 to 1 — 0.55 means 55¢, i.e. a 55% implied probability. The `impliedProbabilityPct` field gives you that percentage directly.

**What is the difference between Events and Markets?**
An **event** is a question (e.g. "Who wins the election?") that contains one or more **markets** (the individual yes/no contracts). Events give you the questions with their priced markets nested inside; Markets gives you the raw contracts.

**Can I get settled outcomes?**
Yes — set **Status** to `settled` to collect resolved events and their results, useful for backtesting.

**Can I limit to one topic?**
Use a **Series Ticker** (or **Event Ticker**) to narrow to a specific series or event.

**What export formats are supported?**
JSON, CSV, Excel, HTML table, RSS, and the Apify API. Connect to Make, Zapier, Google Sheets, Slack, webhooks or an MCP server.

**Is the data structured and clean?**
Yes. Each event is a flat JSON object with its markets nested, de-duplicated by ticker, with prices parsed to numbers and probabilities computed.

***

### 🔌 Integrations

- Export to **JSON, CSV, Excel, HTML, RSS**.
- Pull via the **Apify API** or client libraries (JavaScript, Python).
- Connect to **Make, Zapier, Google Sheets, Slack, webhooks** and more.
- Use from an **MCP server** in your AI agent / LLM workflow.
- Schedule recurring runs with the **Apify Scheduler** to track probabilities over time.

***

### ⚖️ Legal & responsible use

This scraper collects **publicly available** market data only — the same prices and market information any visitor can see on Kalshi without logging in. It does not place trades, access accounts, or touch anything behind authentication.

You are responsible for how you use the collected data. Please:

- Respect Kalshi's Terms of Service and all applicable laws and regulations.
- Use market data lawfully; nothing here is financial advice.
- Avoid excessive request rates and scrape responsibly.

This tool is provided for lawful purposes such as research, analysis and building data products. It is not affiliated with, endorsed by, or connected to Kalshi.

# Actor input Schema

## `dataType` (type: `string`):

Scrape 'events' (a question with its priced nested yes/no markets — recommended) or raw 'markets' (individual contracts).

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

Filter by status. 'open' = tradeable now.

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

Limit to one series, e.g. 'KXHIGHNY' (NYC high temp) or a politics/econ series ticker. Leave empty for all.

## `eventTicker` (type: `string`):

Limit to a single event's markets by its event ticker. Leave empty for all.

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

Maximum number of markets/events to collect. 0 = unlimited.

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

Leave OFF for a direct connection (recommended — Kalshi rejects many shared proxy IPs). Enable only if you specifically need a proxy.

## Actor input object example

```json
{
  "dataType": "events",
  "status": "open",
  "maxItems": 500,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Open to view and export all scraped markets/events (JSON, CSV, Excel).

# 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 = {
    "dataType": "events",
    "status": "open",
    "seriesTicker": "",
    "eventTicker": "",
    "maxItems": 500,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/kalshi-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 = {
    "dataType": "events",
    "status": "open",
    "seriesTicker": "",
    "eventTicker": "",
    "maxItems": 500,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/kalshi-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 '{
  "dataType": "events",
  "status": "open",
  "seriesTicker": "",
  "eventTicker": "",
  "maxItems": 500,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call haketa/kalshi-scraper --silent --output-dataset

```

## MCP server setup

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