# Polymarket Data Exporter — Prediction Market Prices & History (`sleekly_featherstar/polymarket-exporter`) Actor

Extract structured prediction market data from Polymarket. Export real-time prices, trading volumes, liquidity, order books, and historical price charts for any category — sports, crypto, politics, AI, and more.

- **URL**: https://apify.com/sleekly\_featherstar/polymarket-exporter.md
- **Developed by:** [Grant](https://apify.com/sleekly_featherstar) (community)
- **Categories:** Developer tools, Other, Automation
- **Stats:** 2 total users, 0 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 market-queries

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Data Exporter — Prediction Market Prices, Volume & History

Extract structured prediction market data from [Polymarket](https://polymarket.com) — the world's largest prediction market platform. Get real-time prices, trading volumes, liquidity, order books, and historical price charts for any market category. No API key required.

**Polymarket data** powers AI training, quantitative research, sports betting analysis, crypto market intelligence, and political forecasting. This Actor makes it accessible as structured JSON/CSV data.

### Why scrape Polymarket data?

Prediction markets aggregate the wisdom of thousands of traders into real-time probabilities. Polymarket has processed billions in volume across sports, crypto, politics, AI, science, and entertainment markets.

- **Train AI models** on real-world probability calibration data
- **Research market efficiency** across thousands of event contracts
- **Track sentiment** on crypto assets, political events, and tech milestones
- **Build dashboards** showing real-time prediction market odds
- **Feed quantitative models** with price history and volume data
- **Monitor competitor intelligence** in the prediction market space

### What you can extract

| Data Field | Description |
|---|---|
| Market question | The event being predicted (e.g. "Will BTC reach $100k by Dec 2025?") |
| Yes / No prices | Current probability as a decimal (0.00-1.00) and percentage |
| Trading volume | Total USDC volume traded |
| Liquidity | Available depth in the order book |
| End date | When the market resolves |
| Price history | Historical price chart (hourly snapshots, 30+ data points) |
| Order book | Current bids and asks |
| Condition ID | Internal identifier for cross-referencing |
| CLOB token IDs | Token identifiers for programmatic access |
| Tags and categories | Sports, crypto, politics, AI, etc. |

### Input options

| Input | Type | Default | Description |
|---|---|---|---|
| Query Type | Select | By Category | Search method: category, keyword, specific markets, or trending |
| Category | Select | sports | Market category (sports, crypto, politics, AI, science, etc.) |
| Keyword | Text | — | Search for markets by keyword (used with "By Keyword" mode) |
| Market Slugs | Text | — | Comma-separated specific market slugs (used with "By Market IDs" mode) |
| Max Results | Integer | 25 | Maximum markets to return (1–500) |
| Include Price History | Boolean | false | Fetch 30+ hourly price history points per market |
| Include Order Book | Boolean | false | Fetch current bids and asks per market |
| Min Liquidity | Number | 0 | Only return markets above this volume threshold |

### Quick start

1. Select a **query type** (start with "Trending Markets — All Categories")
2. Set **max results** to 25 to test
3. **Run** the Actor
4. Download the results as **JSON, CSV, or Excel**

The output contains every active market matching your criteria with current prices, volumes, and links to Polymarket.

### Example output

```json
[
  {
    "id": "123456",
    "slug": "will-bitcoin-reach-100k",
    "question": "Will Bitcoin reach $100,000 by December 2025?",
    "yesPrice": 0.32,
    "noPrice": 0.68,
    "yesPercent": 32.0,
    "noPercent": 68.0,
    "volume": 2450000,
    "volumeFormatted": "$2,450,000",
    "liquidity": 1800000,
    "conditionId": "0xabc123...",
    "endDate": "2025-12-31T23:59:00Z",
    "closed": false,
    "tags": ["crypto", "bitcoin"],
    "url": "https://polymarket.com/event/will-bitcoin-reach-100k"
  }
]
````

### Use cases

#### AI training data

Prediction market prices are gold-standard probability labels. Train models to calibrate confidence, predict outcomes, or detect market inefficiencies. The structured output is ready for pandas, PyTorch, or your ML pipeline.

#### Sports betting intelligence

Polymarket sports markets often diverge from sportsbook lines. Extract all MLB, NFL, NBA, or soccer markets and compare against traditional odds. Find pricing gaps and mispriced outcomes.

#### Crypto market signals

Track sentiment on Bitcoin, Ethereum, and altcoin price targets. Monitor regulatory prediction markets as leading indicators for crypto policy changes.

#### Political forecasting

Real-time probabilities on elections, policy changes, and geopolitical events. The same data hedge funds and research desks use — now accessible via API.

#### Research and analysis

Download complete market snapshots for academic research, thesis validation, or public policy analysis. Price history enables backtesting and time-series analysis.

### Pricing

- **Polymarket API access**: Polymarket's public API is free and requires no authentication
- **Apify platform costs**: Standard compute unit pricing applies (typically $0.02–0.10 per run depending on results count)
- **Pay-per-event**: Charged per market queried at $0.005/market (primary event)

### How it works

1. You configure the search criteria (category, keyword, specific market IDs, or trending)
2. The Actor queries Polymarket's public Gamma and CLOB APIs
3. Data is normalized into a consistent schema
4. Results are pushed to the Apify dataset for download
5. Optional: price history and order book data enrich the output

No authentication, no wallet, no trading required. Read-only access to the full Polymarket data layer.

### Tips for best results

- Start with **Trending — All Categories** to see the most active markets
- Use **By Keyword** for specific topics (e.g. "Bitcoin", "World Cup", "Election")
- Enable **Price History** for time-series analysis (extra charge applies)
- Set **Min Liquidity** to $100,000+ to filter out thin markets
- For bulk extraction, run multiple queries by category and merge the datasets
- The data is in USDC — all volumes and prices are in US Dollar-pegged stablecoin terms

### Legal

This Actor extracts publicly available data from Polymarket's public API. It does not interact with user wallets, execute trades, or access authenticated endpoints. Polymarket data is publicly accessible for research and analysis purposes. For commercial use, consult Polymarket's terms of service.

### Support

For questions, bug reports, or feature requests, reach out via the [Apify Discord](https://discord.apify.com).

# Actor input Schema

## `queryType` (type: `string`):

How you want to search for prediction markets

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

Market category to search (only used when Query Type = 'By Category')

## `keyword` (type: `string`):

Search for markets by keyword (e.g. 'Bitcoin', 'World Cup', 'Election'). Only used when Query Type = 'By Keyword Search'

## `marketSlugs` (type: `string`):

Comma-separated list of specific market slugs to fetch. Only used when Query Type = 'By Specific Market IDs'. Example: will-bitcoin-reach-100k, will-trump-win-2024

## `maxResults` (type: `integer`):

Maximum number of markets to return per query

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

Fetch historical price data for each market. Adds ~30 history points per market with timestamps

## `includeOrderBook` (type: `boolean`):

Fetch current order book (bids/asks) for each market

## `minLiquidity` (type: `number`):

Only return markets with at least this much liquidity (volume). 0 = no filter

## Actor input object example

```json
{
  "queryType": "category",
  "category": "sports",
  "keyword": "Bitcoin $100k",
  "marketSlugs": "will-bitcoin-reach-100k, will-trump-win-2024",
  "maxResults": 25,
  "includePriceHistory": false,
  "includeOrderBook": false,
  "minLiquidity": 0
}
```

# 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("sleekly_featherstar/polymarket-exporter").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("sleekly_featherstar/polymarket-exporter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 sleekly_featherstar/polymarket-exporter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sleekly_featherstar/polymarket-exporter",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Polymarket Data Exporter — Prediction Market Prices & History",
        "description": "Extract structured prediction market data from Polymarket. Export real-time prices, trading volumes, liquidity, order books, and historical price charts for any category — sports, crypto, politics, AI, and more.",
        "version": "1.0",
        "x-build-id": "n8abl0adRjC0kcDN8"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sleekly_featherstar~polymarket-exporter/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sleekly_featherstar-polymarket-exporter",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sleekly_featherstar~polymarket-exporter/runs": {
            "post": {
                "operationId": "runs-sync-sleekly_featherstar-polymarket-exporter",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sleekly_featherstar~polymarket-exporter/run-sync": {
            "post": {
                "operationId": "run-sync-sleekly_featherstar-polymarket-exporter",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queryType"
                ],
                "properties": {
                    "queryType": {
                        "title": "Query Type",
                        "enum": [
                            "category",
                            "keyword",
                            "market-ids",
                            "trending",
                            "trending-all"
                        ],
                        "type": "string",
                        "description": "How you want to search for prediction markets",
                        "default": "category"
                    },
                    "category": {
                        "title": "Category",
                        "enum": [
                            "sports",
                            "crypto",
                            "politics",
                            "ai",
                            "science",
                            "entertainment",
                            "business",
                            "world-news",
                            "pop-culture"
                        ],
                        "type": "string",
                        "description": "Market category to search (only used when Query Type = 'By Category')",
                        "default": "sports"
                    },
                    "keyword": {
                        "title": "Keyword Search",
                        "maxLength": 200,
                        "type": "string",
                        "description": "Search for markets by keyword (e.g. 'Bitcoin', 'World Cup', 'Election'). Only used when Query Type = 'By Keyword Search'"
                    },
                    "marketSlugs": {
                        "title": "Market Slugs",
                        "maxLength": 2000,
                        "type": "string",
                        "description": "Comma-separated list of specific market slugs to fetch. Only used when Query Type = 'By Specific Market IDs'. Example: will-bitcoin-reach-100k, will-trump-win-2024"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of markets to return per query",
                        "default": 25
                    },
                    "includePriceHistory": {
                        "title": "Include Price History",
                        "type": "boolean",
                        "description": "Fetch historical price data for each market. Adds ~30 history points per market with timestamps",
                        "default": false
                    },
                    "includeOrderBook": {
                        "title": "Include Order Book",
                        "type": "boolean",
                        "description": "Fetch current order book (bids/asks) for each market",
                        "default": false
                    },
                    "minLiquidity": {
                        "title": "Minimum Liquidity (USDC)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Only return markets with at least this much liquidity (volume). 0 = no filter",
                        "default": 0
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
