Tony Wang7 min readHow to Scrape Kalshi in 2026 (API & Python)
Kalshi's market data is public and keyless via its own REST API. Here's when to use it directly, and when a structured API is easier.
Kalshi already publishes an open, keyless REST API for its market data — prices, order books, trade history, events, and series are all public reads at external-api.kalshi.com. So the honest answer for "how to scrape Kalshi" in 2026 is: for most read use cases, call Kalshi's own API directly. What still needs an account is trading — placing orders requires a KYC'd, signed-request session. This guide covers Kalshi's official API, why hand-scraping the website is unnecessary on top of it, and when a structured API earns its keep instead.
Why scrape Kalshi data?
- Event-probability tracking — Kalshi's "yes" price is a live, market-implied probability for real-world events (elections, Fed decisions, weather, sports), useful as a forecasting signal.
- Market-sentiment research vs. traditional polling — compare Kalshi-implied odds against polls or expert forecasts to see where crowds and pollsters disagree.
- Trading and quant research — order books, trade prints, and historical candles for building or backtesting strategies.
- News and forecasting products — surface "what the market thinks will happen" widgets alongside news coverage of an event.
- AI pipelines — feed live event probabilities into research agents or dashboards that need a numeric read on uncertain outcomes.
Is it legal to scrape Kalshi?
Option 1: Kalshi's own official API (and its limits)
For Kalshi specifically, the official API is the first thing to reach for — it's public, well-documented, and returns the same data you'd otherwise scrape:
curl "https://external-api.kalshi.com/trade-api/v2/markets?limit=10"
No x-api-key, no OAuth, no account needed for reads. What it covers and where it still has limits:
- Reads are open, writes are gated. Markets, events, series, trades, and order books are public. Placing an order requires an approved account: RSA-signed requests (
KALSHI-ACCESS-KEY,-TIMESTAMP,-SIGNATURE) plus KYC, and Kalshi is only available in a subset of US states. - Rate limits scale with account tier. Public/basic access uses a token-bucket limiter (roughly 20 reads/sec on the entry tier); higher trading tiers get higher budgets. Heavy polling should still back off on
429s. - Terms restrict downstream use, not access. The API itself won't stop you from pulling a lot of data — the Data Terms of Service is what limits what you can build with it commercially (see above).
- You still assemble your own schema. Markets, events, series, order books, and historical candles are separate endpoint families with their own params (
event_ticker,series_ticker, cursors,period_interval) to learn and paginate.
Option 2: DIY in Python against the website (and why it's unnecessary)
Because Kalshi's own JSON API is open, there's little reason to scrape kalshi.com's rendered pages — you'd be parsing a React app for numbers the API already gives you as structured fields, and you'd inherit markup drift the API doesn't have. A minimal DIY pull looks like this:
import requests
r = requests.get(
"https://external-api.kalshi.com/trade-api/v2/markets",
params={"limit": 10, "status": "active"},
).json()
markets = r["markets"]
This works fine for a single script. The tradeoffs show up once you're pulling multiple platforms:
- Kalshi's schema is Kalshi's own. Field names, ticker formats, and pagination cursors are specific to this API — a separate integration to maintain if Kalshi is one of several markets you track.
- No unified auth or normalization across sources. If you're also pulling Polymarket, Metaculus, or traditional market data, each has its own client, schema, and rate-limit behavior to reconcile.
- You still own the polling and storage. Kalshi doesn't retry, dedupe, or timestamp your pulls for you — that's on your code either way.
Option 3: A structured Kalshi API
The value-add of a Kalshi scraping API isn't unlocking data Kalshi hides — it's one normalized schema and one x-api-key across Kalshi and every other platform in the catalog, so you're not maintaining a separate client per source. List active markets:
curl "https://api.crawlora.net/api/v1/kalshi/markets?limit=10&status=active" \
-H "x-api-key: $CRAWLORA_API_KEY"
Markets, events, and history in Python:
import requests
h = {"x-api-key": "YOUR_API_KEY"}
base = "https://api.crawlora.net/api/v1/kalshi"
markets = requests.get(f"{base}/markets", headers=h,
params={"limit": 10, "status": "active"}).json()["data"]
market = requests.get(f"{base}/market/KXELONMARS-99", headers=h).json()["data"]
events = requests.get(f"{base}/events", headers=h, params={"limit": 10}).json()["data"]
A market detail response is normalized JSON you can store directly (real fields):
{
"code": 200,
"msg": "OK",
"data": {
"market": {
"ticker": "KXELONMARS-99",
"event_ticker": "KXELONMARS-99",
"title": "Will Elon Musk visit Mars before Aug 1, 2099?",
"status": "active",
"last_price": 0.08,
"yes_bid": 0.08,
"yes_ask": 0.1,
"volume": 94840.88
},
"source_url": "https://external-api.kalshi.com/trade-api/v2/markets/KXELONMARS-99",
"fetched_at": "2026-06-07T14:00:00Z"
}
}
Order books and price history behind the same key:
book = requests.get(f"{base}/market/KXELONMARS-99/orderbook", headers=h).json()["data"]
history = requests.get(f"{base}/market/KXELONMARS-99/history", headers=h,
params={"period_interval": 1440}).json()["data"]
trades = requests.get(f"{base}/trades", headers=h, params={"ticker": "KXELONMARS-99"}).json()["data"]
event = requests.get(f"{base}/event/KXELONMARS-99", headers=h).json()["data"]
series = requests.get(f"{base}/series/KXELONMARS", headers=h).json()["data"]
Markets are addressed by ticker (e.g. KXELONMARS-99), events by event_ticker, and series by series_ticker — a series is a recurring topic (like a weekly economic-data release), events are specific instances under it, and markets are the individual yes/no contracts inside an event. Every response carries source_url and fetched_at, so store the timestamp with each row and re-pull on a schedule.
What you can collect
- Markets — ticker, status, last price, yes/no bid-ask, and volume, listed or by ticker.
- Order books — live yes/no price levels and sizes for a market.
- Price history — OHLC candlesticks per market or across multiple tickers at once, with open interest.
- Trades — individual fills with price, side, and count, for a market or across the exchange.
- Events and series — event metadata, settlement sources, grouped markets, and series-level category/frequency.
- Exchange status and schedule — whether trading is active and the exchange's hours.
- Historical/settled data — finalized markets and trades past Kalshi's live cutoff.
Limitations
- Data Terms of Service, not the API, is the real gate. Reads are open, but redistributing, archiving for others, or ML/AI training on Kalshi data needs prior written consent — check the terms before building a commercial product on it.
- Prediction-market prices, not certainties. A "yes" price is the market's implied probability, not a guarantee of the outcome — treat it as a signal, not a forecast.
- US-regulated, US-focused markets. Kalshi is a CFTC-regulated DCM, available in a subset of US states for trading; market data reflects that scope.
- Historical data has a cutoff. Kalshi separates live/active data from a
historical/set with its owncutoffendpoint — check which window you're querying. - Not investment advice. Store
fetched_atwith every pull and treat values as research inputs, not trading signals.
Where this gets used
- Forecasting and probability dashboards — track how Kalshi's implied odds move for an event over time.
- Sentiment comparison — set Kalshi prices beside polls, expert forecasts, or news coverage of the same event.
- Quant and research pipelines — order books and trade history for strategy research (subject to Kalshi's terms).
- AI agents and research tools — a numeric probability read on real-world events for downstream reasoning.
Sources
Start collecting
Try it first, free: run any public URL through the Free Web Scraper, or check whether a site blocks bots with the Anti-Bot Checker — no signup.
Test the markets endpoint in the Playground, check the schema in the API docs, and review pricing. Kalshi is one read of market-implied probability; for the traditional-markets side, how to scrape Yahoo Finance covers equities, and how to scrape CoinGecko covers crypto — useful to compare against event-driven moves. For a second forecast source without Kalshi's real-money stakes, how to scrape Metaculus tracks community-forecaster probabilities on the same kinds of events. See the broader prediction market data use case for how these sources fit together. For the legal basics of any of this, see is web scraping legal.
Part of our how-to-scrape guide series — every platform we cover, in one index.
Frequently asked questions
Does Kalshi have an official API?
Yes. Kalshi publishes an open REST API at external-api.kalshi.com/trade-api/v2. Market data reads — markets, events, series, order books, and trade history — are public and don't require an API key or account. Only placing trades requires an approved, KYC'd account with RSA-signed requests.
Do I need an API key to read Kalshi market data?
No. Kalshi's own market-data endpoints are keyless and unauthenticated for reads. A Crawlora API key is only needed if you use the structured API described in this guide, which normalizes Kalshi alongside other platforms behind one key.
Is it legal to scrape Kalshi?
Reading Kalshi's public API is allowed by design — no login wall to bypass. But Kalshi's Data Terms of Service license the data for personal, non-commercial use and explicitly exclude, without prior written consent, building software products on it, redistributing or archiving it for others, or using it to train an ML/AI system. Review those terms before any commercial use. This is not legal advice.
What is a Kalshi market ticker?
A ticker like KXELONMARS-99 identifies a single yes/no contract. Tickers roll up into events (event_ticker, e.g. a specific instance of a question) which roll up into series (series_ticker, a recurring topic like a weekly economic release).
Can I get historical Kalshi price data?
Yes. Market and event history endpoints return OHLC-style candlesticks with open interest and volume at a chosen period_interval. A separate historical/ set of endpoints covers finalized markets and trades past Kalshi's live-data cutoff.
Does Kalshi require KYC to trade?
Yes for trading, no for market data. Reading prices, order books, and trade history is public. Placing an order requires an approved Kalshi account with identity verification, and Kalshi is only available for trading in a subset of US states.
What can I build with Kalshi's yes-price data?
The yes price on a Kalshi market is a market-implied probability for a real-world event. It's commonly used for forecasting dashboards, comparing crowd sentiment against polls or expert forecasts, and as an input to research or quant pipelines — treated as a signal, not a guarantee of the outcome.