# Prediction Markets Odds API – Polymarket, Kalshi, Manifold (`liora-tools/prediction-markets`) Actor

Reliable odds feed: never a silent empty result. A source that is down gives a clear free error row; no match gives a free no_results row. Live Polymarket, Kalshi and Manifold odds in one schema: probability, bid/ask, 24h volume, liquidity, close time.

- **URL**: https://apify.com/liora-tools/prediction-markets.md
- **Developed by:** [Liora Blyth](https://apify.com/liora-tools) (community)
- **Categories:** Developer tools, Automation, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 market snapshots

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

## Prediction Market Odds API – Polymarket, Kalshi & Manifold in One Schema

Live odds from the three biggest prediction markets – **Polymarket, Kalshi and Manifold** – normalised into one schema: implied probability (yes price), bid/ask, 24h volume, liquidity, close time and URL. Search by keyword ("fed", "bitcoin", "election") or pull the top markets by volume.

- ✅ **Never a silent empty dataset:** if a source is down you get a free `status: "error"` row naming it; if nothing matched you get a free `status: "no_results"`-type row saying so. Errors and status rows are never charged.
- ✅ Official open-data APIs only – no scraping of websites, no login, no proxies needed
- ✅ One clean, documented schema across all sources
- ✅ Pay only for results: **$0.002 per market** ($2.00 per 1,000). Errors are free.

### Coverage

- **Sources:** Polymarket (gamma-api.polymarket.com), Kalshi (api.elections.kalshi.com trade API v2), Manifold (api.manifold.markets v0) – public read-only APIs, no key.
- **Markets:** open markets only; worldwide topics (politics, economics, crypto, tech, science, weather…). Kalshi sports are skipped unless you pass `kalshiCategories`/`keywords`.
- **Fields:** platform, marketId/slug, event, question, outcome label + all outcomes, yes/no price (implied probability), best bid/ask, last price, 24h price change, 24h and total volume, liquidity, open interest, currency, real-money flag, category, status, close/created time, resolution source, URL, fetchedAt. Fields a platform does not publish are `null`.
- **Not covered:** order books, trade history, resolved-market archives, Betfair/PredictIt.

### When a source is down – error, not empty

- Each platform is fetched independently, with retries on HTTP 429/5xx (honouring `Retry-After`).
- If a platform still fails, you get **one free row** `{"platform": "Kalshi", "status": "error", "error": "…"}` and the other platforms continue. The run still ends **SUCCEEDED**, so check for `status` rows.
- If the platforms answered but nothing matched your keywords/volume filter, you get **one free row** `{"status": "no_results", "error": "Polymarket, Kalshi, Manifold answered, but no open market matched …"}` – never a silent empty dataset.
- Market rows never have a `status` of `error`/`no_results`, so `status in ("error","no_results")` separates the two.

### Cost example and cost cap

- 3 platforms × 100 markets (default) = up to 300 markets = **$0.60** + $0.00005 start. 50 keyword matches ≈ $0.10.
- **Cap it two ways:** `maxItems` (total markets, e.g. `100` → max $0.20) and/or **Max charge per run** (Console → Run options, or `maxTotalChargeUsd` in the API). When the charge limit is hit the Actor stops cleanly and keeps what it saved. Status rows are free.

### What can you use it for?

- Compare the same event across venues and spot price gaps (arbitrage / research)
- Feed dashboards, newsletters and trading bots with probabilities on macro, crypto, politics and tech
- Track market sentiment over time with Apify schedules (every 5 min, hourly, daily)
- Academic / journalism research on forecasting accuracy

### Input

| Field | What it does |
|---|---|
| `keywords` | e.g. `fed`, `bitcoin`, `trump` – empty = top markets by 24h volume |
| `platforms` | polymarket, kalshi, manifold (default all) |
| `maxMarketsPerPlatform` | Billable results cap per venue |
| `maxItems` | Optional total billable cap for the whole run (empty = no total cap) |
| `minVolume24h` | Skip illiquid markets |
| `kalshiCategories` | e.g. Economics, Crypto, Politics (default: all non-sports) |
| `kalshiMaxEvents` | How many Kalshi events to expand |

Example input:

```json
{
  "keywords": [
    "fed",
    "bitcoin"
  ],
  "platforms": [
    "polymarket",
    "kalshi",
    "manifold"
  ],
  "maxMarketsPerPlatform": 25
}
```

### Output

Each result is one row in the dataset (download as JSON, CSV, Excel or via API). Example:

```json
{
  "platform": "Polymarket",
  "marketId": "2589813",
  "marketSlug": "will-the-fed-increase-interest-rates-by-25-bps-after-the-october-2026-meeting-20260617190324032",
  "eventId": "606422",
  "eventTitle": "Fed Decision in October?",
  "question": "Will the Fed increase interest rates by 25 bps after the October 2026 meeting?",
  "outcomeLabel": "25 bps increase",
  "outcomes": [
    {
      "name": "Yes",
      "price": 0.045
    },
    {
      "name": "No",
      "price": 0.955
    }
  ],
  "yesPrice": 0.045,
  "noPrice": 0.955,
  "bestBid": 0.04,
  "bestAsk": 0.05,
  "lastPrice": 0.04,
  "priceChange24h": -0.03,
  "volume24h": 784045.448559,
  "volumeTotal": 14393749.342364,
  "liquidity": 1546726.8007,
  "openInterest": null,
  "currency": "USDC",
  "isRealMoney": true,
  "category": null,
  "status": "open",
  "closeTime": "2026-10-29T03:59:00Z",
  "createdTime": "2026-06-17T23:05:57.870064Z",
  "resolutionSource": "https://www.federalreserve.gov/monetarypolicy/fomccalendars.htm",
  "url": "https://polymarket.com/event/fed-decision-in-october-20260617190323537",
  "fetchedAt": "2026-10-24T16:41:52+00:00"
}
```

### Resolution rules next to the odds

Markets with the same question can resolve differently on each platform. Every row includes `rulesText` (Polymarket description, Kalshi primary + secondary rules, Manifold description; whitespace collapsed, max 2,000 characters) and, for Kalshi, `canCloseEarly`. Read the rules before treating two markets as the same bet. No platform login is needed; only public endpoints are used.

### Pricing

Pay-per-event, no subscription:

| Event | Price |
|---|---|
| Market snapshot (`market`) | $0.002 ($2.00 / 1,000) |
| Actor start | $0.00005 |

Error rows and empty results are never charged. Set **Max charge per run** in Apify Console to cap your spend – the Actor stops cleanly when the limit is reached.

### Option names (shared across our open-data Actors)

The five Actors in this pack (Prediction Markets, US Building Permits, EU Company Registry, UK Public Tenders, EU Fuel Prices) use the same names for the same job:

| Job | Option | Notes |
|---|---|---|
| Free-text filter | `keywords` (array) | EU Company Registry uses `query` (one company name) + `registrationNumbers` |
| Date window | `daysBack` + `…From` / `…To` | `issuedFrom/To` (permits), `publishedFrom/To` (tenders) |
| Total billable cap | `maxItems` | available in all five; per-source caps (`maxMarketsPerPlatform`, `maxItemsPerCity`, `maxResultsPerCountry`, `maxPagesPerSource`) still work |
| Only new rows on schedules | `onlyNewSinceLastRun` | EU Fuel Prices: `onlyChangedSinceLastRun` (prices that changed) |
| Which sources | `platforms` / `cities` / `countries` / `sources` | the natural unit of each source |

Status rows always use the same `status` values: `error` / `source_unavailable` (source down), `no_results` / `no_match` / `not_found` (source answered, nothing matched), `no_new` (nothing new since last run). They are never charged.

### FAQ

**Is the data official?**\
Yes – it comes from each venue's public, read-only market-data API (no login, no wallet, no trading). The Actor never places orders.

**Are prices probabilities?**\
`yesPrice` is the last/mid price of the YES contract on a 0–1 scale, which is the market-implied probability. Manifold uses play money (`isRealMoney: false`).

**Why is Kalshi slower?**\
Kalshi lists ~16,000 open events; the Actor filters them first and then fetches markets per event (5 in parallel) to avoid the tens of thousands of combo markets.

**Do you collect user data?**\
No. Creator / trader names are dropped; only market-level data is returned.

**Can I get historical prices?**\
Not yet – schedule the Actor to build your own time series. A price-history mode is on the roadmap.

### Legal & data sources

This Actor only reads public data published by government bodies or by the platforms' own public APIs under open licences (each row has `source`/`license` or `url` fields where available). It returns organisation-level data and deliberately excludes personal data. You are responsible for using the data in line with the source licence and applicable law (e.g. GDPR).

### Integrations

Schedule runs, then push results to Google Sheets, Slack, webhooks, Zapier, Make or your database with Apify integrations, or call the Actor from the Apify API / Python / JavaScript clients.

# Actor input Schema

## `keywords` (type: `array`):

Topics to match in market / event titles, e.g. 'fed', 'bitcoin', 'election', 'trump', 'oscars'. Empty = top markets by 24h volume.

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

Which venues to query.

## `maxMarketsPerPlatform` (type: `integer`):

Highest 24h-volume markets kept per platform.

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

Optional total cap on billable markets for the whole run (same option name as in our other open-data Actors). Leave empty for no total cap; `maxMarketsPerPlatform` still applies. For a hard dollar cap use 'Max charge per run' in Run options.

## `minVolume24h` (type: `integer`):

Drop markets with less 24h volume (USDC / contracts / mana).

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

Optional. Kalshi has ~16,000 open events; without keywords or categories the Actor scans the non-sports categories.

## `kalshiMaxEvents` (type: `integer`):

Cap on matching Kalshi events whose markets are fetched (one request each).

## Actor input object example

```json
{
  "keywords": [
    "fed",
    "bitcoin"
  ],
  "platforms": [
    "polymarket",
    "kalshi",
    "manifold"
  ],
  "maxMarketsPerPlatform": 100,
  "minVolume24h": 0,
  "kalshiMaxEvents": 300
}
```

# Actor output Schema

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

Rows saved by this run (overview table).

# 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 = {
    "keywords": [
        "fed",
        "bitcoin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("liora-tools/prediction-markets").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 = { "keywords": [
        "fed",
        "bitcoin",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("liora-tools/prediction-markets").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 '{
  "keywords": [
    "fed",
    "bitcoin"
  ]
}' |
apify call liora-tools/prediction-markets --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,liora-tools/prediction-markets"
        }
    }
}
```

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/18GYO6aJ1y0qfKBKC/builds/3tbnom8nvequ1GvdX/openapi.json
