# Polymarket & Kalshi Prediction Markets Scraper (`whthpnd/polymarket-kalshi-prediction-markets`) Actor

Unified, proxy-free prediction markets scraper for Polymarket and Kalshi. Extract live event odds, implied probabilities, 24h trading volume, liquidity, open interest, and nested outcomes in clean normalized JSON.

- **URL**: https://apify.com/whthpnd/polymarket-kalshi-prediction-markets.md
- **Developed by:** [DirectAPI Labs](https://apify.com/whthpnd) (community)
- **Categories:** News, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 1,000 result items

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

## Polymarket & Kalshi Prediction Markets Scraper

Unified, **proxy-free** prediction markets data API (`256 MB` RAM) combining live event odds, implied probabilities, trading volumes, liquidity, and nested market outcomes from both **Polymarket** and **Kalshi** in one consistent schema.

### Why Use This Actor?

- **Two Leading Prediction Exchanges in One Schema:** Query `polymarket` (Gamma API) and `kalshi` (official Trade API v2) concurrently without maintaining two separate parsers.
- **Arbitrage & Quantitative Ready:** Normalizes Kalshi's fixed-point dollar prices (`last_price_dollars`, `yes_bid_dollars`, `yes_ask_dollars`, `volume_fp`) and Polymarket's JSON `outcomePrices` into unified `yesPrice` (`0.0`–`1.0`) and `impliedProbabilityPct` (`0`–`100%`) fields.
- **Sub-Market Breakdown Included:** Inspect both the highest-volume representative market (`topMarketQuestion`) and up to `10` nested sub-markets in `markets`.
- **Ultra-Fast AI Agent / MCP Feed:** Finishes in ~2 seconds on `256 MB` RAM with no browser rendering and no proxy costs.

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `platforms` | Array | `["polymarket", "kalshi"]` | Platforms to include (`polymarket`, `kalshi`). |
| `searchQuery` | String | `""` | Optional keyword filter across event title, category, and top market question. |
| `minVolume` | Integer | `0` | Minimum total event volume filter. |
| `maxEventsPerPlatform` | Integer | `15` | Maximum active events returned per platform (`1`–`200`). |

#### Example Input

```json
{
  "platforms": ["polymarket", "kalshi"],
  "searchQuery": "Fed",
  "minVolume": 10000,
  "maxEventsPerPlatform": 25
}
```

### Output Format

Each dataset item represents one active prediction event:

```json
{
  "platform": "polymarket",
  "eventId": "770450",
  "title": "Fed Decision in December?",
  "category": "Fed",
  "topMarketQuestion": "Will there be no change in Fed interest rates after the December 2026 meeting?",
  "yesPrice": 0.0385,
  "impliedProbabilityPct": 3.85,
  "volumeTotal": 54857173.57,
  "volume24h": 4407430.14,
  "liquidityOrOpenInterest": 3651924.69,
  "marketCount": 4,
  "endDate": "2026-12-10T04:59:00Z",
  "markets": [
    {
      "question": "Will there be no change in Fed interest rates after the December 2026 meeting?",
      "outcomes": ["Yes", "No"],
      "outcomePrices": [0.0385, 0.9615],
      "yesPrice": 0.0385,
      "volume24h": 1920400.12,
      "volumeTotal": 21500320.5,
      "liquidity": 1120400.0
    }
  ],
  "url": "https://polymarket.com/event/fed-decision-in-december-20260729232808632"
}
```

### Pricing & Cost Efficiency

- **Pricing model:** Pay-Per-Event (`$0.00005` per Actor start + `$0.002` per event = `$2.00` per 1,000 events).
- **Compute footprint:** Default `256 MB` RAM (~`$0.0001` platform compute per run) with **no proxies required**.

### Integrations & Automation

Stream live probabilities and spreads into **AI forecasting agents (MCP)**, **n8n**, **Make**, trading signal dashboards, **Google Sheets**, or Python research notebooks via the **Apify REST API**.

### FAQ

**How is `impliedProbabilityPct` calculated?**
It is derived directly from `yesPrice * 100` on the highest-volume active market inside the event (for example, `$0.63` equals `63.0%`).

**Which units are used for `volumeTotal` on each platform?**
Polymarket reports USD volume directly; Kalshi reports contract volume (`volume_fp`, where each binary contract settles at `$1.00`).

**Are closed or settled events included?**
No — only active open events (`closed=false` on Polymarket, `status=open` on Kalshi) are queried.

**Can I run only Polymarket or only Kalshi?**
Yes — pass `["polymarket"]` or `["kalshi"]` in `platforms`.

# Actor input Schema

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

Prediction platforms to scrape (supported: polymarket, kalshi).

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

Optional keyword filter across event title, category, and market question.

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

Only return events with at least this total volume.

## `maxEventsPerPlatform` (type: `integer`):

Maximum number of active events to extract from each selected platform.

## Actor input object example

```json
{
  "platforms": [
    "polymarket",
    "kalshi"
  ],
  "minVolume": 0,
  "maxEventsPerPlatform": 15
}
```

# Actor output Schema

## `markets` (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 = {
    "platforms": [
        "polymarket",
        "kalshi"
    ],
    "maxEventsPerPlatform": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("whthpnd/polymarket-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 = {
    "platforms": [
        "polymarket",
        "kalshi",
    ],
    "maxEventsPerPlatform": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("whthpnd/polymarket-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 '{
  "platforms": [
    "polymarket",
    "kalshi"
  ],
  "maxEventsPerPlatform": 15
}' |
apify call whthpnd/polymarket-kalshi-prediction-markets --silent --output-dataset

```

## MCP server setup

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