Skip to content

About

Polymarket & Kalshi prediction-market data API/dataset: probabilities, volume, price history and resolutions in one table, including the full Kalshi archive. Docs, examples and schemas for the Apify Actor.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polymarket & Kalshi Scraper: Prediction Market Odds & History

▶ Run it on Apify · API docs · Input schema · Output schema · Changelog

Sample output: the busiest Polymarket and Kalshi markets with probability, 24-hour move, volume and closing date

Get prediction market odds from Polymarket and Kalshi in one clean table — the implied probability of every market, bid and ask, 24-hour change, volume, liquidity, open interest, closing time and category. Switch to resolved markets to get the result of each one, add price history (daily over the market's life or hourly for the last week) and the resolution rules.

Both platforms are read through their official public APIs — no account, no login, no browser, no proxy. Runs are fast (a full scan of both platforms takes well under a minute) and cheap.

📚 Full Kalshi history of any series: list a series such as KXFED and get every market it ever had — including the ones Kalshi has moved to its archive — with results and daily price history. For the Fed that is 660 markets from July 2021 to today in under three minutes.

Quick start

Create a free Apify account, copy your API token from Console → Settings → Integrations and export it:

export APIFY_TOKEN="<your Apify API token>"

Python

pip install -U apify-client   # version 3 or newer
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

# maxMarkets (per platform) keeps this demo small — remove it to get everything.
run = client.actor("sports-odds-lab/polymarket-kalshi-odds").call(run_input={
    "platforms": ["polymarket", "kalshi"],
    "status": "open",
    "sortBy": "volume24h",
    "maxMarkets": 5,
})
items = client.dataset(run.default_dataset_id).list_items().items

for m in items:
    print(m["platform"], "|", m["market"][:60], "|", m["outcome"], m["probability"])

Full script: examples/quickstart.py.

JavaScript / Node.js

npm install apify-client
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

// maxMarkets (per platform) keeps this demo small — remove it to get everything.
const run = await client.actor('sports-odds-lab/polymarket-kalshi-odds').call({
  platforms: ['polymarket', 'kalshi'],
  status: 'open',
  sortBy: 'volume24h',
  maxMarkets: 5,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();

for (const m of items) {
  console.log(m.platform, '|', m.market.slice(0, 60), '|', m.outcome, m.probability);
}

Save it as quickstart.mjs (ES modules) — full script: examples/quickstart.mjs.

cURL

curl -s -X POST "https://api.apify.com/v2/acts/sports-odds-lab~polymarket-kalshi-odds/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d @examples/input.json

run-sync-get-dataset-items waits for the run (up to 5 minutes). For long runs start the Actor asynchronously and poll it — see the Apify API docs.

AI agents (MCP)

Expose the Actor as a tool to any MCP client (Claude, Cursor, VS Code…) through the Apify MCP server:

{
  "mcpServers": {
    "polymarket-kalshi": {
      "url": "https://mcp.apify.com?tools=sports-odds-lab/polymarket-kalshi-odds"
    }
  }
}

Sign in with your Apify account when the client asks; the agent then calls the Actor with the same input fields as above.

What you get for each market

  • Market: platform, event ("Fed decision in October?"), the market question, the outcome it refers to ("25 bps decrease", a team, "Above 4.25%"), link, category and tags
  • Price: implied probability (0–1), best bid and ask, spread, last traded price, 24h change
  • Activity: total and 24h volume (USD on Polymarket, contracts on Kalshi), liquidity, open interest (Kalshi)
  • Timing: open time, close time
  • Outcome (resolved markets): the result and when it resolved
  • Price history (optional): probability over time — daily over the market's life (Kalshi: up to a year) or hourly for the last 7 days
  • Rules (optional): the full resolution rules and source

One schema for both platforms, so you can put Polymarket and Kalshi side by side without writing two integrations.

Use cases

  • Trading research and arbitrage — compare the same question on Polymarket and Kalshi, spot the platform that is off, follow the 24h movers
  • Calibration and backtesting — pull resolved markets with their final prices and results and measure how well the crowd forecasts; a whole Kalshi series (every Fed decision since 2021, every daily NYC temperature market) comes with daily price history
  • News and event monitoring — track the probability of elections, Fed decisions, economic releases, geopolitics or company events every hour
  • AI agents and dashboards — a single tool call returns live probabilities for any topic ("what does the market say about…?")
  • Sports — game and championship odds from Kalshi and Polymarket next to your bookmaker data
  • Weather markets — daily temperature and rain brackets on Kalshi with their price history

Using the Apify Console (no code)

  1. Choose the platforms, Open or Resolved markets, and optionally keywords (fed rate, bitcoin, election) or categories.
  2. Pick how to sort (24h volume, total volume, liquidity, closing soonest, newest) and how many markets you want per platform.
  3. Click Start, then download JSON, CSV or Excel, or read the dataset through the Apify API.

Tip — a live probability feed: create a Schedule that runs every hour with your keywords. Each run is a snapshot you can append to your own database or sheet.

Input example — Fed and inflation odds, both platforms

{
  "platforms": ["polymarket", "kalshi"],
  "status": "open",
  "search": ["fed", "inflation", "cpi"],
  "sortBy": "volume24h",
  "maxMarkets": 100
}

Input example — resolved markets of the last week with daily history

{
  "platforms": ["polymarket", "kalshi"],
  "status": "resolved",
  "resolvedWithinDays": 7,
  "categories": ["politics", "economics"],
  "minVolume": 10000,
  "includePriceHistory": true,
  "historyResolution": "daily",
  "maxMarkets": 1000
}

Input example — specific markets

{
  "markets": [
    "https://polymarket.com/event/fed-decision-in-october-20260617190323537",
    "KXFED-26OCT"
  ],
  "includePriceHistory": true,
  "historyResolution": "hourly"
}

Kalshi accepts a series (KXFED — its whole history, archived markets included), an event (KXFED-26OCT) or a market ticker; Polymarket an event URL, a market URL or an event slug.

Output example

{
  "platform": "kalshi",
  "marketId": "KXFED-26OCT-T4.00",
  "eventId": "KXFED-26OCT",
  "event": "Fed funds rate after Oct 2026 meeting? — On Oct 28, 2026",
  "market": "Will the upper bound of the federal funds rate be above 4.00% following the Fed's Oct 28, 2026 meeting?",
  "outcome": "Above 4.00%",
  "url": "https://kalshi.com/markets/kxfed",
  "category": "economics",
  "tags": ["Economics", "KXFED"],
  "status": "open",
  "probability": 0.645,
  "yesBid": 0.64,
  "yesAsk": 0.65,
  "spread": 0.01,
  "lastPrice": 0.65,
  "priceChange24h": -0.01,
  "volume": 65677.35,
  "volume24h": 1206.68,
  "volumeUnit": "contracts",
  "liquidity": null,
  "openInterest": 33132.8,
  "outcomes": [{"name": "Yes", "price": 0.645, "tokenId": null}, {"name": "No", "price": 0.355, "tokenId": null}],
  "openTime": "2025-08-06T14:30:00Z",
  "closeTime": "2026-10-28T17:55:00Z",
  "result": null,
  "resolvedAt": null,
  "resolutionSource": "Federal Reserve Board of Governors",
  "rules": null,
  "priceHistory": [
    {"time": "2026-09-24T04:00:00Z", "price": 0.64, "volume": 6913.64},
    {"time": "2026-09-25T04:00:00Z", "price": 0.67, "volume": 2597.39}
  ],
  "scrapedAt": "2026-09-25T18:04:37Z"
}

The same question on Polymarket (Fed Decision in October?) returned "outcome": "25 bps increase", "probability": 0.625 in the same run — the two platforms side by side.

A resolved Polymarket market looks like "status": "resolved", "probability": 1.0, "result": "Yes", "resolvedAt": "2026-09-20T16:02:11Z". For two-sided markets (a match, over/under) outcome names the side that probability refers to, and outcomes lists both.

Pricing

The Actor is pay-per-result: you pay for the rows it saves, platform usage included, nothing else. The current price per 1,000 results is on the Actor page; Apify's free plan includes monthly platform credit, so you can try real data before paying. Price history and rules come at no extra cost. Set a spending limit on a run for a hard cap — the Actor stops as soon as the limit is reached.

FAQ

What is "probability"? The price of the market's Yes side (or of the outcome named in outcome), which on both platforms equals the implied probability. It is the midpoint of bid and ask when the spread is at most 10 cents, otherwise the last traded price — the same rule the exchanges use for their displayed odds. Resolved markets show 1 or 0.

Why are volumes in different units? Polymarket reports traded USD; Kalshi reports traded contracts (each pays $1). volumeUnit says which one a row uses. Sorting and the volume filters compare markets within each platform.

How fresh is the data? Live at the time of the run — both APIs are the ones the exchanges' own apps use.

Do I need a Polymarket or Kalshi account? No. Only public market data is read.

How long does a run take? Open markets of both platforms: under a minute. Resolved markets: Polymarket is quick, while Kalshi settles about 80,000 markets a day (mostly untraded price brackets), so each day of the window adds scanning time — a week takes a few minutes. For the long history of one topic, list its Kalshi series (e.g. KXFED) under Specific markets instead.

How many markets are there? Kalshi lists 100,000+ open markets (many are brackets of the same event), Polymarket several tens of thousands. The default filters skip markets that never traded; use keywords, categories and Max markets to keep runs focused.

Is this financial advice? No. It is market data for research. This Actor is not affiliated with Polymarket or Kalshi.

Related

  • ⚽ Football Odds API — every football match from 1,000+ competitions: opening and closing odds from up to 42 bookmakers, no-vig consensus, xG, goal events — full seasons back to 2005
  • 🎾 Tennis Odds & Scores API — every ATP, WTA, Challenger and ITF match: live scores, results, rankings and odds from up to 42 bookmakers back to 2009
  • 🏀 NBA, NFL, MLB & NHL Odds API — moneyline, spread and total odds — opening and closing — from up to 42 bookmakers, no-vig consensus and box-score stats; full seasons back to 2009
  • ⏱️ Flashscore Scraper API (24 sports) — live scores, results and odds of football, basketball, hockey, tennis, volleyball, handball, esports, MMA, cricket, darts and more
  • 🏟️ ESPN Box Scores & Player Stats API — box scores and player stats for the NFL, NBA, MLB, NHL, college sports and soccer leagues — one row per player per game, or one row per game
  • 💼 ATS Jobs API (Greenhouse, Lever, Ashby, Workday…) — open jobs straight from company career sites on 11 applicant tracking systems — by company name or URL, or search a directory of 15,000+ companies
  • 📣 Google Ads Transparency API — every ad an advertiser or domain has run on Google — creative, format, regions and first and last shown dates

All tools: apify.com/sports-odds-lab · GitHub: github.com/minmaxerdev

License

Documentation and example code in this repository are MIT-licensed. The Actor itself runs on Apify under Apify's terms; the data comes from publicly available sources and the Actor is not affiliated with them (see the FAQ).

About

Polymarket & Kalshi prediction-market data API/dataset: probabilities, volume, price history and resolutions in one table, including the full Kalshi archive. Docs, examples and schemas for the Apify Actor.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors