# Polymarket Prediction Market Scraper (`diverse_venture/polymarket-scraper`) Actor

Scrape Polymarket prediction markets — active markets with prices, volumes, liquidity, whale trades ($10K+), and market analytics. No API key required. Outputs JSON, CSV, or Excel.

- **URL**: https://apify.com/diverse\_venture/polymarket-scraper.md
- **Developed by:** [Chak Man Fung](https://apify.com/diverse_venture) (community)
- **Categories:** Other
- **Stats:** 7 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$50.00 / 1,000 actor starts

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 Prediction Market Scraper

Scrape real-time data from [Polymarket](https://polymarket.com) — the largest prediction market platform. Get active markets with prices, volumes, liquidity, and detect whale trades ($10K+).

**No API key required.** Uses Polymarket's free public APIs.

### What it scrapes

#### Markets

- Question/title, Yes/No prices, 24h volume, total volume, liquidity
- Optional metadata: slug, image, end date, category, condition ID

#### Whale Trades

- Trade direction (buy/sell), outcome (Yes/No), size in USD
- Wallet pseudonym, transaction hash, timestamp

### Use cases

- **Trading bots**: Feed market data into automated trading strategies
- **Research**: Analyze prediction market accuracy and liquidity
- **Dashboards**: Build real-time Polymarket monitoring tools
- **Alerts**: Detect large trades and market movements
- **Data analysis**: Export to CSV/Excel for analysis

### Input configuration

| Parameter | Default | Description |
|-----------|---------|-------------|
| mode | "both" | "markets", "whale\_trades", or "both" |
| maxMarkets | 50 | Max markets to scrape (sorted by 24h volume) |
| minVolume24h | 1000 | Min 24h volume filter (USD) |
| minTradeSize | 5000 | Min trade size for whale detection (USD) |
| maxTrades | 100 | Max whale trades to return |
| includeMetadata | true | Include extra fields (slug, image, dates) |

### Output

Results are stored in the default Apify dataset. Export as JSON, CSV, XML, or Excel.

### Example output

```json
{
  "type": "market",
  "question": "Will BTC reach $100K by June 2026?",
  "yesPrice": 0.72,
  "noPrice": 0.28,
  "volume24h": 450000,
  "volume": 12500000,
  "liquidity": 890000
}
```

### Cost

This actor uses minimal compute. A typical run scraping 50 markets + 100 whale trades completes in under 10 seconds and costs less than $0.01 in Apify credits.

# Actor input Schema

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

What data to collect.

## `maxMarkets` (type: `integer`):

Maximum number of markets to scrape (sorted by 24h volume).

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

Only include markets with at least this much 24h trading volume.

## `minTradeSize` (type: `integer`):

Minimum trade size to capture as a 'whale' trade.

## `maxTrades` (type: `integer`):

Maximum number of whale trades to return.

## `includeMetadata` (type: `boolean`):

Include extra fields like slug, image URL, end date, and liquidity.

## Actor input object example

```json
{
  "mode": "both",
  "maxMarkets": 50,
  "minVolume24h": 1000,
  "minTradeSize": 5000,
  "maxTrades": 100,
  "includeMetadata": true
}
```

# 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 = {};

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

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

```

## MCP server setup

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