# Kalshi Scraper (`tortuga/kalshi-scraper`) Actor

Kalshi prediction markets and events from the public market data API: tickers, title, category, status, yes/no bid and ask, last price, volume, open interest, close and expiration times, rules. Optional price history and recent trades. No key or login.

- **URL**: https://apify.com/tortuga/kalshi-scraper.md
- **Developed by:** [Trevor Ortega](https://apify.com/tortuga) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 markets

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?

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 and Volume

Kalshi Scraper exports prediction markets and events from Kalshi's public market data API: event and market tickers, title, category, status, yes and no bid and ask prices, last price, volume, open interest, open, close and expiration times, and the rules summary. Optional price history (candles) and recent trades. No Kalshi account, no API key.

### What data does Kalshi Scraper extract?

| Field | Description |
|---|---|
| `ticker`, `eventTicker`, `seriesTicker` | Kalshi identifiers |
| `title`, `subtitle`, `eventTitle`, `category` | What the market asks, which outcome it is, and its category |
| `status`, `result` | Market status (active, closed, finalized) and the result once settled |
| `yesBid`, `yesAsk`, `noBid`, `noAsk` | Top of book prices in dollars (0 to 1) |
| `yesBidSize`, `yesAskSize` | Contracts available at the best yes bid and ask |
| `lastPrice`, `previousPrice`, `impliedProbability` | Last trade price (also the implied probability) |
| `volume`, `volume24h`, `openInterest` | Contracts traded in total, in 24 hours, and open |
| `openTime`, `closeTime`, `expirationTime` | ISO 8601 UTC times |
| `rulesPrimary`, `rulesSecondary` | The market rules text |
| `priceHistory` (optional) | Candles: time, open, high, low, close, mean, volume, open interest, yes bid and ask close |
| `recentTrades` (optional) | Trade id, time, yes price, no price, contracts, taker side |
| `url` | The Kalshi series page |

Event rows (`resultType: events`) carry the event title, category, market count, total volume and a short list of its markets.

### How to use Kalshi Scraper

1. Enter **Search keywords** (for example `fed`, `pope`, `bitcoin`), or a **Category**, or paste Kalshi **URLs or tickers**. Leave all empty to browse open markets.
2. Pick **Status**, **Result type** and optional extras (price history, trades).
3. Set **Max items** and click **Start**. Export the dataset as JSON, CSV or Excel, or call it through the API.

Keyword and category searches read Kalshi's event list page by page and match event titles, subtitles, tickers and categories, so a rare keyword can take a minute or two on a full scan (the run stops after 150 pages).

### Input example

```json
{
  "searchTerms": ["fed"],
  "status": "open",
  "resultType": "markets",
  "includePriceHistory": true,
  "priceHistoryDays": 7,
  "maxItems": 20
}
```

### Output example

```json
{
  "type": "market",
  "ticker": "KXGDPYEAR-36-T0.1",
  "eventTicker": "KXGDPYEAR-36",
  "title": "GDP growth in 2036?",
  "subtitle": "0.0% or Below",
  "category": "Economics",
  "status": "active",
  "yesBid": 0.05,
  "yesAsk": 0.06,
  "lastPrice": 0.06,
  "volume": 9437.65,
  "openInterest": 972.53,
  "closeTime": "2037-12-31T13:29:00Z",
  "url": "https://kalshi.com/markets/kxgdpyear"
}
```

### Pricing

Pay per result: $1.50 per 1,000 rows (a market or an event). Price history and trades are included for the same price. Volume discounts apply on Apify paid plans.

### Monitor changes on a schedule

Turn on **Only new or changed items** and schedule the Actor in Apify. Each run remembers the markets it returned and outputs only new ones and ones whose status, result or close time changed; unchanged markets are not charged. Rows get `changeType` (`new` or `changed`) and `previousValues`. Price moves do not count as changes. Use **Monitoring key** to keep several schedules on the same search apart.

### FAQ

**Do I need a Kalshi account or API key?** No. The Actor reads the public market data endpoints only.

**Why no liquidity field?** Kalshi's public API no longer publishes a liquidity number. Use `yesBidSize`, `yesAskSize`, `volume` and `openInterest` instead.

**Are prices in cents or dollars?** Dollars between 0 and 1. A `lastPrice` of 0.62 means a 62 percent implied probability.

**How do I scrape Kalshi markets for one topic?** Use a keyword or a category, for example `Economics`, `Politics` or `Crypto`.

**Proxy note.** Kalshi's market data API works from Apify datacenter IPs, the default. Platform usage is under 10 percent of the price, so it is included in the per-result price.

### Is it legal to scrape Kalshi?

The Actor collects public market data that Kalshi serves without a login. You are responsible for how you use the data and for complying with Kalshi's terms and applicable law. This is not financial advice.

### Support

Found a bug or need a field added? Open an issue in the **Issues** tab.

# Actor input Schema

## `searchTerms` (type: `array`):

Find markets by keyword, for example fed, pope, bitcoin or election. Matched against event titles, subtitles, tickers and categories. Leave empty to browse. A single text value is accepted too.

## `startUrls` (type: `array`):

kalshi.com/markets/... links (the last path part is the event ticker), or plain tickers such as KXNEWPOPE-70.

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

Only events in this Kalshi category, for example Politics, Economics, Crypto, Sports, Elections, Financials, Climate and Weather, Entertainment or Science and Technology.

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

Which markets to return.

## `resultType` (type: `string`):

One row per market (a single question with its yes/no prices), or one row per event (a group of related markets with a summary of each).

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

Skip markets with fewer traded contracts in total.

## `includePriceHistory` (type: `boolean`):

Adds priceHistory (candles with open, high, low, close, volume, open interest) to market rows. One extra request per market.

## `priceHistoryDays` (type: `integer`):

How many days back the price history goes.

## `priceHistoryInterval` (type: `string`):

Length of one candle.

## `includeTrades` (type: `boolean`):

Adds recentTrades (time, yes price, no price, contracts, taker side) to market rows. One extra request per market.

## `maxTradesPerMarket` (type: `integer`):

How many recent trades to attach to each market row (1 to 1000).

## `onlyNewOrChanged` (type: `boolean`):

Remember what earlier runs of this search returned and output only new items or items whose status, result or close time changed. Use with a Schedule; unchanged items are not charged.

## `monitoringKey` (type: `string`):

Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input.

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

Stop after this many rows. Keeps cost predictable.

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

Kalshi's market data API is public and works from Apify datacenter IPs.

## Actor input object example

```json
{
  "searchTerms": [
    "fed"
  ],
  "status": "open",
  "resultType": "markets",
  "includePriceHistory": false,
  "priceHistoryInterval": "hour",
  "includeTrades": false,
  "onlyNewOrChanged": false,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "searchTerms": [
        "fed"
    ],
    "status": "open",
    "resultType": "markets",
    "includePriceHistory": false,
    "priceHistoryInterval": "hour",
    "includeTrades": false,
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tortuga/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 = {
    "searchTerms": ["fed"],
    "status": "open",
    "resultType": "markets",
    "includePriceHistory": False,
    "priceHistoryInterval": "hour",
    "includeTrades": False,
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("tortuga/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 '{
  "searchTerms": [
    "fed"
  ],
  "status": "open",
  "resultType": "markets",
  "includePriceHistory": false,
  "priceHistoryInterval": "hour",
  "includeTrades": false,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call tortuga/kalshi-scraper --silent --output-dataset

```

## MCP server setup

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