DEV Community

g4dr
g4dr

Posted on

Scrape Kalshi Prediction Markets: Odds, Volume and Weather Data via API

Kalshi is the regulated US prediction market — election odds, Fed decisions, economic prints, even weather markets. Its public API exists but is rate-limited and awkward for bulk history. This tutorial shows the Apify-actor pipeline: markets, order books, and cross-platform arbitrage with Polymarket.

🤖 Try it live — chat with a Poe bot that generates the exact pipeline for your use case: Lead List Generator · Job Postings Miner · Amazon Product Miner · SERP Rank Tracker · Social Lead Finder

The stack

  • Apify — Kalshi actors for markets, odds, volume, profiles. Free monthly credits included.
  • Python — 20 lines to a live odds feed.

Step 1 — Get your API token

  1. Create an Apify account (free credits included)
  2. Console → Settings → Integrations → copy your API token
  3. export APIFY_TOKEN=your_token

Step 2 — Pull market data

curl -X POST "https://api.apify.com/v2/acts/scrapemint~kalshi-prediction-market-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"category": "economics", "maxItems": 100}'
Enter fullscreen mode Exit fullscreen mode

Fields per market: ticker, title, yesPrice, noPrice, volume, openInterest, closeTime, url.

Step 3 — Build an odds feed

from apify_client import ApifyClient

client = ApifyClient("APIFY_TOKEN")
run = client.actor("scrapemint/kalshi-prediction-market-scraper").call(run_input={
    "category": "economics", "maxItems": 200
})

for m in client.dataset(run["defaultDatasetId"]).iterate_items():
    yes = m.get("yesPrice") or 0
    print(f"{m.get('title', '')[:65]:65s} YES={yes:>4.2f} vol={m.get('volume', 0)}")
Enter fullscreen mode Exit fullscreen mode

Schedule it in Apify Console → snapshots → price-movement alerts.

The arbitrage angle

Kalshi and Polymarket price the same events — differently. congism/polymarket-kalshi-arb-finder (835 users) does the cross-platform matching and flags YES+NO < $1.00 pairs. Both are regulated/legit venues, so the spread is real.

Niche gold: weather markets

bigdavidson/kalshi-weather-markets (282 users) pulls temperature/rain odds per city — energy traders, event insurers, and quants pay for this feed. Build it once, sell the dataset.

Useful actors

Actor Job
scrapemint/kalshi-prediction-market-scraper Markets + live event odds (115 users)
congism/polymarket-kalshi-arb-finder Kalshi↔Polymarket arbitrage pairs
bigdavidson/kalshi-weather-markets Temperature & rain odds API (282 users)
pixflor/kalshi-markets-scraper Markets, odds, volume, order books
saswave/kalshi-profile-scraper Trader profile data

Who uses this

  • Traders — arb alerts + order-book snapshots before market-moving events
  • Quants/researchers — odds history beats polling data for event probability studies
  • Data sellers — cleaned odds/volume feeds = a sellable product

Automation

Hourly schedule → diff → alert when a market's YES moves >5¢. A few cents a day on free credits.

More resources

Top comments (0)