# 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

$3.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 📊

**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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Prediction Market Scanner — Polymarket vs Kalshi",
        "description": "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.",
        "version": "0.1",
        "x-build-id": "vCYJdLihPtmVCE8WE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/0xgollum~prediction-market-scanner/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-0xgollum-prediction-market-scanner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/0xgollum~prediction-market-scanner/runs": {
            "post": {
                "operationId": "runs-sync-0xgollum-prediction-market-scanner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/0xgollum~prediction-market-scanner/run-sync": {
            "post": {
                "operationId": "run-sync-0xgollum-prediction-market-scanner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "query": {
                        "title": "Topic to scan",
                        "type": "string",
                        "description": "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": {
                        "title": "Platforms",
                        "type": "array",
                        "description": "Which platforms to compare. Comparison requires both 'polymarket' and 'kalshi'.",
                        "default": [
                            "polymarket",
                            "kalshi"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "min_similarity": {
                        "title": "Minimum title similarity to pair markets",
                        "minimum": 0,
                        "maximum": 1,
                        "type": "number",
                        "description": "How similar two market titles must be before they are treated as the same question. Higher = stricter (fewer, more confident pairs).",
                        "default": 0.62
                    },
                    "min_gap_pts": {
                        "title": "Minimum YES-price gap (percentage points)",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "number",
                        "description": "Only report pairs where the two platforms' YES prices differ by at least this many points. 0 = report every comparable pair.",
                        "default": 0
                    },
                    "max_results": {
                        "title": "Max comparisons returned",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Cap on the number of cross-platform comparisons returned per run.",
                        "default": 50
                    },
                    "max_markets_per_platform": {
                        "title": "Max markets fetched per platform",
                        "minimum": 10,
                        "maximum": 300,
                        "type": "integer",
                        "description": "Upper bound on markets pulled from each platform before pairing.",
                        "default": 100
                    },
                    "include_unpaired": {
                        "title": "Include single-platform markets",
                        "type": "boolean",
                        "description": "If true, also return markets found on only one platform (full topic data). If false, return only cross-platform 'versus' comparisons.",
                        "default": true
                    },
                    "request_timeout_secs": {
                        "title": "Request timeout (seconds)",
                        "minimum": 5,
                        "maximum": 60,
                        "type": "integer",
                        "description": "HTTP request timeout.",
                        "default": 30
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
