# Polymarket Scraper - Prediction Markets, Odds & Volume (`ninhothedev/polymarket-scraper`) Actor

$0.5/1K 🔥 Fast Polymarket scraper! Prediction markets — question, odds, volume, liquidity & outcomes. No key. JSON, CSV, Excel or API in seconds. Pull markets & events for trading, forecasting & research ⚡

- **URL**: https://apify.com/ninhothedev/polymarket-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Polymarket Scraper 📊

**Scrape [Polymarket](https://polymarket.com) prediction markets and events — questions, live odds, outcome prices, trading volume, liquidity, bid/ask spreads and resolution dates — as clean, structured JSON. No API key, no login, no proxy required.**

Polymarket is the world's largest prediction market. Traders, quant researchers, journalists and forecasters use its odds as a real-money signal for elections, crypto, sports, macro and current events. This actor turns that live market data into a tidy dataset you can drop into a spreadsheet, database, dashboard or model.

***

### ✨ What you get

- **Markets mode** — individual prediction questions ("Will X happen by date?") with their live outcome prices (implied probabilities), volume, liquidity, best bid/ask and last trade price.
- **Events mode** — grouped events that bundle many related markets (e.g. "Democratic Presidential Nominee 2028" with all candidate sub-markets), including tags and a compact list of child markets.
- **Live odds** — `outcome_prices` are the market-implied probabilities (they sum to ~1.0), decoded from Polymarket's JSON-string encoding into real number arrays for you.
- **Fully flat & nullable** — one item per row, every field nullable, ready for CSV/Excel/JSON/API export.

### 🔧 Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | select | `markets` | `markets` (individual questions) or `events` (grouped markets). |
| `active` | boolean | `true` | Only currently active/tradeable markets. |
| `closed` | boolean | `false` | Include resolved/closed markets. |
| `order` | string | `volume` | Sort field (descending): `volume`, `liquidity`, `startDate`, `endDate`. |
| `maxItems` | integer | `100` | Max markets/events to scrape (1–1000). |

#### Example input

```json
{
  "mode": "markets",
  "active": true,
  "closed": false,
  "order": "volume",
  "maxItems": 100
}
```

### 📤 Output

Each **market** item:

```json
{
  "type": "market",
  "id": "2874986",
  "question": "Will the next Google Gemini Pro model be released by July 29, 2026?",
  "slug": "will-the-next-google-gemini-pro-model-be-released-by-july-29-2026",
  "category": null,
  "volume": 999.95,
  "liquidity": 332.27,
  "outcomes": ["Yes", "No"],
  "outcome_prices": [0.085, 0.915],
  "best_bid": 0.05,
  "best_ask": 0.12,
  "last_trade_price": 0.11,
  "active": true,
  "closed": false,
  "start_date": "2026-07-10T22:21:10+00:00",
  "end_date": "2026-07-29T16:00:00+00:00",
  "url": "https://polymarket.com/event/will-the-next-google-gemini-pro-model-be-released-by-july-29-2026",
  "source": "polymarket",
  "scraped_at": "2026-07-20T17:00:00+00:00"
}
```

Each **event** item adds `title`, `num_markets`, `tags`, `open_interest` and a compact `markets` array with each child question and its odds.

> `outcome_prices` are the market-implied probabilities of each outcome — e.g. `[0.085, 0.915]` means the market prices "Yes" at ~8.5% and "No" at ~91.5%.

### 💡 Use cases

- **Prediction market analysis** — track how odds move on elections, policy, crypto and sports over time.
- **Algorithmic trading & signals** — pull bid/ask, spread and last trade price to spot mispricings and build strategies.
- **Sentiment & forecasting research** — use real-money crowd probabilities as a benchmark for academic or quant models.
- **News & journalism** — cite live market odds in coverage of elections and breaking events.

### 💰 Pricing

Roughly **~$0.50 per 1,000 items** on the Apify platform. The Polymarket Gamma API is free and datacenter-friendly, so runs are cheap and fast — no residential proxy needed.

### 🔗 Related actors

- [CoinGecko Crypto Scraper](https://apify.com/ninhothedev/coingecko-crypto-scraper)
- [DexScreener Scraper](https://apify.com/ninhothedev/dexscreener-scraper)
- [GDELT News Scraper](https://apify.com/ninhothedev/gdelt-news-scraper)
- [Google News Scraper](https://apify.com/ninhothedev/google-news-scraper)

### ❓ FAQ

**Do I need an API key?** No. The public Polymarket Gamma API needs no key or login.

**Is the data live?** Yes — every run hits the API in real time, so odds, volume and liquidity reflect the current market.

**What are `outcome_prices`?** The market-implied probability of each outcome, decoded into a numeric array. They normally sum to ~1.0.

**Keywords:** polymarket scraper, prediction market data, polymarket api, prediction market odds, betting odds scraper, election odds, crypto prediction markets, market probabilities, polymarket volume, forecasting data, sentiment data, event contracts, trading signals.

# Actor input Schema

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

What to scrape. 'markets' returns individual prediction markets (one question each, with live odds). 'events' returns grouped events that bundle several related markets together.

## `active` (type: `boolean`):

If true, only currently active (tradeable) markets/events are returned. Set to false to include inactive ones.

## `closed` (type: `boolean`):

If false (default), resolved/closed markets are excluded. Set to true to include markets that have already resolved.

## `order` (type: `string`):

Field the Polymarket API sorts by (descending). 'volume' surfaces the most-traded markets first. Other useful values: 'liquidity', 'startDate', 'endDate'.

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

Maximum number of markets/events to scrape (1-1000). The scraper paginates the API in pages of 100.

## Actor input object example

```json
{
  "mode": "markets",
  "active": true,
  "closed": false,
  "order": "volume",
  "maxItems": 100
}
```

# Actor output Schema

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

No description

# 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 = {
    "order": "volume"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/polymarket-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 = { "order": "volume" }

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/polymarket-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 '{
  "order": "volume"
}' |
apify call ninhothedev/polymarket-scraper --silent --output-dataset

```

## MCP server setup

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