# Polymarket & Kalshi Prediction Market Scraper (`teodor_banea/polymarket-kalshi-prediction-market-scraper`) Actor

Scrape live prediction market odds from Polymarket and Kalshi in one normalized dataset: prices, implied probability, bid/ask, volume, liquidity, close dates, and settled winners. Search by keyword; filter by category, status, volume, or end date. Fast public-API scraping — no browser, no login.

- **URL**: https://apify.com/teodor\_banea/polymarket-kalshi-prediction-market-scraper.md
- **Developed by:** [Banea Teodor](https://apify.com/teodor_banea) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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?

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

## Polymarket & Kalshi Prediction Market Scraper

### What does Polymarket & Kalshi Prediction Market Scraper do?

This Actor extracts live prediction market data from **[Polymarket](https://polymarket.com)** and **[Kalshi](https://kalshi.com)** — the two largest prediction markets — and delivers it as one clean, normalized dataset. Every row is one market with its current odds, implied probability, bid/ask, volume, liquidity, category, close date, and resolution rules. Both platforms come back in the same shape, so comparing odds across them needs no cleanup at all.

It talks directly to the platforms' public JSON APIs — no browser, no screenshots, no flaky selectors — which makes runs fast, cheap, and stable.

### Why use this Actor?

- **Two platforms, one schema** — Polymarket and Kalshi rows share the exact same field set. Filter `platform` and compare the same question's odds side by side.
- **The data points that matter** — implied probability, yes/no prices, best bid/ask, spread, last trade, 24h and total volume, open interest, settlement results, and full resolution rules.
- **Search and filter server-smart** — keyword search uses Polymarket's own relevance ranking; Kalshi is scanned and matched word by word. Filter by category, volume, liquidity, or close-date window.
- **Resolved markets included** — pull settled markets with final prices and the winning outcome, ready for backtesting and model calibration.
- **Built for pipelines** — every row always has every field (null when a platform doesn't provide it), ISO 8601 dates, numeric types, absolute URLs.

### How much does it cost?

You pay per market returned. A run with `maxMarkets: 200` returns up to 200 markets and typically finishes in well under a minute. A daily snapshot of the top 500 markets of both platforms costs a few cents per day. Use `maxMarkets` to put a hard ceiling on any run — unlimited runs without narrowing filters are automatically capped at 10,000 markets.

### Input

| Field | Type | Description | Example |
|---|---|---|---|
| `platforms` | array | Which platforms to scrape (`polymarket`, `kalshi`). Both by default; the result cap is split evenly. | `["polymarket", "kalshi"]` |
| `searchQuery` | string | Keyword search. Polymarket is searched server-side by relevance; Kalshi is matched on question, event title, and outcome. | `"bitcoin"` |
| `category` | string | Category/tag filter, case-insensitive substring (`politics`, `sports`, `crypto`, `economics`, `weather`, …). | `"weather"` |
| `status` | string | `active` (trading now, default), `resolved` (settled, with final prices and winners), or `all`. | `"active"` |
| `minVolume` | integer | Skip markets with total volume below this (USD on Polymarket, contracts on Kalshi). | `1000` |
| `minLiquidity` | integer | Skip markets with liquidity below this (USD). Polymarket only — Kalshi does not publish liquidity. | `500` |
| `endingAfter` / `endingBefore` | date | Only markets closing inside this window — e.g. everything that resolves this week. | `"2026-09-01"` |
| `maxMarkets` | integer | Hard cap on returned markets (= billed results). | `200` |

An **empty input works**: it returns the top active markets of both platforms, ordered by 24-hour volume on Polymarket.

### Output

One row per market:

```json
{
    "platform": "kalshi",
    "marketId": "KXBTCD-26AUG28-T85000",
    "question": "Will Bitcoin be above $85,000 by Aug 28, 2026 at 11:59 PM ET?",
    "eventId": "KXBTCD-26AUG28",
    "eventTitle": "Bitcoin above $85,000?",
    "seriesTicker": "KXBTCD",
    "outcomeLabel": null,
    "outcomes": ["Yes", "No"],
    "outcomePrices": [0.02, 0.98],
    "yesPrice": 0.02,
    "noPrice": 0.98,
    "yesBid": 0.01,
    "yesAsk": 0.02,
    "spread": 0.01,
    "lastTradePrice": 0.02,
    "priceChange24h": null,
    "probability": 2,
    "volume": 168340.25,
    "volume24h": 4120.5,
    "liquidity": null,
    "openInterest": 52310.75,
    "category": "Financials",
    "tags": ["Financials"],
    "status": "active",
    "result": null,
    "createdAt": "2026-08-21T14:00:00Z",
    "endDate": "2026-08-29T03:59:00Z",
    "url": "https://kalshi.com/markets/kxbtcd",
    "image": null,
    "rules": "If the price of Bitcoin is above $85,000 at the expiration time, then the market resolves to Yes.",
    "scrapedAt": "2026-08-27T14:30:00.000Z",
    "runId": "AbC123..."
}
```

Field notes:

- **Prices** are USD per share (0–1); a share pays $1 if the market resolves in its favor. `probability` is the yes/first-outcome price × 100.
- **`volume`** is platform-native: USD on Polymarket, contracts on Kalshi (each contract pays $1 max, so the scales are comparable).
- **`result`** — Kalshi's official settlement, or the winning outcome of a resolved Polymarket market derived from its settled prices.
- **Sports markets** on Polymarket trade team-vs-team (e.g. `outcomes: ["Vitality", "9z"]`) — `yesPrice`/`noPrice` are null there and `outcomePrices` carries both sides.
- Fields a platform doesn't provide are `null`, never omitted: `openInterest` and `seriesTicker` are Kalshi-only; `liquidity`, `priceChange24h`, and `image` are Polymarket-only.

### Tips and tricks

- **Track odds over time**: schedule the Actor (e.g. hourly) with the same input and diff snapshots by `marketId` — `runId` and `scrapedAt` on every row keep runs apart after export.
- **Cross-platform comparison**: search the same topic (e.g. `"fed rate"`) with both platforms enabled and join on the question text — price differences between Polymarket and Kalshi are visible immediately.
- **"What resolves this week"**: set `endingBefore` seven days out with `status: "active"`.
- **Skip dead markets**: `minVolume: 1000` removes markets nobody trades.
- **Kalshi ordering**: Kalshi has no server-side sort, so its rows arrive in exchange order — use `minVolume` or a category to focus its half of the results. Polymarket rows arrive ordered by 24-hour volume.
- **Backtesting**: `status: "resolved"` returns settled markets with final prices and winners.

### Integrations

The dataset works with every Apify integration: export to **JSON, CSV, Excel**, push to **Google Sheets**, trigger **webhooks** on finish, or query via the **Apify API** from Python/Node. Typical setups: a scheduled run feeding a Google Sheet dashboard of weekly odds, or the [Apify API](https://docs.apify.com/api/v2) pulling fresh markets into a trading-signal pipeline.

# Actor input Schema

## `platforms` (type: `array`):

Select which prediction market platforms to scrape. Both are selected by default and the result cap is split evenly between them.

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

Enter keywords to search markets (e.g. "bitcoin", "fed rate", "champions league"). Polymarket is searched server-side by relevance; Kalshi markets are matched on question, event title, and outcome — every word must appear.

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

Filter markets by category or tag, matched case-insensitively as a substring (e.g. "politics", "sports", "crypto", "economics", "weather"). Leave empty for all categories.

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

Choose which markets to return: currently trading, already resolved (with final prices), or both.

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

Skip markets with total volume below this value (USD on Polymarket, contracts on Kalshi). Use it to drop dead markets nobody trades.

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

Skip markets with liquidity below this value in USD. Polymarket only — Kalshi does not publish liquidity, so setting this limits the run to Polymarket.

## `endingAfter` (type: `string`):

Only include markets that close on or after this date. Useful for skipping markets that are about to end.

## `endingBefore` (type: `string`):

Only include markets that close on or before this date (inclusive). Useful for "what resolves this week" runs.

## `maxMarkets` (type: `integer`):

Cap on how many markets are returned in total (split evenly when both platforms are selected). Set to 0 for unlimited — unlimited runs without narrowing filters are capped at 10,000 to protect against surprise bills.

## `maxConcurrency` (type: `integer`):

How many requests run in parallel. Each platform paginates sequentially, so the default of 2 is already optimal — raise it only if retries pile up.

## `maxRequestsPerMinute` (type: `integer`):

Throttle the overall request rate. Both APIs tolerate the default comfortably.

## Actor input object example

```json
{
  "platforms": [
    "polymarket",
    "kalshi"
  ],
  "searchQuery": "bitcoin",
  "status": "active",
  "minVolume": 0,
  "minLiquidity": 0,
  "maxMarkets": 50,
  "maxConcurrency": 2,
  "maxRequestsPerMinute": 60
}
```

# Actor output Schema

## `results` (type: `string`):

Prediction markets with prices, implied probability, bid/ask, volume, liquidity, category, status, close date, and resolution rules — normalized across Polymarket and Kalshi.

# 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 = {
    "searchQuery": "bitcoin",
    "maxMarkets": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("teodor_banea/polymarket-kalshi-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 = {
    "searchQuery": "bitcoin",
    "maxMarkets": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("teodor_banea/polymarket-kalshi-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 '{
  "searchQuery": "bitcoin",
  "maxMarkets": 50
}' |
apify call teodor_banea/polymarket-kalshi-prediction-market-scraper --silent --output-dataset

```

## MCP server setup

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