# Polymarket Kalshi Scraper — Sports & Economics (`incognito_mode/prediction-markets-scraper`) Actor

Scrape Polymarket and Kalshi prediction markets in one Actor. Filter by sports, economics/macro, keyword search, or an explicit watchlist. Same flat schema across both platforms, optional price history, no browser.

- **URL**: https://apify.com/incognito_mode/prediction-markets-scraper.md
- **Developed by:** [Elena Vance](https://apify.com/incognito_mode) (community)
- **Categories:** AI, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.

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 Scraper — Sports & Economics

Pull **Polymarket** and **Kalshi** prediction markets into one flat dataset.
Filter by **sports**, **economics / macro**, a **keyword**, or an explicit
**watchlist** of market IDs. Same fields on both platforms so you can compare
prices, volume and end dates without stitching two scrapers.

No browser, no login, no residential proxy. Official public HTTP APIs only.
Export as **JSON, CSV, Excel, XML or HTML**, or pull through the Apify API.

**From about $3 per 1,000 markets.** Optional price-history add-on. See
[Pricing](#pricing).

### Why this Actor

Most Store Actors dump “all markets” from one exchange. This one is built for
vertical monitoring:

- **Sports** — games, awards, season props (join later with odds Actors).
- **Economics** — Fed, CPI, recession, jobs and other macro markets.
- **Watchlist** — specific Polymarket slugs/ids or Kalshi tickers on a schedule.
- **Keyword** — quick cross-platform search (e.g. `Fed`, `NBA`, `recession`).

### What you get

| Field | Example |
| --- | --- |
| platform | polymarket / kalshi |
| marketId | 608540 / KXNFLSEED-27NFC6-WAS |
| title | Will LeBron James retire before next NBA season? |
| category | Sports / Economics |
| status | open |
| lastPrice / bestBid / bestAsk | 0.12 / 0.11 / 0.13 |
| outcomes / prices | \["Yes","No"] / \[0.12, 0.88] |
| volume / volume24h | numbers when the venue publishes them |
| endDate | ISO timestamp |
| url | Public market page |
| priceHistory | Optional `[{ t, p }, …]` |

### How to use it

**Sports markets today (both platforms):**

```json
{
  "mode": "sports",
  "platforms": ["polymarket", "kalshi"],
  "maxItems": 50
}
```

**Economics / macro watch:**

```json
{
  "mode": "economics",
  "platforms": ["polymarket", "kalshi"],
  "maxItems": 50
}
```

**Watchlist (scheduled monitoring):**

```json
{
  "mode": "watchlist",
  "marketIds": [
    "will-lebron-james-retire-before-next-nba-season",
    "KXNFLSEED-27NFC6-WAS"
  ]
}
```

**Keyword across both books:**

```json
{
  "mode": "keyword",
  "keywords": "Fed",
  "platforms": ["polymarket", "kalshi"],
  "maxItems": 40
}
```

Turn on **Include price history** when you need daily-ish points for charts or
backtests. History uses Polymarket’s CLOB series and Kalshi candlesticks.

### Pricing

Pay per event (typical Store setup):

| Event | What it covers |
| --- | --- |
| `apify-actor-start` | Cheap run start |
| `market` | Each stored market row |
| `price-history` | Only when history is attached |

Failed fetches are not stored and not billed. Raise **Maximum charge per run**
if a large sports card stops early.

### Limits you should know

- Polymarket sports events can nest many outcome markets (awards, player props).
  Cap with **Maximum markets**.
- Kalshi open events are interleaved by category; the Actor scans until your
  cap is filled. Economics mode stays on the **Economics** category unless you
  enable **Include Kalshi Financials**.
- Public APIs can rate-limit; the Actor retries with backoff.

### Ready-made examples

Use the Store example tasks (sports today, economics watchlist, cross-platform
keyword) — open one, press **Try for free**, tweak the input.

### Related Actors

If you already use sports odds scrapers (Flashscore / Sofascore), the sports
mode here is meant for **fair-odds vs prediction-market** joins on titles and
end dates — same owner catalog where available.

### Disclaimer

This Actor reads publicly available market metadata for research and monitoring.
It does not place trades, bypass venue terms, or provide financial advice.
Respect Polymarket and Kalshi terms of use and applicable law in your
jurisdiction.

# Changelog

This Actor's version history is a separate document: https://apify.com/incognito_mode/prediction-markets-scraper/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Sports and economics pull vertical cuts from both platforms. Watchlist resolves explicit Polymarket slugs/ids or Kalshi tickers. Keyword searches titles across the selected platforms.

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

Which exchanges to include. Both use official public HTTP APIs.

## `keywords` (type: `string`):

Required for keyword mode. Matched against market and event titles (case-insensitive).

## `marketIds` (type: `array`):

Polymarket market slugs or numeric ids, and/or Kalshi market tickers. Used when mode is watchlist.

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

Hard cap on stored market rows across every selected platform.

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

Attach daily-ish price points (Polymarket CLOB history / Kalshi candlesticks). Billed as a separate price-history event when monetized.

## `includeFinancials` (type: `boolean`):

When mode is economics, also keep Kalshi series in the Financials category (FX/index micro-markets). Off by default so economics stays macro-focused.

## `polymarketTags` (type: `array`):

Override the default tag slugs for sports/economics modes. Examples: sports, economy, fed-rates.

## `kalshiCategories` (type: `array`):

Override the default Kalshi event categories. Examples: Sports, Economics, Financials.

## Actor input object example

```json
{
  "mode": "sports",
  "platforms": [
    "polymarket",
    "kalshi"
  ],
  "keywords": "Fed",
  "marketIds": [
    "will-lebron-james-retire-before-next-nba-season",
    "KXNFLSEED-27NFC6-WAS"
  ],
  "maxItems": 50,
  "includePriceHistory": false,
  "includeFinancials": false
}
```

# Actor output Schema

## `markets` (type: `string`):

No description

## `summary` (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 = {
    "mode": "sports",
    "platforms": [
        "polymarket",
        "kalshi"
    ],
    "keywords": "Fed",
    "marketIds": [
        "will-lebron-james-retire-before-next-nba-season",
        "KXNFLSEED-27NFC6-WAS"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("incognito_mode/prediction-markets-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 = {
    "mode": "sports",
    "platforms": [
        "polymarket",
        "kalshi",
    ],
    "keywords": "Fed",
    "marketIds": [
        "will-lebron-james-retire-before-next-nba-season",
        "KXNFLSEED-27NFC6-WAS",
    ],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("incognito_mode/prediction-markets-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 '{
  "mode": "sports",
  "platforms": [
    "polymarket",
    "kalshi"
  ],
  "keywords": "Fed",
  "marketIds": [
    "will-lebron-james-retire-before-next-nba-season",
    "KXNFLSEED-27NFC6-WAS"
  ],
  "maxItems": 50
}' |
apify call incognito_mode/prediction-markets-scraper --silent --output-dataset

```

## MCP server setup

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