# Polymarket Scraper — Markets, Prices, Odds & Order Books (`pixflor/polymarket-markets-scraper`) Actor

Export live Polymarket prediction-market data as clean rows: question, Yes/No prices, implied probability, spread, liquidity, 24h volume, resolution date and optional order-book depth.

- **URL**: https://apify.com/pixflor/polymarket-markets-scraper.md
- **Developed by:** [Pixflor](https://apify.com/pixflor) (community)
- **Categories:** Developer tools, Other
- **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 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/platform/actors/running/actors-in-store#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 — Markets, Prices, Odds & Order Books

Get every live Polymarket prediction market as a clean spreadsheet row: the question, the
Yes price, implied probability, spread, liquidity, 24-hour volume, and when it resolves.

No API keys. No wallet. No login. Paste a filter, press start, export CSV or JSON.

***

### What you get

One row per market, already parsed into the columns you'd otherwise have to derive yourself:

| Column | Example |
|---|---|
| `question` | Will the Fed cut rates in September? |
| `yesPrice` | `0.62` |
| `impliedProbability` | `62.0` |
| `probabilityOf` | `Yes` |
| `noPrice` | `0.38` |
| `bestBid` / `bestAsk` / `spread` | `0.61` / `0.63` / `0.02` |
| `volume24hr` / `volume` / `liquidity` | `184203.55` |
| `oneDayPriceChange` | `-0.04` |
| `endDate` | `2026-09-18T00:00:00Z` |
| `url` | direct link to the market |

Polymarket's own API hands you `outcomes` and `outcomePrices` as *strings containing JSON*,
with no Yes price and no probability column. This Actor unpacks all of that, so the data
lands ready for Excel, Sheets, pandas, or a dashboard.

**Every priced market gets a probability — including the ones that aren't Yes/No.** Sports
and esports markets use team names as outcomes, and several sit in the top ten by volume.
`probabilityOf` tells you which outcome the percentage refers to, and `isBinary` flags
whether it's a straight Yes/No question. No null columns to work around.

Turn on **Include order book depth** and each outcome also carries live bid/ask ladders.

***

### Typical uses

- **Track a topic over time.** Schedule it hourly on `searchQuery: "election"` and build a
  probability time series.
- **Find the liquid markets.** Sort by 24h volume, set `minLiquidity`, ignore the noise.
- **Backtest.** Set status to *Resolved* and pull settled markets with final prices.
- **Feed a model or an LLM.** Clean JSON, stable field names, one row per market.
- **Monitor a watchlist.** Pass exact `slugs` and get just those markets, every run.

***

### Example input

```json
{
  "mode": "markets",
  "status": "open",
  "searchQuery": "fed",
  "sortBy": "volume24hr",
  "minLiquidity": 5000,
  "maxItems": 200
}
```

Watchlist mode — only these markets, filters ignored:

```json
{
  "mode": "markets",
  "slugs": ["will-bitcoin-hit-150k-in-2026"],
  "includeOrderBook": true,
  "orderBookDepth": 10
}
```

Grouped view — one row per event, with every candidate nested inside:

```json
{ "mode": "events", "status": "open", "sortBy": "volume", "maxItems": 50 }
```

***

### Settings that matter

- **Markets vs Events** — *Markets* gives one row per tradable question. *Events* groups
  related questions under one headline, which is what you want for elections and any
  multi-candidate race.
- **`minLiquidity` / `minVolume24hr`** — the fastest way to cut thin, untraded markets. Most
  serious markets sit above 1,000 liquidity.
- **`maxItems`** — your cost ceiling. Set it deliberately.
- **`includeOrderBook`** — off by default because it's slower and billed separately. Turn it
  on only when you need depth rather than just price.

***

### Pricing

Pay per event — you pay for what comes back, not for runtime.

| Event | Price |
|---|---|
| Actor start | $0.002 per run |
| Market or event row | $0.0015 each |
| Order book (per outcome) | $0.0008 each |

**1,000 markets ≈ $1.50.** Order books are only charged when you enable them.

***

### Reliability

This Actor talks to Polymarket's documented public API over plain HTTP — no headless
browser, no bot-detection workarounds. That's a deliberate choice: it keeps runs fast and
cheap, and it means the Actor doesn't break every time a page layout changes.

Every request retries with exponential backoff, and a failed page degrades the run instead
of killing it. If a filter matches nothing, you get a clear message saying which filter to
loosen rather than an empty dataset with no explanation.

***

### Notes

- Data comes from Polymarket's public Gamma and CLOB APIs and is provided **as-is for
  research and analysis**. It is not financial advice and carries no warranty of accuracy,
  completeness, or timeliness.
- Prices move constantly. A row is a snapshot at `scrapedAt`, not a live feed — schedule the
  Actor if you need a series.
- Polymarket restricts trading in some jurisdictions. Reading public market data is a
  separate matter from trading; check your local rules before acting on anything here.

***

### Questions or a bug?

Open an issue on the **Issues** tab of this Actor. Include your input JSON and the run ID —
that's usually enough to reproduce it immediately.

# Actor input Schema

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

Markets returns one row per tradable outcome question. Events groups related markets under one headline (e.g. an election with many candidates).

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

Open markets are still trading. Resolved markets have settled and are useful for backtesting.

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

Only return markets whose question, slug or description contains this text. Case-insensitive. Leave empty for no text filter.

## `slugs` (type: `array`):

Fetch only these exact market or event slugs. When set, all other filters are ignored.

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

How to rank results before they are returned. 24h volume surfaces what is trading right now; Ending soonest is useful for markets about to resolve.

## `minLiquidity` (type: `integer`):

Skip thin markets. Useful for filtering out noise — most serious markets sit above 1000.

## `minVolume24hr` (type: `integer`):

Only return markets actively trading in the last 24 hours.

## `endsBefore` (type: `string`):

Only markets resolving before this date (YYYY-MM-DD).

## `endsAfter` (type: `string`):

Only markets resolving after this date (YYYY-MM-DD).

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

Adds live bid/ask ladders from the CLOB for each outcome. Slower and charged separately — leave off unless you need depth.

## `orderBookDepth` (type: `integer`):

How many price levels per side to return when order books are enabled.

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

Hard cap on rows returned. Keep this set — it is your cost ceiling.

## Actor input object example

```json
{
  "mode": "markets",
  "status": "open",
  "searchQuery": "election",
  "slugs": [],
  "sortBy": "volume24hr",
  "minLiquidity": 0,
  "minVolume24hr": 0,
  "includeOrderBook": false,
  "orderBookDepth": 5,
  "maxItems": 100
}
```

# 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("pixflor/polymarket-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("pixflor/polymarket-markets-scraper").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 pixflor/polymarket-markets-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/CpfIAB0LQul5xBaAU/builds/QDihfLHjMhE1Owena/openapi.json
