# Kalshi Scraper — Markets, Odds, Volume & Order Books (`pixflor/kalshi-markets-scraper`) Actor

Export live Kalshi prediction-market data as clean rows: title, Yes/No prices, implied probability, spread, 24h volume, open interest, category and close date. Returns actively traded markets, not dead auto-generated ones.

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

## Pricing

from $2.00 / 1,000 market scrapeds

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

## Kalshi Scraper — Markets, Odds, Volume & Order Books

Export live markets from Kalshi, the CFTC-regulated prediction exchange, as clean
spreadsheet rows: the question, the price, implied probability, spread, 24-hour volume,
open interest, category and close date.

No API key. No account. No wallet. Set a filter, press start, export CSV or JSON.

***

### Why this one returns markets you can actually use

Kalshi's public market list is dominated by **auto-generated multi-game combo contracts**
that never trade. Measured on 31 July 2026: paging the flat market endpoint returned
**3,000 markets with zero 24-hour volume, no order books and no category.**

This Actor walks Kalshi's *events* instead, which is where the real exchange lives. Same
measurement, same day: **6,755 markets, 943 with live 24-hour volume, 4,219 with open
interest — every one carrying a real category.**

Kalshi's API also offers no sort parameter, so this Actor collects a scan window and ranks
it before returning. Ask for the 100 most-traded markets and you get 100 traded markets,
not the first 100 the API happened to emit.

***

### What you get

| Column | Example |
|---|---|
| `title` | Will SPD win the next German election? |
| `category` | Elections |
| `midPrice` | `0.095` |
| `impliedProbability` | `9.5` |
| `yesBid` / `yesAsk` / `spread` | `0.09` / `0.10` / `0.01` |
| `volume24h` / `volume` | `8418` |
| `openInterest` | `31204` |
| `liquidity` | `4820.50` |
| `closeTime` | `2030-03-25T14:00:00Z` |
| `rulesPrimary` | full settlement rules text |
| `url` | direct link to the market |

Prices are always normalised to **dollars (0–1)**, so a row never mixes cents and dollars.
Enable **Include order book depth** and each market also carries live Yes/No bid ladders,
best price first.

***

### Typical uses

- **Track a topic.** Schedule hourly on `searchQuery: "fed"` and build a probability series.
- **Screen for what's live.** Sort by open interest — the better liveness signal on Kalshi,
  since many real markets hold open positions without trading today.
- **Compare venues.** Pair with a Polymarket export to line the two exchanges up.
- **Backtest.** Set status to *Settled* and pull resolved markets with their outcomes.
- **Watchlist.** Pass exact `tickers` and get just those, every run.

***

### Example input

```json
{
  "mode": "markets",
  "status": "open",
  "sortBy": "volume24h",
  "category": "Economics",
  "minOpenInterest": 100,
  "maxItems": 200
}
```

Watchlist — only these contracts, filters ignored:

```json
{
  "mode": "markets",
  "tickers": ["KXGERELECTION-29MAR25-SPD"],
  "includeOrderBook": true,
  "orderBookDepth": 10
}
```

Grouped view — one row per event with every contract nested inside:

```json
{ "mode": "events", "status": "open", "category": "Politics", "maxItems": 50 }
```

***

### Settings that matter

- **`sortBy`** — the whole point. `volume24h` for what's trading now, `openInterest` for what
  people actually hold, `closeTime` for what resolves soonest.
- **`minOpenInterest`** — the single most useful filter for cutting dormant contracts.
- **`category`** — Politics, Elections, Economics, Financials, Sports, Companies, Climate and
  Weather, Entertainment, Health, Science and Technology, World, Social, Transportation.
- **`maxItems`** — your cost ceiling. Set it deliberately.
- **`useFlatMarketList`** — off by default, and it should stay off. It enumerates every
  contract including the dead auto-generated ones. Only turn it on if that is genuinely
  what you want.

***

### Pricing

Pay per event — you pay for rows returned, not for runtime.

| Event | Price |
|---|---|
| Actor start | $0.002 per run |
| Market or event row | $0.0015 each |
| Order book (per market) | $0.0008 each |

**1,000 markets ≈ $1.50.** Order books are only charged when you switch them on.

***

### Reliability

Plain HTTP against Kalshi's documented public API — no headless browser, no bot-detection
workarounds. Runs are fast and cheap, and the Actor doesn't break when a web page changes.

Every request retries with exponential backoff, and a failed page degrades the run instead
of ending it. If your filters match nothing, the log tells you which filter to loosen rather
than handing back a silent empty dataset.

***

### Notes

- Data comes from Kalshi's public trade API and is provided **as-is for research and
  analysis**. It is not financial advice and carries no warranty of accuracy or timeliness.
- A row is a snapshot at `scrapedAt`, not a live feed. Schedule the Actor if you need a series.
- Many Kalshi markets legitimately have zero 24-hour volume. That is the market, not a bug —
  use `minOpenInterest` to filter for the ones with real positions behind them.
- Kalshi restricts trading by jurisdiction. Reading public market data is a separate matter
  from trading; check your local rules before acting on anything here.

***

### Questions or a bug?

Open an issue on the **Issues** tab with your input JSON and the run ID — that is usually
enough to reproduce it straight away.

# Actor input Schema

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

Markets returns one row per tradable contract. Events groups related contracts under one headline (e.g. a race with many candidates).

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

Open markets are still trading. Closed and settled markets are useful for backtesting.

## `sortBy` (type: `string`):

Kalshi's API has no sort parameter, so results are collected and ranked before being returned. This is what puts genuinely active markets at the top.

## `category` (type: `string`):

Filter by Kalshi category, e.g. Politics, Elections, Economics, Financials, Sports, Companies, Climate and Weather, Entertainment, Health, Science and Technology.

## `searchQuery` (type: `string`):

Only return markets whose title, subtitle, ticker or rules contain this text. Case-insensitive.

## `tickers` (type: `array`):

Fetch only these exact market tickers. When set, all other filters are ignored — this is watchlist mode.

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

Restrict to a single Kalshi series, e.g. KXFED. Leave empty to scan all series.

## `minVolume24h` (type: `integer`):

Only markets that actually traded in the last 24 hours. Set this to 1 to drop dormant markets entirely.

## `minOpenInterest` (type: `integer`):

Open interest is the better liveness signal on Kalshi — many real markets have open positions but no trades today.

## `minLiquidity` (type: `integer`):

Skip thin markets. Note that open interest is usually the better liveness filter on Kalshi.

## `closesBefore` (type: `string`):

Only markets closing before this date (YYYY-MM-DD).

## `closesAfter` (type: `string`):

Only markets closing after this date (YYYY-MM-DD).

## `includeOrderBook` (type: `boolean`):

Adds live Yes/No bid ladders per market. Slower and charged separately — leave off unless you need depth.

## `orderBookDepth` (type: `integer`):

How many price levels per side to return when order books are enabled. Best prices first.

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

Hard cap on rows returned. This is your cost ceiling.

## `useFlatMarketList` (type: `boolean`):

Off by default for a reason. Kalshi's flat /markets endpoint is dominated by inactive auto-generated combo markets with no volume and no category. Only enable this if you specifically need to enumerate every contract including dormant ones.

## Actor input object example

```json
{
  "mode": "markets",
  "status": "open",
  "sortBy": "volume24h",
  "category": "Economics",
  "searchQuery": "fed",
  "tickers": [],
  "minVolume24h": 0,
  "minOpenInterest": 0,
  "minLiquidity": 0,
  "includeOrderBook": false,
  "orderBookDepth": 5,
  "maxItems": 100,
  "useFlatMarketList": 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("pixflor/kalshi-markets-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("pixflor/kalshi-markets-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 pixflor/kalshi-markets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pixflor/kalshi-markets-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/ck5gwRafPLyb000oT/builds/89IFZ0vgbZReGB4Dc/openapi.json
