# Polymarket & Kalshi Scraper – Odds, Volume & Price History (`openharvest/prediction-markets-scraper`) Actor

Polymarket and Kalshi scraper (plus Manifold): odds, YES/NO prices, volume, liquidity, open interest, resolution and price history in one format. Weather mode adds the settlement station and observed temperature for weather markets. Official public APIs.

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

## Pricing

from $1.00 / 1,000 market scrapeds

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 – Odds, Volume & Price History

Polymarket and Kalshi scraper (plus Manifold) in one unified format: odds and probabilities, YES/NO prices, outcomes, volume, 24h volume, liquidity, open interest, close time, resolution and optional price history. Search by keyword or category, open or resolved markets. Official public APIs.

Use it instead of a single-venue scraper when you need Kalshi and Polymarket side by side, or, in **weather mode**, when you need weather markets joined to the station they settle on and the observed temperature or rain at that station.

**Price: $1 per 1,000 markets.** Weather station data is included at no extra cost. Price history is an optional add-on at $2 per 1,000 markets. Failed venues and empty searches are never charged.

### What does Prediction Markets Scraper do?

It calls the **official public APIs** of the three biggest prediction market venues (no login, no API keys, no browser) and turns their very different data models into one flat schema:

| Venue | Data source | What you get |
|---|---|---|
| **Polymarket** | Gamma API (events, markets, search) + CLOB `prices-history` | Every market inside an event, outcome prices, bid/ask, volume, 24h volume, liquidity, token IDs, condition IDs |
| **Kalshi** | Trade API v2 (events, markets, series, candlesticks) | Market tickers, YES/NO prices, bid/ask, volume, 24h volume, open interest, rules, settlement result |
| **Manifold** | API v0 (search-markets, market, bets) | Binary, multiple-choice and numeric markets, probabilities, volume, liquidity, bettor counts, resolution |

For every market you get:

- 🎯 **Odds**: `yesPrice`, `noPrice` and `outcomes[{name, price}]` (0–1, the implied probability)
- 💵 **Activity**: `volume`, `volume24h`, `liquidity`, `openInterest`, `bestBid`, `bestAsk`, `lastPrice`
- 🗓 **Lifecycle**: `status` (open / upcoming / closed / resolved), `openTime`, `closeTime`, `resolution`
- 🏷 **Context**: `question`, `eventTitle`, `subtitle` (candidate or bucket), `category`, `tags`, resolution rules (`description`), market `url`
- 📈 **Price history** (optional): `priceHistory: [{time, price}]`, hourly for ranges up to 1 month and daily for longer ranges
- 🧩 **Raw venue fields** under `extra`, e.g. Polymarket `clobTokenIds` / `conditionId`, Kalshi `seriesTicker`, Manifold `outcomeType` / `uniqueBettorCount`

### Weather mode: Kalshi & Polymarket weather markets with station data

Set `mode` to `weather` to get Kalshi "Climate and Weather" markets and Polymarket weather markets (daily highest/lowest temperature in 40+ cities, rain, snow). Kalshi weather series are discovered automatically, so new cities appear without an update. Each market row also gets:

- 📍 **Settlement station**: `stationId` (ICAO, e.g. `KNYC`, `KLGA`, `EGLC`, `RKSI`), NWS climate site (`cliStation`, from `CLINYC`-style rules), name, coordinates, elevation and time zone. The station is read from the market's own rules or resolution source.
- 🌡 **Observed values at that station**: `observedValue` (the high, low or precipitation the market settles on), `observedHigh`, `observedLow`, `observedPrecipIn`, `observedSnowIn`.
- ✅ **Bucket check**: `bucketLow` / `bucketHigh` / `unit` parsed from the outcome label, and `observedInBucket`, which says whether the observed value lands in this bucket. While the day is still running, it is `false` once the bucket can no longer win and `null` while it can.
- 🧾 **Kalshi settled value** (`settledValue`) next to the observation, so you can audit settlements.

Where the observations come from:

| Market | Observation source | `observedStatus` |
|---|---|---|
| Kalshi US daily high/low (rules name a `CLIxxx` site) | Official NWS Daily Climate Report (CLI), archived by the Iowa Environmental Mesonet | `final` the morning after the date |
| Polymarket temperature markets (NOAA time series / Wunderground station) and any day still in progress | METAR/ASOS reports of the airport station, local calendar day | `complete` or `in-progress` |
| Polymarket Hong Kong | Hong Kong Observatory, since-midnight max/min (today only) | `in-progress` |
| Future dates | none yet | `pending` |

Live check (8 Oct 2026, 400 resolved weather markets: 200 Kalshi, 200 Polymarket): `observedInBucket` matched the venue's resolution in **400 of 400** markets, and the NWS value equalled Kalshi's settled value in all 200 Kalshi markets.

### Why use it?

- **One schema for three venues.** Compare the same question across Polymarket, Kalshi and Manifold without writing three integrations.
- **Reliable.** It uses official JSON APIs with retries and backoff and does no HTML scraping. One venue failing never fails the run.
- **Cheap and predictable.** $0.001 per market, a fraction of single-venue actors. `maxItems` and Apify's *Max cost per run* cap your spend exactly.
- **Agent-friendly.** Calling it with `{}` returns the 30 most active markets in about 10 seconds. The input is small and typed, and the output is flat.

### Use cases

- **Trading and arbitrage research:** spot price differences for the same event across venues.
- **News, politics and macro dashboards:** track election, Fed and CPI odds on a schedule.
- **Quant and data science:** build datasets of resolved markets with their price paths for calibration studies.
- **AI agents and RAG:** give an LLM live market-implied probabilities ("what are the odds the Fed holds rates?").
- **Journalism:** cite current prediction-market odds with a link to the market.
- **Weather trading and forecasting research:** compare today's temperature bucket prices on Kalshi and Polymarket with the high observed so far at the exact settlement station, or backtest forecasts against settled markets.

### How to use it

1. Click **Try for free** or **Start**.
2. Optionally enter a **Search** keyword (`fed rate`, `bitcoin`, `election`) and choose **Venues**, **Category** and **Market status**.
3. Turn on **Include price history** if you need time series.
4. Click **Start**, then download the data or connect it to Make, Zapier, n8n, Google Sheets, webhooks or the API.

### Input

| Field | Type | Description |
|---|---|---|
| `mode` | enum | `markets` (default) or `weather` (Kalshi + Polymarket weather markets with station data). |
| `searchQuery` | string | Keyword search, e.g. `fed rate`, `bitcoin`. Empty = top markets. Ignored in weather mode. |
| `venues` | array | Any of `polymarket`, `kalshi`, `manifold`. Default: all. |
| `category` | enum | `all`, `politics`, `elections`, `economics`, `finance`, `crypto`, `sports`, `tech`, `ai`, `science`, `world`, `culture`, `weather`, `health`, `companies`. Mapped to each venue's own tags/categories. |
| `status` | enum | `open` (default), `closed` (ended/resolved), `all`. |
| `sortBy` | enum | `volume24h` (default), `volume`, `liquidity`, `newest`, `closingSoon`. |
| `maxItems` | integer | Max markets in **total**, split evenly across venues. Default `30`. |
| `maxMarketsPerEvent` | integer | Keep the N most likely markets of each multi-outcome event. Default `5`, `0` = all. |
| `includePriceHistory` | boolean | Add `priceHistory` to each market (charged separately). Default `false`. |
| `priceHistoryRange` | enum | `1d`, `1w` (default), `1m`, `3m`, `1y`, `max`. |
| `weatherCity` | string | Weather mode: optional city filter, e.g. `NYC`, `Chicago`, `London`. |
| `weatherType` | enum | Weather mode: `temperature` (default), `precipitation` (rain and snow) or `all`. |
| `marketUrls` | array | Specific markets instead of search: Polymarket event URLs, Kalshi URLs or tickers (`KXFEDDECISION-26OCT`), Manifold URLs. In weather mode these markets get station data too. |
| `customTag` | string | Advanced: a venue-native tag/category/topic slug that overrides `category`. |

Example input:

```json
{
    "searchQuery": "fed rate",
    "venues": ["polymarket", "kalshi", "manifold"],
    "status": "open",
    "maxItems": 30,
    "maxMarketsPerEvent": 3,
    "includePriceHistory": true,
    "priceHistoryRange": "1w"
}
```

Weather mode example (resolved NYC temperature markets with the observed high/low):

```json
{
    "mode": "weather",
    "weatherCity": "NYC",
    "weatherType": "temperature",
    "status": "closed",
    "maxItems": 20,
    "maxMarketsPerEvent": 0
}
```

### Output

Each dataset item is one market (`type: "market"`) or a free status row (`type: "error"`). This is real output (shortened):

```json
{
    "type": "market",
    "venue": "kalshi",
    "marketId": "KXFEDDECISION-26OCT-H0",
    "eventId": "KXFEDDECISION-26OCT",
    "eventTitle": "Fed decision in Oct 2026?",
    "url": "https://kalshi.com/markets/kxfeddecision",
    "question": "Will the Federal Reserve Hike rates by 0bps at their October 2026 meeting?",
    "subtitle": "Fed maintains rate",
    "category": "Economics",
    "status": "open",
    "outcomes": [{ "name": "Yes", "price": 0.83 }, { "name": "No", "price": 0.17 }],
    "yesPrice": 0.83,
    "noPrice": 0.17,
    "lastPrice": 0.83,
    "bestBid": 0.83,
    "bestAsk": 0.84,
    "volume": 3698385.15,
    "volume24h": 198361.38,
    "liquidity": null,
    "openInterest": 1383991.68,
    "currency": "USD",
    "openTime": "2025-09-29T14:00:00.000Z",
    "closeTime": "2026-10-28T17:59:00.000Z",
    "resolution": null,
    "priceHistoryRange": "1d",
    "priceHistoryGranularity": "hour",
    "priceHistory": [
        { "time": "2026-10-06T20:00:00.000Z", "price": 0.83 },
        { "time": "2026-10-06T21:00:00.000Z", "price": 0.84 }
    ],
    "extra": { "seriesTicker": "KXFEDDECISION", "rawStatus": "active", "volumeUnit": "contracts ($1 notional each)" },
    "scrapedAt": "2026-10-07T19:21:15.621Z"
}
```

```json
{
    "type": "market",
    "venue": "polymarket",
    "marketId": "2589812",
    "eventId": "606422",
    "eventTitle": "Fed Decision in October?",
    "url": "https://polymarket.com/event/fed-decision-in-october-20260617190323537/will-there-be-no-change-in-fed-interest-rates-after-the-october-2026-meeting-20260617190324031",
    "question": "Will there be no change in Fed interest rates after the October 2026 meeting?",
    "subtitle": "No change",
    "category": "Fed",
    "status": "open",
    "outcomes": [{ "name": "Yes", "price": 0.835 }, { "name": "No", "price": 0.165 }],
    "yesPrice": 0.835,
    "noPrice": 0.165,
    "volume": 7807449.95,
    "volume24h": 99830.02,
    "liquidity": 790728.13,
    "currency": "USDC",
    "closeTime": "2026-10-29T03:59:00.000Z",
    "extra": { "conditionId": "0xdf9bf27e…", "clobTokenIds": ["111061902544…", "420387758661…"], "eventVolume": 28414063.58 }
}
```

```json
{
    "type": "market",
    "venue": "manifold",
    "marketId": "hII6EUzNlU",
    "question": "Fed decision in October?",
    "status": "open",
    "outcomes": [
        { "name": "No change", "price": 0.8528 },
        { "name": "Increase (25 bps or more)", "price": 0.14 },
        { "name": "Decrease (25 bps or more)", "price": 0.0072 }
    ],
    "yesPrice": null,
    "currency": "MANA",
    "extra": { "outcomeType": "MULTIPLE_CHOICE" }
}
```

Weather mode adds station and observation fields to the same market row. Real output (shortened):

```json
{
    "type": "market",
    "venue": "kalshi",
    "marketId": "KXHIGHNY-26SEP27-T65",
    "eventTitle": "Highest temperature in New York City on Sep 27, 2026?",
    "subtitle": "64° or below",
    "status": "resolved",
    "yesPrice": 1,
    "resolution": "Yes",
    "weatherVariable": "highTemperature",
    "targetDate": "2026-09-27",
    "unit": "F",
    "bucketLow": null,
    "bucketHigh": 64,
    "settlementSource": "The Weather Company",
    "stationId": "KNYC",
    "cliStation": "NYC",
    "stationName": "NEW YORK CITY",
    "stationLatitude": 40.779,
    "stationLongitude": -73.96925,
    "stationElevationM": 27,
    "stationTimeZone": "America/New_York",
    "observedValue": 63,
    "observedHigh": 63,
    "observedLow": 58,
    "observedPrecipIn": 1.58,
    "observedSource": "NWS Daily Climate Report (CLI)",
    "observedStatus": "final",
    "observedInBucket": true,
    "settledValue": 63
}
```

```json
{
    "type": "market",
    "venue": "polymarket",
    "eventTitle": "Highest temperature in NYC on October 7?",
    "subtitle": "66-67°F",
    "yesPrice": 1,
    "resolution": "Yes",
    "weatherVariable": "highTemperature",
    "targetDate": "2026-10-07",
    "unit": "F",
    "bucketLow": 66,
    "bucketHigh": 67,
    "settlementSource": "NOAA",
    "resolutionSourceUrl": "https://www.weather.gov/wrh/timeseries?site=klga",
    "stationId": "KLGA",
    "stationName": "NEW YORK/LA GUARDIA",
    "stationTimeZone": "America/New_York",
    "observedValue": 67,
    "observedHigh": 67,
    "observedLow": 52,
    "observationCount": 24,
    "observedSource": "METAR/ASOS observations",
    "observedStatus": "complete",
    "observedInBucket": true
}
```

**Field notes**

- Prices and probabilities are on a 0–1 scale (0.83 = 83%). For Kalshi, `yesPrice` is the last trade if it lies inside the current bid/ask spread, otherwise the bid/ask midpoint. Resolved markets show the payout (1 or 0).

- `volume` units differ by venue: **USDC** on Polymarket, **contracts** on Kalshi ($1 notional each), and **MANA** (play money) on Manifold. See `currency`.

- Multiple-choice Manifold markets have `yesPrice: null`; their answers are in `outcomes`.

- `priceHistory` is the YES (or first outcome) price over time. On Manifold it is rebuilt from public bets and is available for binary markets only.

- Weather mode: Kalshi's US temperature rules name The Weather Company as the source for a `CLIxxx` NWS climate site. In our check, Kalshi's settled values matched the official NWS daily climate report (returned here as `final`) in 200 of 200 markets. METAR-derived values (`complete` / `in-progress`) come from hourly and special reports and can be 1° lower than the official daily maximum, because the official value also uses readings between reports. Polymarket's NOAA time-series markets resolve on these same METAR reports.

The dataset has ready-made views in Apify Console: **Overview**, **Outcomes & events**, **Price history**, **Weather & stations** and **Errors & status**.

### Pricing

Pay per event: you only pay for data you receive. Platform usage is included.

| Event | Price | When it is charged |
|---|---|---|
| `market` | **$0.001** per market ($1 / 1,000) | Each market saved to the dataset (weather mode: station and observation fields included at no extra cost) |
| `price-history` | **$0.002** per market history | Only when *Include price history* is on **and** history data was returned |
| Errors / empty results | **Free** | Venue failures, no matches, invalid URLs |

| Job | Cost |
|---|---|
| Default run (30 top markets) | **$0.03** |
| 100 markets with 1-week price history | 100 × ($0.001 + $0.002) = **$0.30** |
| 1,000 resolved markets (no history) | **$1.00** |
| 200 weather markets with station data and observations | **$0.20** |

Tip: set **Max cost per run** in the run options. The Actor stops cleanly at your budget, and if your budget covers a market but not its history, the market is delivered without history (`priceHistoryNote` explains why).

### Use with AI agents (MCP)

This Actor works well as a tool for AI agents through the [Apify MCP server](https://mcp.apify.com). Add it with `https://mcp.apify.com?tools=openharvest/prediction-markets-scraper`, or let the agent find it with `search-actors` ("polymarket kalshi odds").

Example `call-actor` input an agent can use to answer "What are the current odds that the Fed holds rates?":

```json
{
    "searchQuery": "fed decision",
    "venues": ["polymarket", "kalshi"],
    "maxItems": 6,
    "maxMarketsPerEvent": 3
}
```

The agent then reads `question`, `subtitle`, `yesPrice`, `volume24h` and `url` from the dataset. Runs with this kind of input finish in a few seconds and cost under $0.01.

For "What is the market saying about today's high in Chicago, and how hot has it been so far at the settlement station?":

```json
{
    "mode": "weather",
    "weatherCity": "Chicago",
    "maxItems": 12,
    "maxMarketsPerEvent": 0
}
```

The agent reads `subtitle`, `yesPrice`, `stationId`, `observedValue`, `observedStatus` and `observedInBucket`.

### FAQ

**Do I need API keys or accounts?**
No. All three venues publish their market data through public APIs.

**Why does `maxItems` give me fewer markets than I asked for?**
The limit is split evenly across venues. If a venue has fewer matching markets (e.g. a niche search on Kalshi), you get fewer items, and you are not charged for markets that don't exist. A free `NO_RESULTS` row tells you which venue had nothing.

**What does "Max markets per event" do?**
Events such as "Democratic nominee 2028" contain dozens of markets, one per candidate. By default only the 5 most likely (highest YES price) are kept, so one event doesn't use up your whole limit. Set it to `0` to get every market.

**How far back does price history go?**
`max` returns the full history at daily resolution. Ranges up to one month are hourly. For closed markets the window ends at the close time.

**Can I scrape specific markets?**
Yes. Put Polymarket event URLs, Kalshi URLs or tickers (`KXFEDDECISION-26OCT`, `KXFEDDECISION-26OCT-H0`) or Manifold market URLs into **Specific market URLs**.

**Does it include order books or trades?**
Not yet. It returns best bid/ask, last price and the price history. Open an issue if you need full order books.

**Which weather markets get observed values?**
Daily high and low temperature markets on both venues (US stations through the NWS daily climate report or METAR, international airports through METAR, Hong Kong for the current day), daily "will it rain" markets at US stations, and Kalshi monthly rain/snow markets whose rules name a `CLIxxx` site. Markets that settle on a city-area total, on AccuWeather/Synoptic coordinates (Kalshi hourly markets) or on non-station sources such as hurricanes or earthquakes are still returned with their odds, with `observedStatus: "unavailable"` and a `weatherNote` explaining why.

**How fast do observations update?**
METAR reports arrive about every hour (more often in bad weather) and the official NWS daily report is published early the next morning. Schedule the Actor every 15–60 minutes for intraday tracking.

**Is Kalshi search official?**
Kalshi market data comes from the official Trade API v2. For keyword search and ranking, the Actor uses Kalshi's public search endpoint (the one kalshi.com uses). If that endpoint is unavailable, it falls back to paging the official `/events` endpoint and filters locally.

### Is it legal to scrape prediction markets?

This Actor only reads **public market data** that the venues publish through their own public APIs, plus public weather observations (NWS climate reports and METAR data archived by the Iowa Environmental Mesonet, and Hong Kong Observatory open data). It does not log in, place trades or collect personal data. Polymarket and Kalshi restrict *trading* in some jurisdictions, but reading public market data is unaffected. Make sure your use of the data complies with each venue's terms of service. This is not financial advice.

### Related actors

Other Actors by the same developer:

- **CoinGecko, DexScreener & Binance Scraper – Crypto Prices & OHLCV**: pair crypto prediction markets with spot prices and candles.
- **Google Trends Scraper – Interest Over Time & Related Queries**: see whether search interest moves before the odds do.
- **Google News Scraper – Full Article Text & Real Publisher URLs**: the news behind a price move.
- **Hacker News Scraper – Stories, Comments & Who Is Hiring Jobs**: tech and AI sentiment next to tech markets.

### Support & feedback

Found a bug or a missing field? Open an issue in the **Issues** tab and we usually reply within a day.

# Actor input Schema

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

<code>markets</code> = any prediction markets (search, category, URLs). <code>weather</code> = Kalshi and Polymarket weather markets (daily high/low temperature, rain, snow) enriched with the weather station they settle on and the observed values at that station (official NWS Daily Climate Report or METAR/ASOS observations). In weather mode, <code>searchQuery</code> and <code>category</code> are ignored; use <code>weatherCity</code> and <code>weatherType</code>.

## `searchQuery` (type: `string`):

Optional keyword search across market and event titles, e.g. <code>fed rate</code>, <code>bitcoin</code>, <code>election</code>, <code>super bowl</code>. Leave empty to list the top markets.

## `venues` (type: `array`):

Which prediction market venues to scrape. Default: all three.

## `category` (type: `string`):

Optional topic filter, mapped to each venue's own categories/tags (Polymarket tag, Kalshi category, Manifold topic).

## `status` (type: `string`):

<code>open</code> = currently trading. <code>closed</code> = ended / resolved markets (with their resolution). <code>all</code> = both.

## `sortBy` (type: `string`):

How markets are ranked on each venue. With a search query, Kalshi ranks by relevance when 24h volume is selected.

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

Maximum number of markets in total. The limit is split evenly across the selected venues (e.g. 30 with 3 venues = up to 10 per venue). You pay per market, so this also caps your cost.

## `maxMarketsPerEvent` (type: `integer`):

Events such as "Democratic nominee 2028" or "Fed decision in October" contain many markets (one per candidate/outcome). Keep only the N most likely ones (highest YES price) per event. 0 = all markets of each event.

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

Add a <code>priceHistory</code> array (time + YES price/probability) to every market. Charged as a separate <code>price-history</code> event, only when history data is returned.

## `priceHistoryRange` (type: `string`):

Time range of the price history, ending now (open markets) or at the close time (closed markets). Up to 1 month = hourly points, longer = daily points.

## `weatherCity` (type: `string`):

Weather mode only. Optional city to filter weather markets, e.g. <code>NYC</code>, <code>Chicago</code>, <code>London</code>, <code>Seoul</code>. Leave empty for the most active weather markets.

## `weatherType` (type: `string`):

Weather mode only. <code>temperature</code> = daily high/low (and hourly) temperature markets. <code>precipitation</code> = rain and snow markets. <code>all</code> = every weather/climate market, including hurricanes and climate records (station data only where a station applies).

## `marketUrls` (type: `array`):

Optional. Scrape exactly these markets/events instead of searching: <code>https://polymarket.com/event/\<slug></code>, <code>https://kalshi.com/markets/\<series></code>, Kalshi tickers like <code>KXFEDDECISION-26OCT</code>, or <code>https://manifold.markets/\<user>/\<slug></code>. When set, search/category/status/venues are ignored.

## `customTag` (type: `string`):

Optional. A venue-native filter that overrides <code>category</code>: a Polymarket tag slug (e.g. <code>bitcoin</code>), a Kalshi category name (e.g. <code>Economics</code>) or a Manifold topic slug (e.g. <code>us-politics</code>). Best used with a single venue selected.

## Actor input object example

```json
{
  "mode": "weather",
  "searchQuery": "bitcoin",
  "venues": [
    "polymarket",
    "kalshi"
  ],
  "category": "crypto",
  "status": "open",
  "sortBy": "volume24h",
  "maxItems": 30,
  "maxMarketsPerEvent": 5,
  "includePriceHistory": true,
  "priceHistoryRange": "1m",
  "weatherCity": "London",
  "weatherType": "temperature",
  "marketUrls": [
    "https://polymarket.com/event/fed-decision-in-october",
    "KXFEDDECISION-26OCT",
    "https://manifold.markets/Plant/all-millennium-prize-problems-solve"
  ],
  "customTag": "us-politics"
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped items in the default dataset (JSON, CSV, Excel and more via the dataset export).

## `files` (type: `string`):

Records saved in the default key-value store, e.g. the run summary.

# 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 = {
    "searchQuery": "fed rate",
    "venues": [
        "polymarket",
        "kalshi",
        "manifold"
    ],
    "maxItems": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("openharvest/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 = {
    "searchQuery": "fed rate",
    "venues": [
        "polymarket",
        "kalshi",
        "manifold",
    ],
    "maxItems": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("openharvest/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 '{
  "searchQuery": "fed rate",
  "venues": [
    "polymarket",
    "kalshi",
    "manifold"
  ],
  "maxItems": 30
}' |
apify call openharvest/prediction-markets-scraper --silent --output-dataset

```

## MCP server setup

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