# Prediction Market Scanner — Polymarket vs Kalshi (`0xgollum/prediction-market-scanner`) Actor

Search any topic and get live binary markets from Polymarket and Kalshi side by side — YES/NO prices, volume and links. Pairs the same yes/no question across both platforms and shows how their odds diverge.

- **URL**: https://apify.com/0xgollum/prediction-market-scanner.md
- **Developed by:** [0xGollum](https://apify.com/0xgollum) (community)
- **Categories:** Developer tools, Automation, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 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/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

## Prediction Market Scanner — Polymarket vs Kalshi 📊

### Changelog

- **2026-07-29** — Reliability fix: runs launched via API/integrations with unset optional fields sent as `null` could fail outright instead of using the documented defaults. Fixed, covered by tests.

**Search any topic and get the live binary (yes/no) markets from both Polymarket and Kalshi in one dataset — side by side, with the price gap between the two platforms.**

### Why compare the two platforms?

Polymarket and Kalshi are the two biggest prediction markets, and they price the **same** real-world questions independently — "Will there be a government shutdown?", "Will X win the election?", "Who wins the Nobel Peace Prize?". When they disagree, that gap is a signal: an information edge, a liquidity difference, or a mispricing worth a closer look.

Doing this by hand means opening both sites, hunting for the matching market on each, and eyeballing the odds. This actor does it in one query: you give it a topic, it pulls the live markets from **both** platforms, pairs the ones asking the same yes/no question, and shows you exactly how far apart the two platforms are.

### What you get

Two kinds of rows in one dataset:

**`versus` rows** — the same yes/no question found on *both* platforms:

| Field | Description |
|-------|-------------|
| **polymarket\_title / kalshi\_title** | The matched market on each platform |
| **polymarket\_yes / kalshi\_yes** | Live YES price on each platform (0–1) |
| **yes\_gap\_pts** | How far apart the two YES prices are, in percentage points |
| **polymarket\_no / kalshi\_no** | Live NO price on each platform |
| **similarity** | How confidently the two titles were matched (0–1) |
| **polymarket\_volume / kalshi\_volume** | Traded volume on each side |
| **polymarket\_url / kalshi\_url** | Direct links to both markets |

**`single` rows** — markets found on only one platform (full topic coverage, so nothing is hidden). Set `include_unpaired: false` if you only want the cross-platform comparisons.

Rows are sorted by the biggest YES-price gap first — the most interesting divergences on top.

**Zero markets on both platforms = never billed.** You only pay for runs that actually return data.

### How the matching works — read this

Markets are paired by **title similarity**, not by fuzzy price guessing. Two markets are only compared if they genuinely ask the same yes/no question (a strict default similarity of 0.62, tunable). Multi-outcome markets (e.g. Kalshi's "Who will win the Nobel Peace Prize?") are split by candidate so "Zelenskyy" is compared to "Zelenskyy", never to the wrong person. Resolved and illiquid markets (prices stuck at 0 or 1) are dropped so you never see a fake gap.

This is honest, mechanical matching. The `similarity` score is shown on every pair so **you** stay in control — raise `min_similarity` for stricter pairing, lower it for wider coverage.

### Sources

Public, login-free read APIs (no keys required):

- **Polymarket** — Gamma public search + live outcome prices.
- **Kalshi** — public markets API, matched by topic across its market series.

### Use cases

- **Cross-platform edge hunting** — spot where the two markets disagree on the same event.
- **Odds monitoring** — track a topic (election, macro event, award) across both platforms daily.
- **Research & journalism** — cite what prediction markets currently imply, from both venues at once.
- **Model inputs** — feed consolidated yes/no probabilities into your own analysis.
- **Liquidity comparison** — see which platform has more volume on a given question.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| **query** | string | "government shutdown" | Topic to scan (e.g. "presidential election", "recession", "nobel peace prize") |
| **platforms** | array | \["polymarket", "kalshi"] | Platforms to compare (both required for `versus` rows) |
| **min\_similarity** | number | 0.62 | How similar two titles must be to be paired (0–1) |
| **min\_gap\_pts** | number | 0 | Only report pairs whose YES prices differ by at least this many points |
| **include\_unpaired** | boolean | true | Also return single-platform markets (full topic data) |
| **max\_results** | integer | 50 | Cap on rows returned |
| **max\_markets\_per\_platform** | integer | 100 | Markets pulled from each platform before pairing |
| **request\_timeout\_secs** | integer | 30 | HTTP timeout in seconds |

#### Example input

```json
{
  "query": "nobel peace prize",
  "min_similarity": 0.62,
  "min_gap_pts": 2,
  "include_unpaired": false
}
```

### Example output (`versus` row)

```json
{
  "match_type": "versus",
  "query": "nobel peace prize",
  "similarity": 0.701,
  "yes_gap_pts": 2.6,
  "polymarket_title": "Will Pope Leo XIV win the Nobel Peace Prize in 2026?",
  "kalshi_title": "Who will win the Nobel Peace Prize? — Pope Leo XIV",
  "polymarket_yes": 0.044,
  "kalshi_yes": 0.07,
  "polymarket_no": 0.956,
  "kalshi_no": 0.93,
  "polymarket_volume": 18234.0,
  "kalshi_volume": 5120.0,
  "polymarket_url": "https://polymarket.com/event/...",
  "kalshi_url": "https://kalshi.com/markets/..."
}
```

### Tips

- Start broad (`min_gap_pts: 0`) to see everything, then raise it to surface only real divergences.
- If you get too many loose pairs, raise `min_similarity` toward 0.7+.
- Kalshi has no text search, so coverage depends on the topic matching a Kalshi market series — political, economic, crypto and world-event topics have the best overlap with Polymarket.

### Disclaimer

This actor returns live public market data for **informational purposes only**. It is **not** financial, investment or trading advice, and a reported price gap is **not** a guaranteed profit — prices move, liquidity varies, and matched markets may differ in resolution details or timing. Always read both markets' rules before acting. You are responsible for your own decisions and for complying with the terms of each platform and your local laws.

# Actor input Schema

## `query` (type: `string`):

Free-text topic (e.g. 'government shutdown', 'presidential election', 'recession'). The scanner finds binary yes/no markets about it on both Polymarket and Kalshi.

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

Which platforms to compare. Comparison requires both 'polymarket' and 'kalshi'.

## `min_similarity` (type: `number`):

How similar two market titles must be before they are treated as the same question. Higher = stricter (fewer, more confident pairs).

## `min_gap_pts` (type: `number`):

Only report pairs where the two platforms' YES prices differ by at least this many points. 0 = report every comparable pair.

## `max_results` (type: `integer`):

Cap on the number of cross-platform comparisons returned per run.

## `max_markets_per_platform` (type: `integer`):

Upper bound on markets pulled from each platform before pairing.

## `include_unpaired` (type: `boolean`):

If true, also return markets found on only one platform (full topic data). If false, return only cross-platform 'versus' comparisons.

## `request_timeout_secs` (type: `integer`):

HTTP request timeout.

## Actor input object example

```json
{
  "query": "government shutdown",
  "platforms": [
    "polymarket",
    "kalshi"
  ],
  "min_similarity": 0.62,
  "min_gap_pts": 0,
  "max_results": 50,
  "max_markets_per_platform": 100,
  "include_unpaired": true,
  "request_timeout_secs": 30
}
```

# 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 = {
    "query": "government shutdown"
};

// Run the Actor and wait for it to finish
const run = await client.actor("0xgollum/prediction-market-scanner").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 = { "query": "government shutdown" }

# Run the Actor and wait for it to finish
run = client.actor("0xgollum/prediction-market-scanner").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 '{
  "query": "government shutdown"
}' |
apify call 0xgollum/prediction-market-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=0xgollum/prediction-market-scanner",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/LfdKmlsnA8rBjTHSN/builds/oQNwtZ2FRmIWziGWH/openapi.json
